Documentação / Evolution webhook sample payloads

Evolution webhook sample payloads

Entrar

Evolution webhook sample payloads

This folder holds JSON fixtures for documentation, dedup design, and automated schema tests. Files are grouped by provider (Evolution API V2 vs Evolution GO):

| Subfolder | Contents | |-----------|----------| | v2/ | Evolution V2 (Baileys-style) envelopes: event values like messages.upsert, messages.update, connection.update, logout.instance. Filenames use kebab-case (e.g. message-received-direct.json, connection-update-close.json). Some files are full WebhookGuru exports (wrapper + body); the real payload is in body. | | go/ | Evolution GO envelopes: PascalCase event values (Message, Receipt, Connected, …) plus instanceId / instanceToken. Names come from the WebhookGuru name field when present (slugified), e.g. evogo-mensagem-de-texto-em-um-canal.json. |

Wrapper vs direct payload

  • WebhookGuru wrapper: root has id, endpointId, time, headers, and body. The Pilot internal route POST /api/internal/webhook receives only what lives inside body (no outer wrapper).
  • Direct payload: root fields are event, instance, data, optional date_time, sender, etc.

Tests that load fixtures use parsed.body ?? parsed so both shapes work.

Evolution V2 vs Evolution GO

manifest.json

manifest.json is generated. Do not hand-edit except during review.

npm run docs:evolution-events-manifest

Each entry includes path (e.g. v2/message-received-direct.json or go/evogo-receipt-read.json), hasWebhookGuruWrapper, provider (v2 | go | unknown), event, pilotRouteHandled, and sha256.

Summary counts

Open manifest.json and read the top-level summary object. Regenerate after adding or renaming JSON files.

Adding a new fixture

  1. Save under v2/ or go/ according to the envelope (after unwrapping WebhookGuru if needed).
  2. Use a kebab-case filename that describes the scenario (e.g. v2-messages-update-read-private.json — avoid spaces; ASCII preferred).
  3. Run npm run docs:evolution-events-manifest and commit manifest.json.

Vitest fixtures for schema parsing live under v2/; see packages/whatsapp-provider/test/webhook/schema.test.ts.

Historical layout

The one-time script scripts/reorganize-evolution-events-by-provider.mjs moved the old curated/ and raw-webhookguru/ trees into v2/ and go/ with renamed files. Do not re-run it unless those source folders exist again.

Other files

  • Screenshot from …png — reference screenshot at folder root; not scanned for manifest.json.