Developers
Sauti API
Programmatic access to calls, messages, agents, and campaigns. RESTful endpoints, webhook events, full control.
Authentication
All requests require an API key passed in the Authorization header. Generate keys in your Shylock dashboard under Settings.
Authorization: Bearer sk_live_your_api_keyEndpoints
/v1/callsInitiate an outbound call
Request body
{
"assistantId": "asst_jane_collections",
"phoneNumberId": "pn_jakarta_01",
"customer": {
"number": "+62812345678",
"name": "Rina Wijaya"
}
}Response
{
"id": "call_8f3k2j",
"status": "ringing",
"assistant": "asst_jane_collections",
"from": "+62215551234",
"to": "+62812345678",
"created_at": "2026-04-02T10:30:00Z"
}/v1/messagesSend a message via WhatsApp, SMS, or email
Request body
{
"channel": "whatsapp",
"to": "+62812345678",
"content": {
"text": "Hi Rina, this is a reminder about your upcoming payment on the 5th."
},
"assistantId": "asst_jane_collections"
}Response
{
"id": "msg_a9x2kp",
"channel": "whatsapp",
"status": "sent",
"to": "+62812345678",
"created_at": "2026-04-02T10:31:00Z"
}/v1/assistantsCreate a new AI assistant
Request body
{
"name": "Jane",
"language": "id",
"personality": {
"system_prompt": "You are Jane, a collections agent for Juniper Bank. You speak Indonesian. You are professional, empathetic, and solution-oriented."
},
"voice": {
"provider": "elevenlabs",
"voice_id": "sari_indonesian"
},
"model": {
"provider": "openai",
"model": "gpt-4o"
}
}Response
{
"id": "asst_jane_collections",
"name": "Jane",
"status": "active",
"language": "id",
"created_at": "2026-04-02T10:00:00Z"
}/v1/calls/:idGet call details including transcript and recording
Response
{
"id": "call_8f3k2j",
"status": "completed",
"duration": 142,
"outcome": "promise_to_pay",
"transcript": [
{ "role": "agent", "text": "Hi Rina, this is Jane from Juniper Bank..." },
{ "role": "customer", "text": "Yes, I can pay on the 5th." }
],
"recording_url": "https://sauti.shylock.ai/recordings/call_8f3k2j.mp3",
"created_at": "2026-04-02T10:30:00Z",
"ended_at": "2026-04-02T10:32:22Z"
}Real-time events
Webhooks
Register a webhook URL in your dashboard. We'll POST events to your endpoint as they happen.
call.completedFired when a call ends. Includes transcript, duration, outcome.
call.failedFired when a call fails to connect. Includes error reason.
message.deliveredFired when a WhatsApp/SMS/email is delivered.
message.repliedFired when the customer replies to a message.
payment.promisedFired when a customer promises to pay during a call.