Skip to main content

Expose message lineage (metadata.source) on inbox message reads

Hi! We run WhatsApp bots on top of your inbox API and we need to tell apart who authored an outgoing message when re-reading a conversation: our bot (API), a human agent replying from the Zernio dashboard, or a broadcast/template.

You already track this internally: GET /v1/analytics/inbox/source-breakdown reports the lineage metadata.source set at ingest time (human / api / broadcast / workflow / ...), and our tests confirm dashboard replies are counted as human. However, GET /v1/inbox/conversations/{id}/messages returns those same messages with no metadata.source at all (only whatsapp_business_app / coexistence_history are exposed today), so API-sent and dashboard-sent messages are indistinguishable on read.

Request: serialize the existing lineage value in the message objects returned by the messages GET (and ideally in message.sent / message.received webhook payloads). No new tracking needed, just exposing the field you already store. Our use case: when a human agent replies from the dashboard, our bot should automatically go quiet in that thread instead of talking over them, the same way we already do with whatsapp_business_app messages on coexistence numbers.

Status: Completed1 comment

Log in to comment and vote

Comments1

  • Miquel Palet López

    Team•

    Sep 8

    Message lineage is available on inbox message reads through the top-level sentVia field.

    Call GET /v1/inbox/conversations/{conversationId}/messages?accountId={accountId} and inspect messages[].sentVia. Messages sent through an API key are recorded as api; messages sent through the dashboard are recorded as human.

    Use sentVia for this distinction rather than metadata.source, which has a separate meaning for WhatsApp coexistence. Historical messages without recorded lineage can return null; treat that as unknown, not as human-sent.

    Docs: : .