logo
enes

Message notifications

Last update: 5 hours ago by Irais Aguirre

Integration summary

  • Delivery: WhatsApp → Concepto Móvil → POST to your webhook URL (the one you share with our Operations team), with a JSON body.
  • Format: Meta's value object without metadata or messaging_product (see Webhook).
  • Identify the user: from/recipient_id or, if missing, the BSUID.
  • Types on this page: text, audio, document, image, location, video, voice, sticker, contacts, reaction, unsupported, edit, revoke (type values), plus account-level error notifications

Messages, files, locations, and contacts your customer sends you. They all share the same general structure (contacts and messages), and the type field indicates the content type. Replies to interactive messages, shopping carts, and Flows replies are in Interactive replies.

General structure

Structure shared by every message notification.

Structure

Fields for General structure:

NameDescriptionTypeRequirements
contactsArray with the details of the contact who sent the message.Array of objectsRequired
messagesArray with the details of the message sent.Array of objectsRequired

Contacts object

NameDescriptionTypeRequirements
profileObject that contains the contact's details.ObjectRequired
wa_idThe user's phone number (including country code). May be missing if the user has a username (see Usernames and BSUID).StringConditional
user_idThe user's BSUID. Always included.StringRequired
parent_user_idParent BSUID. Only included if the business has linked portfolios.StringOptional

Messages object

NameDescriptionTypeRequirements
fromPhone number (including country code) that sent the message. May be missing if the user has a username.StringConditional
from_user_idBSUID of the user who sent the message. Always included.StringRequired
from_parent_user_idThe user's parent BSUID. Only included if the business has linked portfolios.StringOptional
idMessage ID.StringRequired
timestampDate and time the message was sent.StringRequired
typeDepends on the message type. Possible values:
  • text
  • audio
  • document
  • image
  • location
  • video
  • voice
  • button (quick replies)
  • contacts
  • interactive
  • order
  • sticker
  • reaction
  • system
  • unsupported
  • edit (Coexistence only)
  • revoke (Coexistence only)
StringRequired
group_idIdentifier of the group the message belongs to. Only included when the message comes from a group.StringConditional
textObject that contains the message text.ObjectOptional
audioObject that contains the audio details.ObjectOptional
documentObject that contains the document details.ObjectOptional
imageObject that contains the image details.ObjectOptional
locationObject that contains the location details.ObjectOptional
videoObject that contains the video details.ObjectOptional
voiceObject that contains the voice message details.ObjectOptional
stickerObject that contains the sticker details.ObjectOptional
interactiveObject that contains the interactive message details.ObjectOptional
buttonObject that contains the quick reply text.ObjectOptional
contextObject that contains information related to the following cases:
  • when a button notification is received
  • when the customer replies quoting one of their own messages or a message sent by the business
  • when the message was forwarded
  • when the business sends a message that mentions one or more phone numbers and your customer replies quoting that message
ObjectSent in the following cases:
  • when a button notification is received
  • when the customer replies quoting one of their own messages or a message sent by the business
  • when the message was forwarded
  • when the business sends a message that mentions one or more phone numbers and your customer replies quoting that message
contactsArray with the shared contact's details.Array of objectsRequired when a shared contact notification is received.
reactionObject that contains the details of a reaction to a message.ObjectOptional
referralObject with the click-to-WhatsApp ad details the user came from. When present, the text.body field is concatenated with referral.source_url.ObjectOptional

Profile object

NameDescriptionTypeRequirements
nameName of the contact who sent the message.StringRequired
usernameUsername. Only included if the user has one turned on.StringOptional


Text

The type field is "text".

Structure

Fields for Text:

NameDescriptionTypeRequirements
bodyMessage text.StringRequired.

Example

Complete Text example:

{
"contacts": [
{
"profile": {
"name": "Héctor"
},
"wa_id": "5215500000001"
}
],
"messages": [
{
"from": "5215500000001",
"id": "ABGHUhVUByKUHwIKPrA13J63aX1gRA",
"timestamp": "1617061836",
"type": "text",
"text": {
"body": "Hello, friend"
}
}
]
}

Note (Brazilian numbers): for numbers with the "55" prefix shorter than 13 digits, the platform inserts a "9" after the area code in contacts[0].wa_id and messages[0].from before delivering the notification.

Text from a user with a username

The user has a username and their phone number isn't available, so you only receive their BSUID and username.

{
"contacts": [
{
"profile": {
"name": "test user name",
"username": "@testusername"
},
"user_id": "US.13491208655302741918",
"parent_user_id": "US.ENT.506847293015824"
}
],
"messages": [
{
"id": "ABGGFlA5Fpa",
"timestamp": "1504902988",
"from_user_id": "US.13491208655302741918",
"type": "text",
"text": {
"body": "this is a text message"
}
}
]
}

The user has a username and their phone number is available, so you receive every field.

{
"contacts": [
{
"profile": {
"name": "test user name",
"username": "@testusername"
},
"wa_id": "16315551181",
"user_id": "US.13491208655302741918",
"parent_user_id": "US.ENT.506847293015824"
}
],
"messages": [
{
"id": "ABGGFlA5Fpa",
"timestamp": "1504902988",
"from": "16315551181",
"from_user_id": "US.13491208655302741918",
"type": "text",
"text": {
"body": "this is a text message"
}
}
]
}


Audio

The type field is "audio".

Structure

Fields for Audio:

NameDescriptionTypeRequirements
idFile ID.StringRequired.
mime_typeFile type.StringRequired.
sha256File checksum.StringRequired.

Example

Complete Audio example:

{
"contacts": [
{
"profile": {
"name": "Héctor"
},
"wa_id": "5215500000001"
}
],
"messages": [
{
"from": "5215500000001",
"id": "ABGHUhVUByKUHwIKPrA13J63aX1gRA",
"timestamp": "1617061836",
"type": "audio",
"audio": {
"id": "6b6f751e-5757-4652-bf51-fb4ce7445533",
"mime_type": "audio/mpeg",
"sha256": "693cddca479f19817d300d743849e1a69f045b97f65c08339c2f9d9e0c16cb6f"
}
}
]
}


Document

The type field is "document".

Structure

Fields for Document:

NameDescriptionTypeRequirements
idFile ID.StringRequired.
mime_typeFile type.StringRequired.
sha256File checksum.StringRequired.
captionText that accompanies the document.StringOptional.
filenameFile name on the sender's device.StringRequired.

Example

Complete Document example:

{
"contacts": [
{
"profile": {
"name": "Héctor"
},
"wa_id": "5215500000001"
}
],
"messages": [
{
"from": "5215500000001",
"id": "ABGHUhVUByKUHwIKPrA13J63aX1gRA",
"timestamp": "1617061836",
"type": "document",
"document": {
"caption": "smppdoc.pdf",
"filename": "smppdoc.pdf",
"id": "a26072ab-a20e-4c2b-9595-929a92fb3f9e",
"mime_type": "application/pdf",
"sha256":
"c29f4d7461ddca08fd58db1f716610a2b3f36f9c0f2620bf4f5ea9b698f0912b"
}
}
]
}


Image

The type field is "image".

Structure

Fields for Image:

NameDescriptionTypeRequirements
idFile ID.StringRequired.
mime_typeFile type.StringRequired.
sha256File checksum.StringRequired.
captionText that accompanies the image.StringOptional.

Example

Complete Image example:

{
"contacts": [
{
"profile": {
"name": "Héctor"
},
"wa_id": "5215500000001"
}
],
"messages": [
{
"from": "5215500000001",
"id": "ABGHUhVUByKUHwIKPrA13J63aX1gRA",
"timestamp": "1617061836",
"type": "image",
"image": {
"id": "647b9f5d-89fb-43fc-9708-49b067d49766",
"mime_type": "image/jpeg",
"sha256": "1b78676c0af68ec66b71b7b09803e68d698db7891c7b0820b24a35c82535b06c"
}
}
]
}


Location

The type field is "location".

Structure

Fields for Location:

NameDescriptionTypeRequirements
addressAddress.StringOptional.
latitudeLatitude.NumberRequired.
longitudeLongitude.NumberRequired.
nameLocation name.StringOptional.
urlURL of the website the user got the location information from.StringOptional.

Example

Complete Location example:

{
"contacts": [
{
"profile": {
"name": "Héctor"
},
"wa_id": "5215500000001"
}
],
"messages": [
{
"from": "5215500000001",
"id": "ABGHUhVUByKUHwIKPrA13J63aX1gRA",
"timestamp": "1617061836",
"type": "location",
"location": {
"latitude": 19.5386,
"longitude": -99.15124
}
}
]
}


Video

The type field is "video".

Structure

Fields for Video:

NameDescriptionTypeRequirements
idFile ID.StringRequired.
mime_typeFile type.StringRequired.
sha256File checksum.StringRequired.
captionText or title the user gives to the file they send.StringOptional. Present only if the user writes one.

Example

Complete Video example:

{
"contacts": [
{
"profile": {
"name": "Héctor"
},
"wa_id": "5215500000001"
}
],
"messages": [
{
"from": "5215500000001",
"id": "ABGHUhVUByKUHwIKPrA13J63aX1gRA",
"timestamp": "1617061836",
"type": "video",
"video": {
"id": "a2936494-0747-462a-9381-5e5d6672ce33",
"mime_type": "video/mp4",
"sha256":
"ca5c888f78787f62efe3b382a8b243556dbb982f0e2c585adfd8d0b4808d5d99"
}
}
]
}


Voice message

The type field is "voice".

Structure

Fields for Voice message:

NameDescriptionTypeRequirements
idFile ID.StringRequired
mime_typeFile type.StringRequired
sha256File checksum.StringRequired
captionText or title the user gives to the file they send.StringOptional. Present only if the user writes one.

Example

Complete Voice message example:

{
"contacts": [
{
"profile": {
"name": "John Smith"
},
"wa_id": "5215500000001"
}
],
"messages": [
{
"from": "5215500000001",
"id": "ABGHUhVUByKUHwIKPrA13J63aX1gRA",
"timestamp": "1617061836",
"type": "voice",
"voice": {
"id": "e091fa61-d8dc-41c4-967b-e6a163ba21c2",
"mime_type": "audio/ogg; codecs=opus",
"sha256":
"acd78d57200637690bcca16239dd452fc4e5bb8b817c85b58452abfe28ab8f2e"
}
}
]
}


Sticker

The type field is "sticker".

Structure

Fields for Sticker:

NameDescriptionTypeRequirements
idFile ID.StringRequired.
mime_typeFile type.StringRequired.
sha256File checksum.StringRequired.
animatedWhether the sticker is animated.BooleanRequired.

Example

Complete Sticker example:

{
"contacts": [
{
"profile": {
"name": "John Smith"
},
"wa_id": "5215500000001"
}
],
"messages": [
{
"from": "5215500000001",
"id": "wamid.HBgNNTIxNTUyMDc3NzA1OBUCABIYFDNBMDRDRTJDODlFQ0Q5Mzc5RkUzAA==",
"timestamp": "1617061836",
"type": "sticker",
"sticker": {
"id": "647b9f5d-89fb-43fc-9708-49b067d49766",
"mime_type": "image/webp",
"sha256": "mCZ/7a6sZ6TMa14YokRCSfultjY6aQEVE5Z11TpjsP8=",
"animated": false
}
}
]
}


Reaction

The type field is "reaction". The user reacted with an emoji to a previously sent message.

Structure

Fields for Reaction:

NameDescriptionTypeRequirements
message_idIdentifier of the reacted message. Matches the internal id returned by the send API.StringRequired
emojiEmoji the user reacted with.StringRequired


Referral

referral object, present when the message comes from a click-to-WhatsApp ad. When present, the message's text.body field is concatenated with a space and the value of referral.source_url.

Structure

Fields for Referral:

NameDescriptionTypeRequirements
source_urlAd URL.StringRequired
source_idAd identifier.StringOptional
source_typeSource type (e.g. "ad", "post").StringOptional
headlineAd headline.StringOptional
bodyAd body.StringOptional
imageAd image.StringOptional


Shared contact

The type field is "contacts".

Structure

Fields for Shared contact:

NameDescriptionTypeRequirements
fromSender's phone number (with country code).StringRequired.
typeThe value must be "contacts".StringRequired
contactsArray with the shared contact's details.Array of objectsRequired.

Shared contacts object

NameDescriptionTypeRequirements
birthdayContact's date of birth.StringOptional.
addressesContact's addresses.Array of objectsOptional.
emailsContact's email addresses.Array of objectsOptional.
nameContact's name.ObjectRequired.
orgContact's company.ObjectOptional.
phonesContact's phone numbers.Array of objectsOptional.
urlsContact's URLs.Array of objectsOptional.

Addresses object

NameDescriptionTypeRequirements
cityCity.StringOptional.
countryCountry.StringOptional.
country_codeISO country code.StringOptional.
stateState.StringOptional.
streetStreet.StringOptional.
typePossible values: WORK, HOME.StringOptional.
zipZIP code.StringOptional.

Emails object

NameDescriptionTypeRequirements
emailContact's email address.StringOptional.
typePossible values: WORK.StringOptional.

Name object

NameDescriptionTypeRequirements
first_nameContact's first name.StringRequired if middle_name and last_name are empty.
middle_nameContact's middle name.StringRequired if first_name and last_name are empty.
last_nameContact's last name.StringRequired if middle_name and first_name are empty.
formatted_nameFull name.StringRequired.
prefixName prefix (e.g. "Dr.", "Mr.").StringOptional.
suffixName suffix (e.g. "Jr.", "III").StringOptional.

Org object

NameDescriptionTypeRequirements
companyCompany name.StringRequired
departmentDepartment.StringOptional
titleJob title.StringOptional

Phones object

NameDescriptionTypeRequirements
phoneContact's phone number.StringRequired.
typePossible values: WORK, HOME.StringRequired.
wa_idContact's WhatsApp ID (number with country code).StringOptional.

Urls object

NameDescriptionTypeRequirements
urlContact's URL.StringRequired.
typePossible values: WORK.StringRequired.

Example

Complete Shared contact example:

{
"contacts": [
{
"profile": {
"name": "John Smith"
},
"wa_id": "5215500000001"
}
],
"messages": [
{
"from": "5215500000001",
"id": "ABGHUhVUByKUHwIKPrA13J63aX1gRA",
"timestamp": "1617061836",
"type": "contacts",
"contacts": [
{
"addresses": [],
"contact_image": "/9j/4AAQSkZJRgABAQEAZABkAAD",
"emails": [
{
"email": "test@mail.com",
"type": "Other"
}
],
"ims": [],
"name": {
"first_name": "John",
"formatted_name": "John Smith",
"last_name": "Smith"
},
"org": {},
"phones": [
{
"phone": "+1 (000) 111-1111",
"type": "Mobile"
}
],
"urls": [
{
"type": "PROFILE",
"url": "http://www.google.com/profiles/1012231243417990451811"
}
]
}
]
}
]
}


Unsupported message

The type field is "unsupported". Sent when the user sends a message type Cloud API doesn't support, or in a few other cases (for example, the first message from a user whose business was onboarded with the WhatsApp Business app). The message includes an errors array and an unsupported object.

Structure

Fields for Unsupported message:

Unsupported object

NameDescriptionTypeRequirements
typeType of unsupported message. Possible values:
  • button
  • edit
  • errors
  • gif
  • group_invite
  • hsm
  • image
  • interactive
  • keep_in_chat
  • link_preview
  • list
  • location
  • media_placeholder
  • order
  • pin
  • poll_creation
  • poll_update
  • product
  • reaction
StringRequired

Errors object

NameDescriptionTypeRequirements
codeError code. Possible values:
  • 131051: the message type is not supported.
  • 131060: the message is currently unavailable.
NumberRequired
titleError title.StringRequired
messageError message. Same value as title.StringOptional
error_data.detailsHuman-readable description of the error.StringOptional

Example

Complete Unsupported message example:

{
"contacts": [
{
"profile": {
"name": "Héctor"
},
"wa_id": "5215500000001",
"user_id": "US.13491208655302741918"
}
],
"messages": [
{
"from": "5215500000001",
"from_user_id": "US.13491208655302741918",
"id": "ABGHUhVUByKUHwIKPrA13J63aX1gRA",
"timestamp": "1617061836",
"errors": [
{
"code": 131051,
"title": "Message type unknown",
"message": "Message type unknown",
"error_data": {
"details": "Message type is currently not supported."
}
}
],
"type": "unsupported",
"unsupported": {
"type": "poll_update"
}
}
]
}


Edited message

The type field is "edit". Sent when the user edits a message they previously sent (text, or media with a caption), within 15 minutes of sending it. The edit object contains the ID of the original message and the new content.

Note: the edit notification is only available for businesses that use the WhatsApp Business app (Coexistence).

Structure

Fields for Edited message:

Edit object

NameDescriptionTypeRequirements
original_message_idID of the original message that was edited.StringRequired
messageThe edited content. Includes its own type and the matching type-specific object (for example text or image), and an optional context.ObjectRequired

Example

Complete Edited message example:

{
"contacts": [
{
"profile": {
"name": "Héctor"
},
"wa_id": "5215500000001",
"user_id": "US.13491208655302741918"
}
],
"messages": [
{
"from": "5215500000001",
"from_user_id": "US.13491208655302741918",
"id": "wamid.HBgLMTY1MDM4Nzk0MzkVAgASGBQzQUFERjg0NDEzNDdFODU3MUMxMAA=",
"timestamp": "1749854575",
"type": "edit",
"edit": {
"original_message_id": "wamid.HBgLMTQxMjU1NTA4MjkVAgASGBQzQUNCNjk5RDUwNUZGMUZEM0VBRAA=",
"message": {
"context": {
"id": "M0"
},
"type": "image",
"image": {
"caption": "Updated image caption",
"mime_type": "image/jpeg",
"sha256": "a1b2c3d4e5f6...",
"id": "1234567890"
}
}
}
}
]
}


Deleted message

The type field is "revoke". Sent when the user deletes a message they previously sent, within two days of sending it. The revoke object contains the ID of the deleted message.

Note: the revoke notification is only available for businesses that use the WhatsApp Business app (Coexistence).

Structure

Fields for Deleted message:

Revoke object

NameDescriptionTypeRequirements
original_message_idID of the original message that was deleted.StringRequired

Example

Complete Deleted message example:

{
"contacts": [
{
"profile": {
"name": "Héctor"
},
"wa_id": "5215500000001",
"user_id": "US.13491208655302741918"
}
],
"messages": [
{
"from": "5215500000001",
"from_user_id": "US.13491208655302741918",
"id": "wamid.HBgLMTY1MDM4Nzk0MzkVAgASGBQzQUFERjg0NDEzNDdFODU3MUMxMAA=",
"timestamp": "1749854575",
"type": "revoke",
"revoke": {
"original_message_id": "wamid.HBgLMTQxMjU1NTA4MjkVAgASGBQzQUNCNjk5RDUwNUZGMUZEM0VBRAA="
}
}
]
}


Error notification

Account-, app-, or system-level error that prevented a request from being processed. It arrives in an errors array at the top level of the notification, without the contacts or messages arrays.

Structure

Fields for Error notification:

Errors object

NameDescriptionTypeRequirements
codeError code. For details, see Error codes.NumberRequired
titleError title.StringRequired
messageError message. Same value as title.StringOptional
error_data.detailsHuman-readable description of the error.StringOptional
hrefLink to the error-code documentation.StringOptional

Example

Complete Error notification example:

{
"errors": [
{
"code": 130429,
"title": "Rate limit hit",
"message": "Rate limit hit",
"error_data": {
"details": "Message failed to send because there were too many messages sent from this phone number in a short period of time"
},
"href": "https://developers.facebook.com/documentation/business-messaging/whatsapp/support/error-codes"
}
]
}


WhatsApp — Previous
Webhook
Next — WhatsApp
Interactive replies