Skip to main content
SMS API Reference

Learn how to send SMS messages programmatically

Youssef Amir avatar
Written by Youssef Amir
Updated over 5 months ago

Through Octopods, you can use our SMS API to programmatically send SMS messages to your Users directly.

Authentication

Once your SMS 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.

API Endpoints

Send an SMS 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",
"body": "MESSAGE_BODY",
"open_intercom_conversation": false
}'

Parameter

Possible Values

Description

Required

destination_phone

any e164 valid phone

the destination phone to send a message template to

Yes

body

object

the body of the SMS message

Yes

open_intercom_conversation

true or false

if you want Octopods to create an Intercom conversation in your Inbox

No

Response (Created 201)

201 Created

{
"message_id": 42,
"phone_number": "353838000000",
"request_id": "d8c0d247-cfc9-48d7-868d-e6afdadb44dc",
}


Get a Sent Message Status


​Request (in cURL)

curl --location --request GET 
'https://app.octopods.io/api/v1/sms/messages/42' \--header
'X-Octopods-Auth: YOUR_API_KEY' \--header 'Content-Type: application/json'

The ID parameter is the message_id returned when sending messages via API. Please take a look at the send-a-sms response example above for more information.

Response (200 OK)

201 OK

{
"message_id": 42,
"status": "DELIVERED",
"status_message": "Your message has been delived successfully.",
"last_updated": "2023-07-07T11:15:46.000Z",
"request_id": "d8c0d247-cfc9-48d7-868d-e6afdadb44dc",
}
Did this answer your question?