SMSBOX - WhatsApp API Documentation (2.2.0)

Changelog

Version Date Changes
2.2.0 01/31/2025 📌 Add reference and recipients attributes in the response of the message resource and add URL versioning (waba/1.1/json)
2.1.0 10/03/2024 👩🏻‍💻 Add interactive list and interactive button group for Whatsapp API.
2.0.0 06/28/2024 📞 Start of the SMSBOX Documentation on github with our Whatsapp API documentation.

Message

Send text message

Authorizations:
ApiKey
path Parameters
wabaId
required
string

WhatsApp Business Agent ID

phoneID
required
string

WhatsApp Business Agent's Phone Number ID

Request Body schema: application/json
required
recipients
Array of strings <= 5000 items
object (Text)

Responses

Request samples

Content type
application/json
{
  • "recipients": [
    ],
  • "contentMessage": {
    }
}

Response samples

Content type
application/json
{
  • "response": {
    },
  • "details": "Request accepted for processing.",
  • "reference": "XXXXXXXXXXXXXX",
  • "recipients": [
    ]
}

Send audio message

Authorizations:
ApiKey
path Parameters
wabaId
required
string

WhatsApp Business Agent ID

phoneID
required
string

WhatsApp Business Agent's Phone Number ID

Request Body schema: application/json
required
recipients
Array of strings <= 5000 items
object (Audio)

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "response": {
    },
  • "details": "Request accepted for processing.",
  • "reference": "XXXXXXXXXXXXXX",
  • "recipients": [
    ]
}

Send document message

Authorizations:
ApiKey
path Parameters
wabaId
required
string

WhatsApp Business Agent ID

phoneID
required
string

WhatsApp Business Agent's Phone Number ID

Request Body schema: application/json
required
recipients
Array of strings <= 5000 items
object (Document)

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "response": {
    },
  • "details": "Request accepted for processing.",
  • "reference": "XXXXXXXXXXXXXX",
  • "recipients": [
    ]
}

Send image message

Authorizations:
ApiKey
path Parameters
wabaId
required
string

WhatsApp Business Agent ID

phoneID
required
string

WhatsApp Business Agent's Phone Number ID

Request Body schema: application/json
required
recipients
Array of strings <= 5000 items
object (Image)

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "response": {
    },
  • "details": "Request accepted for processing.",
  • "reference": "XXXXXXXXXXXXXX",
  • "recipients": [
    ]
}

Send sticker message

Authorizations:
ApiKey
path Parameters
wabaId
required
string

WhatsApp Business Agent ID

phoneID
required
string

WhatsApp Business Agent's Phone Number ID

Request Body schema: application/json
required
recipients
Array of strings <= 5000 items
object (Sticker)

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "response": {
    },
  • "details": "Request accepted for processing.",
  • "reference": "XXXXXXXXXXXXXX",
  • "recipients": [
    ]
}

Send video message

Authorizations:
ApiKey
path Parameters
wabaId
required
string

WhatsApp Business Agent ID

phoneID
required
string

WhatsApp Business Agent's Phone Number ID

Request Body schema: application/json
required
recipients
Array of strings <= 5000 items
object (Video)

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "response": {
    },
  • "details": "Request accepted for processing.",
  • "reference": "XXXXXXXXXXXXXX",
  • "recipients": [
    ]
}

Send location message

Authorizations:
ApiKey
path Parameters
wabaId
required
string

WhatsApp Business Agent ID

phoneID
required
string

WhatsApp Business Agent's Phone Number ID

Request Body schema: application/json
required
recipients
Array of strings <= 5000 items
object (Location)

Responses

Request samples

Content type
application/json
{
  • "recipients": [
    ],
  • "contentMessage": {
    }
}

Response samples

Content type
application/json
{
  • "response": {
    },
  • "details": "Request accepted for processing.",
  • "reference": "XXXXXXXXXXXXXX",
  • "recipients": [
    ]
}

Send reply text message

Authorizations:
ApiKey
path Parameters
wabaId
required
string

WhatsApp Business Agent ID

phoneID
required
string

WhatsApp Business Agent's Phone Number ID

Request Body schema: application/json
required
recipients
Array of strings <= 5000 items
object (ReplyText)

Responses

Request samples

Content type
application/json
{
  • "recipients": [
    ],
  • "contentMessage": {
    }
}

Response samples

Content type
application/json
{
  • "response": {
    },
  • "details": "Request accepted for processing.",
  • "reference": "XXXXXXXXXXXXXX",
  • "recipients": [
    ]
}

Send reaction message

Authorizations:
ApiKey
path Parameters
wabaId
required
string

WhatsApp Business Agent ID

phoneID
required
string

WhatsApp Business Agent's Phone Number ID

Request Body schema: application/json
required
recipients
Array of strings <= 5000 items
object (ReplyReaction)

Responses

Request samples

Content type
application/json
{
  • "recipients": [
    ],
  • "contentMessage": {
    }
}

Response samples

Content type
application/json
{
  • "response": {
    },
  • "details": "Request accepted for processing.",
  • "reference": "XXXXXXXXXXXXXX",
  • "recipients": [
    ]
}

Interactive

Send interactive button message

Authorizations:
ApiKey
path Parameters
wabaId
required
string

WhatsApp Business Agent ID

phoneID
required
string

WhatsApp Business Agent's Phone Number ID

Request Body schema: application/json
required
type
required
string
Value: "interactive"
required
object

Responses

Request samples

Content type
application/json
{
  • "type": "interactive",
  • "interactive": {
    }
}

Response samples

Content type
application/json
{
  • "response": {
    },
  • "details": "Request accepted for processing.",
  • "reference": "XXXXXXXXXXXXXX",
  • "recipients": [
    ]
}

Send interactive list message

Authorizations:
ApiKey
path Parameters
wabaId
required
string

WhatsApp Business Agent ID

phoneID
required
string

WhatsApp Business Agent's Phone Number ID

Request Body schema: application/json
required
type
required
string
Value: "interactive"
required
object

Responses

Request samples

Content type
application/json
{
  • "type": "interactive",
  • "interactive": {
    }
}

Response samples

Content type
application/json
{
  • "response": {
    },
  • "details": "Request accepted for processing.",
  • "reference": "XXXXXXXXXXXXXX",
  • "recipients": [
    ]
}

Template

Send OTP message

Authorizations:
ApiKey
path Parameters
wabaId
required
string

WhatsApp Business Agent ID

phoneID
required
string

WhatsApp Business Agent's Phone Number ID

Request Body schema: application/json
required
recipients
Array of strings <= 5000 items
object (OTPTemplateMessage)

Responses

Request samples

Content type
application/json
{
  • "recipients": [
    ],
  • "contentMessage": {
    }
}

Response samples

Content type
application/json
{
  • "response": {
    },
  • "details": "Request accepted for processing.",
  • "reference": "XXXXXXXXXXXXXX",
  • "recipients": [
    ]
}

Event

Send read message status

Authorizations:
ApiKey
path Parameters
wabaId
required
string

WhatsApp Business Agent ID

phoneID
required
string

WhatsApp Business Agent's Phone Number ID

Request Body schema: application/json
required
message_id
string

Received message ID

status
string
Value: "read"

Responses

Request samples

Content type
application/json
{
  • "message_id": "wamid.xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  • "status": "read"
}

Response samples

Content type
application/json
{
  • "response": {
    },
  • "details": "Request accepted for processing.",
  • "reference": "XXXXXXXXXXXXXX",
  • "recipients": [
    ]
}

File

Retrieve file received in a message

Authorizations:
ApiKey
path Parameters
wabaId
required
string

WhatsApp Business Agent ID

phoneID
required
string

WhatsApp Business Agent's Phone Number ID

Request Body schema: application/json
required
file_id
required
string

File ID received via webhook

Responses

Request samples

Content type
application/json
{
  • "file_id": "1234567890"
}

Response samples

Content type
application/json
{
  • "response": {
    },
  • "details": "Done.",
  • "data": {
    }
}

Webhooks

Important:

When a client or user submits an image, video, or other file that does not comply with the WhatsApp Business limitations, the WhatsApp agent is notified via a text type webhook with the details of the encountered error.

For example: Failed to download incoming media due to internal error. Because a client attempted to submit a document larger than 100 MB.

It is recommended to monitor this type of webhook.

Text Webhook

Request Body schema: application/json
object
wabaId
string

WhatsApp Business Agent ID

phoneId
string

WhatsApp Business Agent's Phone Number ID

phoneNumber
string

WhatsApp Business Agent's Phone Number

clientId
integer

SMSBOX user account ID

requestProd
string

Channel

Value: "WABA"
requestDate
string <date-time>

Datetime of the sent message

requestUUID
string <uuid>
requestType
string
Value: "incoming_message"

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "wabaId": "xxxxxx",
  • "phoneId": "xxxxxx",
  • "phoneNumber": "xxxxxx",
  • "clientId": 123456,
  • "requestProd": "WABA",
  • "requestDate": "2024-06-01T14:00:00+02:00",
  • "requestUUID": "xxxxxx",
  • "requestType": "incoming_message"
}

Document Webhook

Request Body schema: application/json
object
wabaId
string

WhatsApp Business Agent ID

phoneId
string

WhatsApp Business Agent's Phone Number ID

phoneNumber
string

WhatsApp Business Agent's Phone Number

clientId
integer

SMSBOX user account ID

requestProd
string

Channel

Value: "WABA"
requestDate
string <date-time>

Datetime of the sent message

requestUUID
string <uuid>
requestType
string
Value: "incoming_message"

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "wabaId": "xxxxxx",
  • "phoneId": "xxxxxx",
  • "phoneNumber": "xxxxxx",
  • "clientId": 123456,
  • "requestProd": "WABA",
  • "requestDate": "2024-06-01T14:00:00+02:00",
  • "requestUUID": "xxxxxx",
  • "requestType": "incoming_message"
}

Image Webhook

Request Body schema: application/json
object
wabaId
string

WhatsApp Business Agent ID

phoneId
string

WhatsApp Business Agent's Phone Number ID

phoneNumber
string

WhatsApp Business Agent's Phone Number

clientId
integer

SMSBOX user account ID

requestProd
string

Channel

Value: "WABA"
requestDate
string <date-time>

Datetime of the sent message

requestUUID
string <uuid>
requestType
string
Value: "incoming_message"

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "wabaId": "xxxxxx",
  • "phoneId": "xxxxxx",
  • "phoneNumber": "xxxxxx",
  • "clientId": 123456,
  • "requestProd": "WABA",
  • "requestDate": "2024-06-01T14:00:00+02:00",
  • "requestUUID": "xxxxxx",
  • "requestType": "incoming_message"
}

Video Webhook

Request Body schema: application/json
object
wabaId
string

WhatsApp Business Agent ID

phoneId
string

WhatsApp Business Agent's Phone Number ID

phoneNumber
string

WhatsApp Business Agent's Phone Number

clientId
integer

SMSBOX user account ID

requestProd
string

Channel

Value: "WABA"
requestDate
string <date-time>

Datetime of the sent message

requestUUID
string <uuid>
requestType
string
Value: "incoming_message"

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "wabaId": "xxxxxx",
  • "phoneId": "xxxxxx",
  • "phoneNumber": "xxxxxx",
  • "clientId": 123456,
  • "requestProd": "WABA",
  • "requestDate": "2024-06-01T14:00:00+02:00",
  • "requestUUID": "xxxxxx",
  • "requestType": "incoming_message"
}

Reaction Webhook

Request Body schema: application/json
object
wabaId
string

WhatsApp Business Agent ID

phoneId
string

WhatsApp Business Agent's Phone Number ID

phoneNumber
string

WhatsApp Business Agent's Phone Number

clientId
integer

SMSBOX user account ID

requestProd
string

Channel

Value: "WABA"
requestDate
string <date-time>

Datetime of the sent message

requestUUID
string <uuid>
requestType
string
Value: "incoming_message"

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "wabaId": "xxxxxx",
  • "phoneId": "xxxxxx",
  • "phoneNumber": "xxxxxx",
  • "clientId": 123456,
  • "requestProd": "WABA",
  • "requestDate": "2024-06-01T14:00:00+02:00",
  • "requestUUID": "xxxxxx",
  • "requestType": "incoming_message"
}

Location Webhook

Request Body schema: application/json
object
wabaId
string

WhatsApp Business Agent ID

phoneId
string

WhatsApp Business Agent's Phone Number ID

phoneNumber
string

WhatsApp Business Agent's Phone Number

clientId
integer

SMSBOX user account ID

requestProd
string

Channel

Value: "WABA"
requestDate
string <date-time>

Datetime of the sent message

requestUUID
string <uuid>
requestType
string
Value: "incoming_message"

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "wabaId": "xxxxxx",
  • "phoneId": "xxxxxx",
  • "phoneNumber": "xxxxxx",
  • "clientId": 123456,
  • "requestProd": "WABA",
  • "requestDate": "2024-06-01T14:00:00+02:00",
  • "requestUUID": "xxxxxx",
  • "requestType": "incoming_message"
}

Message status Webhook

Message status

Request Body schema: application/json
required
object
wabaId
required
string

WhatsApp Business Agent ID

phoneId
required
string

WhatsApp Business Agent's Phone Number ID

phoneNumber
required
string

WhatsApp Business Agent's Phone Number

clientId
required
integer

SMSBOX user account ID

reference
required
integer

Internal ID of the sent message

requestProd
required
string

Channel

requestDate
required
string <date-time>

Datetime of the sent message

requestUUID
required
string <uuid>
requestType
required
string
Value: "status_update"

Responses

Request samples

Content type
application/json
{
  • "data": {},
  • "wabaId": "xxxxxx",
  • "phoneId": "xxxxxx",
  • "phoneNumber": "xxxxxx",
  • "clientId": 123456,
  • "reference": 1234567890,
  • "requestProd": "WABA",
  • "requestDate": "2024-06-01T14:00:00+02:00",
  • "requestUUID": "xxxxxx",
  • "requestType": "status_update"
}