Get message by ID
Authorization
AuthorizationheaderrequiredBearer YOUR_API_KEY. Create a key in the dashboard.
Path parameters
messageIdstringrequired
Responses
200Message details.
messageobjectrequired20 properties
idstringrequiredtostringrequiredfromstringsenderIdstringchannelstringrequiredDelivery channel. Use 'auto' for intelligent routing.
One ofautosmssms_onewaywhatsapptelegramemailinstagrammessengervoicedirectionstringrequiredWho sent the message. Needed to render a thread:
statuscannot tell the two apart, because an inbound message is also stored asdelivered.One ofinboundoutboundmessageTypestringrequiredType of message. Non-text types are supported by WhatsApp and Telegram (varies by type).
location_requestasks the recipient to share their location and is WhatsApp-only. It takes nocontentobject — the prompt goes intext(max 1024 characters) and the button label is fixed by WhatsApp. The recipient's answer arrives as an inboundlocationmessage whosecontent.replyToMessageIdis the ID of the request.request_contact_infoasks the recipient to share their phone number and is WhatsApp-only. Likelocation_requestit takes nocontentobject — the prompt goes intext(max 1024 characters) and WhatsApp renders a fixed Share Contact Info button. The answer arrives as an inboundcontactmessage. Use it to recover the phone number of a contact who adopted a WhatsApp username and is only known by their business-scoped user ID (BSUID); when they share it, Zavu automatically links the phone number to that contact.One oftextimagevideoaudiodocumentstickerlocationcontactbuttonslistcta_urlrequest_contact_infolocation_requestreactiontemplatestatusstringrequiredOne ofqueuedsendingsentdeliveredreadfailedreceivedpending_url_verificationtextstringText content or caption.
contentobjectContent for non-text message types (WhatsApp and Telegram).
32 properties
mediaUrlstringURL of the media file (for image, video, audio, document, sticker).
mediaIdstringWhatsApp media ID if already uploaded.
mimeTypestringMIME type of the media.
filenamestringFilename for documents.
latitudenumberLatitude for location messages.
longitudenumberLongitude for location messages.
locationNamestringName of the location.
locationAddressstringAddress of the location.
contactsobject[]Contact cards for contact messages.
2 properties
namestringphonesstring[]
buttonsobject[]Interactive buttons (max 3).
Limitsmax items 32 properties
idstringrequiredLimitsmax length 256titlestringrequiredLimitsmax length 20
listButtonstringButton text for list messages.
Limitsmax length 20sectionsobject[]Sections for list messages.
2 properties
titlestringrequiredrowsobject[]requiredLimitsmax items 103 properties
idstringrequiredtitlestringrequiredLimitsmax length 24descriptionstringLimitsmax length 72
ctaDisplayTextstringButton label for cta_url messages.
Limitsmax length 20ctaUrlstring<uri>Destination URL opened in the device's default browser when the button is tapped. Used with messageType=cta_url. WhatsApp requires HTTPS in production.
ctaHeaderTypestringOptional header type for cta_url messages.
One oftextimagevideodocumentctaHeaderTextstringHeader text when ctaHeaderType is 'text'.
Limitsmax length 60ctaHeaderMediaUrlstring<uri>Public HTTPS URL of the header media when ctaHeaderType is 'image', 'video', or 'document'. WhatsApp fetches this URL — it must be publicly reachable and return the declared content type.
footerTextstringOptional footer text for cta_url messages.
Limitsmax length 60emojistringEmoji for reaction messages.
reactToMessageIdstringMessage ID to react to.
replyToMessageIdstringZavu message ID of the quoted message this message replies to.
When sending: set it to make the message a quoted reply to an earlier message in the same conversation, such as the
data.messageIdof amessage.inboundwebhook. Supported on WhatsApp (every message type exceptreaction) and Telegram. The quoted message must belong to this project (otherwise404), must have gone out on the same channel as this send, must belong to the conversationtoaddresses, must have been sent or received by the sender this message goes out from (pass it inZavu-Sender), and must have aproviderMessageId. A failed message and a Telegram button tap cannot be quoted. Any other case returns400instead of sending the message unquoted. The stored message then carries the rest of thereplyTo*fields.When receiving: present on inbound messages that quote an earlier message. Omitted when the quoted message is not found in Zavu (e.g. an old or unknown message) — use replyToProviderMessageId in that case.
replyToProviderMessageIdstringProvider message ID (WhatsApp WAMID, or Telegram message ID) of the quoted message. Present whenever an inbound WhatsApp message is a reply, even if the quoted message is not stored in Zavu, and on outbound quoted replies. Read-only: to quote when sending, set replyToMessageId.
replyToFromstringSender of the quoted message (phone number in E.164 format, or the Telegram chat ID). Read-only.
replyToTextstringTruncated snippet (up to 200 characters) of the quoted message's text, for display. Empty when the quoted message has no text (e.g. media). Read-only.
replyToMessageTypestringType of the quoted message (text, image, video, etc.). Read-only.
templateIdstringTemplate ID for template messages.
templateVariablesobjectVariables for body placeholders. Key them to match the template body: by position (
1,2, ...) for positional templates, or by name (e.g.customer_name) for named templates. Zavu detects the template's format and sends the correct payload to Meta. Named keys also resolve a named text-header variable. Do not mix positional and named keys in the same request. On WhatsApp, a value may not contain line breaks, tabs or more than 4 consecutive spaces: Meta refuses those at delivery, so the send is rejected with400 invalid_requestinstead (details.fieldnames the value).1 properties
{key}string
templateButtonVariablesobjectVariables for dynamic button placeholders (URL buttons and OTP buttons). Keys are the button index (0, 1, 2) in the template's
buttonsarray — not the placeholder name. Values substitute the{{1}}placeholder inside that button's URL.WhatsApp constraints: - URL buttons only accept
{{1}}— positional, numeric, no whitespace, no name. Named placeholders like{{token}}are stored as literal URL text by Meta and cannot be substituted. - At most one placeholder per URL button. - A template may have at most three buttons. - Static URL buttons (no placeholder) andquick_replybuttons are not included here.1 properties
{key}string
templateHeaderVariablesobjectValue for a text-header variable, keyed by
1(WhatsApp text headers allow at most one variable). Optional override. If omitted, Zavu resolves the header fromtemplateVariablesusing the header placeholder's name (e.g.novios). Static text headers need no value. The same WhatsApp rule astemplateVariablesapplies: no line breaks, tabs or more than 4 consecutive spaces.1 properties
{key}string
templateHeaderMediaUrlstring<uri>HTTPS URL of the media for this send, for a WhatsApp template whose header is
image,videoordocument. It replaces the file stored on the template for this message only; the template is not changed. WhatsApp fetches the URL when the message is sent, so it must be publicly reachable at that moment (a short-lived signed link works if it outlives the send). Without it, the template's stored header file is sent.A template whose header is
text, or that has no header, is refused with400 invalid_requestanddetails.fieldset tocontent.templateHeaderMediaUrl, before anything is sent or charged. A URL that is not HTTPS is refused with400 invalid_requestand adetails.errorsentry whosepathis["content", "templateHeaderMediaUrl"]. Ignored on channels other than WhatsApp.Limitsmax length 2048templateHeaderFilenamestringFile name WhatsApp shows the recipient for a
documentheader, e.g.invoice-1042.pdf. Works withtemplateHeaderMediaUrl, or on its own to name the template's stored file. Only valid when the template's header isdocument: any other header is refused with400 invalid_requestanddetails.fieldset tocontent.templateHeaderFilename, before anything is sent or charged. Ignored on channels other than WhatsApp.Limitsmin length 1 · max length 240referralobjectClick-to-WhatsApp (CTWA) ad attribution: where an inbound conversation came from.
WhatsApp only. Present on the first inbound message of a conversation opened from a Meta ad or post, and on no message after it — so store it when it arrives rather than expecting it again. Organic conversations never carry it.
Field names are camelCased to match the rest of this API; Meta sends them as snake_case (
ctwa_clid,source_id, ...). Fields that do not apply are omitted: apostsource has no click id, and an image ad has novideoUrl.10 properties
sourceTypestringWhere the click came from.
One ofadpostsourceIdstringIdentifier of the ad or post that produced the click.
sourceUrlstring<uri>Meta permalink to the ad or post.
headlinestringHeadline of the ad or post.
bodystringBody copy of the ad or post.
mediaTypestringType of media on the ad, when it had any.
One ofimagevideoimageUrlstring<uri>Image of the ad. Present when
mediaTypeisimage.videoUrlstring<uri>Video of the ad. Present when
mediaTypeisvideo.thumbnailUrlstring<uri>Thumbnail of the ad media.
ctwaClidstringClick-to-WhatsApp click identifier. This is the value Meta's Conversions API needs to credit a conversion back to the ad that produced the conversation. Present on
adsources; apostsource has none.
conversationIdstringID of the conversation (inbox thread) this message belongs to. Use it to build a direct dashboard link:
https://dashboard.zavu.dev/{locale}/inbox?conv={conversationId}. Omitted only on legacy messages created before conversation threading.providerMessageIdstringMessage ID from the delivery provider.
errorCodestringerrorMessagestringcostnumberZavu platform charge in USD for this message. Messaging is billed against your plan's monthly limits plus usage-based overage.
costProvidernumberCarrier and delivery cost in USD.
costTotalnumberTotal cost in USD (platform charge + delivery cost).
metadataobject1 properties
{key}string
createdAtstring<date-time>requiredupdatedAtstring<date-time>
401Unauthorized.
codestringrequiredmessagestringrequireddetailsobject
404Message not found.
codestringrequiredmessagestringrequireddetailsobject