Messages
A message is one WhatsApp message in a chat, sent or received. Send messages, and read every one your workspace sent or received, whoever sent it: your team, the chatbot, a broadcast or your own code.
Scopes: messages:read to read, messages:send to send.
The message object
Section titled “The message object”A WhatsApp message, incoming or outgoing.
Attributes
id string · uuid
contact_id string · uuid
number_id string · uuid · nullable
The stable ID of the number it was sent from or to. Renaming or removing the number preserves this ID in message history. null when the number’s identity cannot be resolved.
direction string
One of incoming outgoing.
type string
The kind of message: text, image, video, audio, document, sticker, template, interactive, button_reply, list_reply, flow_reply, location, contact, reaction or unsupported. More values may be added.
status string
pending (accepted, not yet with WhatsApp), sent, delivered,
read or failed for outgoing messages; received for incoming
ones.
text object · nullable
The text. For a template, its text with the variables filled in. For location, contact, reaction, reply and flow messages, a readable summary.
Show 1 child attributesHide child attributes
text.body string
media object · nullable
The file the message carries, or a template’s header file.
Show 4 child attributesHide child attributes
media.url string
Where to download it, /v1/messages/{id}/media.
media.mime_type string · nullable
media.filename string · nullable
media.caption string · nullable
template object · nullable
The template it was sent with.
Show 3 child attributesHide child attributes
template.id string · uuid · nullable
template.name string
template.language string · nullable
interactive object · nullable
Reply buttons or a link button the message offered, or the
products from a catalog it showed. header, footer,
catalog_id and sections are for products, null otherwise.
Show 9 child attributesHide child attributes
interactive.type string
One of buttons cta_url product product_list.
interactive.body string
interactive.buttons array of objects
Show 2 child attributesHide child attributes
Each item:
interactive.buttons[].id string
1 to 256 characters.
interactive.buttons[].title string
1 to 20 characters.
interactive.url string · nullable
interactive.display_text string · nullable
interactive.header string · nullable
A product_list message’s heading.
interactive.footer string · nullable
interactive.catalog_id string · nullable
The catalog’s WhatsApp ID.
interactive.sections array of objects · nullable
The products, as they were when the message was sent. A
product message has one section with no title.
Show 2 child attributesHide child attributes
Each item:
interactive.sections[].title string · nullable
interactive.sections[].products array of objects
Show 2 child attributesHide child attributes
Each item:
interactive.sections[].products[].sku string
interactive.sections[].products[].name string · nullable
reply_to_message_id string · uuid · nullable
The message it quotes.
whatsapp_message_id string · nullable
WhatsApp’s ID for the message, once WhatsApp has it.
error object · nullable
Why the message failed.
Show 2 child attributesHide child attributes
error.code integer
WhatsApp’s error code, or 0 if it isn’t known.
error.message string
sent_by object · nullable
Who sent an outgoing message. null for incoming ones.
Show 3 child attributesHide child attributes
sent_by.type string
Who or what it was: a team member, an API key, the chatbot, the AI, an automation, a broadcast, the WhatsApp Business app or Soosh itself. More values may be added.
One of user api_key bot ai automation broadcast whatsapp_app outside support system.
sent_by.id string · uuid · nullable
The person, key or broadcast. null for actors without one, such as the chatbot.
sent_by.name string
broadcast_id string · uuid · nullable
The broadcast that sent it.
created_at string · date-time
updated_at string · date-time