Authentication
Once your WhatsApp channel is connected, we generate an API Key for your account to be used. You can retrieve your API Key directly from our Octopods App by selecting your channel. Please reach out to us to whitelist this feature for your channel first.
API Endpoints
Send an Interactive Message
The payload must be in JSON.
β
βRequest (in cURL)
curl --location --request POST 'https://app.octopods.io/api/v1/sms/messages' \--header 'X-Octopods-Auth: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data-raw '
{
"destination_phone": "+353838000000",
"waba_interactive_message": {<INTERACTIVE_MESSAGE_PAYLOAD>},
"intercom_teammate_id": "5173352"
}'
Parameter | Possible Values | Description | Required |
destination_phone | any e164 valid phone | the destination phone to send a message template to | Yes |
waba_interactive_message | object | WhatsApp Interactive Message payload | Yes |
intercom_teammate_id | string | Intercom teammate ID assigned to this message. | No |
WhatsApp Interactive Message
Read our docs about the supported interactive types and allowed parameters per type.
βMessage Payload
Once you know the interactive message type and format you want to send, follow WhatsApp Messages docs to create the JSON payload. Insert that payload in the waba_interactive_message
key in your request body. Here are some examples:
Reply Buttons
{
"waba_interactive_message": {
"type": "button",
"body": {
"text": "BUTTON_TEXT"
},
"action": {
"buttons": [
{
"type": "reply",
"reply": {
"id": "UNIQUE_BUTTON_ID_1",
"title": "BUTTON_TITLE_1"
}
},
{
"type": "reply",
"reply": {
"id": "UNIQUE_BUTTON_ID_2",
"title": "BUTTON_TITLE_2"
}
}
]
}
}
}
List
{
"waba_interactive_message": {
"type": "list",
"header": {
"type": "text",
"text": "HEADER_TEXT"
},
"body": {
"text": "BODY_TEXT"
},
"footer": {
"text": "FOOTER_TEXT"
},
"action": {
"button": "BUTTON_TEXT",
"sections": [
{
"title": "SECTION_1_TITLE",
"rows": [
{
"id": "SECTION_1_ROW_1_ID",
"title": "SECTION_1_ROW_1_TITLE",
"description": "SECTION_1_ROW_1_DESCRIPTION"
},
{
"id": "SECTION_1_ROW_2_ID",
"title": "SECTION_1_ROW_2_TITLE",
"description": "SECTION_1_ROW_2_DESCRIPTION"
}
]
},
{
"title": "SECTION_2_TITLE",
"rows": [
{
"id": "SECTION_2_ROW_1_ID",
"title": "SECTION_2_ROW_1_TITLE",
"description": "SECTION_2_ROW_1_DESCRIPTION"
},
{
"id": "SECTION_2_ROW_2_ID",
"title": "SECTION_2_ROW_2_TITLE",
"description": "SECTION_2_ROW_2_DESCRIPTION"
}
]
}
]
}
}
}