Skip to main content

SMS API Reference

Learn how to send SMS messages programmatically

Youssef Amir avatar
Written by Youssef Amir
Updated this week

Through Octopods, you can use our SMS API to programmatically send SMS messages to your contacts directly through Intercom or HubSpot integrations.


Authentication

Once your SMS channel is connected, we generate an API Key for your account.

You can retrieve your API Key from the Octopods dashboard by selecting your SMS channel.

Using Your API Key

Include your API key in all requests as a header:

X-Octopods-Auth: YOUR_API_KEY

API Endpoints

1. Send an SMS Message

Send an SMS message to a recipient.

HTTP POST

https://app.octopods.io/api/v1/sms/messages

Request Parameters

Parameter

Type

Description

Required

destination_phone

string

Recipient's phone number in E.164 format

Yes

body

string

The text content of the SMS message

Yes

destination_user_name

string

Name for new contacts (if they don't exist)

No

Platform-Specific Parameters

Parameter

Platform

Type

Description

Required

open_intercom_conversation

Intercom

boolean

Creates an Intercom conversation in your Inbox

No

intercom_teammate_id

Intercom

string

Assigns conversation to specific Intercom teammate

No

​Request (in cURL)

The payload must be in JSON.

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
}'

Response

201 Created
​

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

2. Get Message Status

Check the delivery status of a sent SMS message.

HTTP GET

https://app.octopods.io/api/v1/sms/messages/:MESSAGE_ID

Path Parameters

Parameter

Type

Description

MESSAGE_ID

integer

The message ID returned when sending the SMS

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
​

{
"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?