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, andbody. The Pilot internal routePOST /api/internal/webhookreceives only what lives insidebody(no outer wrapper). - Direct payload: root fields are
event,instance,data, optionaldate_time,sender, etc.
Tests that load fixtures use parsed.body ?? parsed so both shapes work.
Evolution V2 vs Evolution GO
- V2:
eventuses dot notation (messages.upsert, …). - GO: PascalCase
eventand GO-specificdatalayout. Seedocs/depara-pilot-status-evolution-go.md. The app normalizes GO to the V2 envelope innormalize-go.ts.
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
- Save under
v2/orgo/according to the envelope (after unwrapping WebhookGuru if needed). - Use a kebab-case filename that describes the scenario (e.g.
v2-messages-update-read-private.json— avoid spaces; ASCII preferred). - Run
npm run docs:evolution-events-manifestand commitmanifest.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 formanifest.json.