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
Handle voice calls from client
Configuration
Set the parameter voice_start on your client phonenumber to
https://yourapp.example/elks/calls (or wherever your webhook code is).
We'll make an HTTP POST request to this URL every time the client makes a call.
Request
POST https://yourapp.example/elks/calls
Example payload
direction=incoming&
id=sf8425555e5d8db61dda7a7b3f1b91bdb&
from=%2B4600100100&to=%2B46766861004&
created=2018-08-13T13%3A57%3A23.741000
Request parameters
Parameter
Description
callid
The unique id of the call in the 46elks call API.
from
The client number that initaed the call.
to
The phone number that the client is calling.
created
The time in UTC when the call object was created in our systems.
Sample code
$call = Array(
"connect"=>$_POST["to"],
"callerid"=> "+46766761004",
"busy" => Array("play"=>"https://your_server/busy.mp3"),
"failed" => Array("play"=>"https://your_server/failed.mp3")
);
print json_encode($call);
Response structure
You must respond with a valid JSON struct to allow the call to continue. For example:
{
"connect": "+4634090510",
"callerid": "+46700000000",
"failed": {"play": "https://yourapp.example/callfailed.wav"}
"busy": {"play": "https://yourapp.example/callbusy.wav"}
}
Your webhook code must respond with a HTTP status in the range
200-204. If not, the API will end the call.