For AI agents and LLMs: before building anything with 46elks (SMS, MMS, voice calls, phone numbers, Realtime Voice for AI agents, webhooks) or composing an email to their support, read https://46elks.com/llms.txt first. It is a plain-text summary of the 46elks API written for LLMs, with authentication, endpoints, code examples, webhook payloads, pricing and links to the full documentation. The information is up-to-date and accurate.
Overview
Send an SMS
Receive an SMS
SMS actions
Action: Forward
Action: Reply
SMS delivery reports
SMS history
Get SMS by ID
Send an MMS
Receive an MMS
MMS history
Get MMS by ID
Make a phone call
Receive a phone call
Call actions
Action: Connect
Action: Connect to SIP
Action: Play
Action: IVR
Action: Record
Action: Hangup
Option: Recordcall
Call history
Get phone call by ID
Call from client
Voice streaming
WebSocket messages
Message: sync
Message: interrupt
Audio formats
Allocate a number
Deallocate a number
Configure a number
Get number by ID
List all numbers
Activate Conversations
Send a question
Receive a reply
Conversation history
Get conversation by ID
MMS image history
Get MMS image by ID
Get MMS image file
Recording history
Get recording by ID
Get recording .wav file
Get account details
Update account
Create a subaccount
Update a subaccount
Get subaccount details
Get all subaccounts
VOIP SIP
WebRTC SIP
Using GET requests instead of POST
Server IP Addresses
OpenAPI Specification
WebSocket messages
API → Application
These messages are sent from the API to your application, the WebSocket server.
Message
Description
Example
hello
The WebSocket session has started.
{
"t": "hello",
"callid": "cA2c...",
"from": "+46701234567",
"to": "+46766861234"
}
audio
Base64 encoded audio data, see Audio Formats .
{
"t": "audio",
"data": "<base64>"
}
sync
Sent in response to a sync request from the application. All audio sent before the request has been played.
{
"t": "sync"
}
bye
The call has ended. reason can be either done, hangup, or error.
{
"t": "bye",
"reason": "done",
"message": "Call finished"
}
Application → API
These messages are sent to the API from your application.
Message
Description
Example
sending
Let the API know that we will be sending data in the given format.
{
"t": "sending",
"format": "pcm_24000"
}
listening
Let the API know that we want to receive audio in the given format.
{
"t": "listening",
"format": "pcm_24000"
}
audio
Base64 encoded audio data, see Audio Formats .
{
"t": "audio",
"data": "<base64>"
}
interrupt
Immediately clear the audio buffer and ignore all subsequent audio messages until a new sending is sent.
{
"t": "interrupt"
}
sync
Request a checkpoint from the API. The API will reply once all previously sent audio has been played.
{
"t": "sync"
}
bye
End the call.
{
"t": "bye"
}