Skip to main content
POST
/
v1
/
agents
curl --request POST \ --url https://api.agents.slng.ai/v1/agents \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data @- <<EOF { "name": "Appointment Reminder", "system_prompt": "You are a friendly appointment reminder for {{clinic_name}}. Confirm the patient's upcoming visit or help them reschedule. Keep responses to one or two sentences.", "greeting": "Hi {{patient_name}}, this is a reminder from {{clinic_name}} about your upcoming appointment.", "language": "en", "region": "eu-central", "models": { "stt": "slng/deepgram/nova:3-en", "llm": "groq/moonshotai/kimi-k2-instruct-0905", "tts": "slng/deepgram/aura:2-en", "tts_voice": "aura-2-thalia-en" }, "template_defaults": { "clinic_name": "Downtown Health Clinic", "patient_name": "there" }, "slng_api_key": "YOUR_API_KEY" } EOF
{ "id": "550e8400-e29b-41d4-a716-446655440000", "organisation_id": "550e8400-e29b-41d4-a716-446655440000", "name": "<string>", "system_prompt": "<string>", "greeting": "<string>", "language": "<string>", "region": "<string>", "models": { "stt": "slng/deepgram/nova:3-en", "llm": "groq/moonshotai/kimi-k2-instruct-0905", "tts": "slng/deepgram/aura:2-en", "tts_voice": "aura-2-thalia-en", "stt_kwargs": {}, "llm_kwargs": {}, "tts_kwargs": {}, "fallbacks": { "stt": [], "llm": [], "tts": [] }, "stt_final_timeout_s": 1, "llm_first_token_timeout_s": 1, "tts_first_audio_timeout_s": 1, "failure_audio_enabled": true }, "idle_nudges": { "first_nudge_text": "<string>", "second_nudge_text": "<string>", "final_hangup_text": "<string>", "enabled": true, "first_nudge_delay_seconds": 15, "second_nudge_delay_seconds": 30, "hangup_delay_seconds": 15 }, "enable_interruptions": true, "tools": [ { "type": "template", "id": "550e8400-e29b-41d4-a716-446655440000", "template": "hangup", "prompt": "<string>", "execution_policy": { "pre_action_message": { "enabled": false, "text": "<string>" } } } ], "template_variables": {}, "created_at": "2026-01-15T10:30:00Z", "updated_at": "2026-01-15T10:30:00Z", "inbound_greeting": "<string>", "outbound_greeting": "<string>", "sip_inbound_trunk_id": "550e8400-e29b-41d4-a716-446655440000", "sip_outbound_trunk_id": "550e8400-e29b-41d4-a716-446655440000", "runtime_variables": [ { "name": "<string>", "description": "<string>" } ], "deleted_at": "2026-01-15T10:30:00Z" }

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required
Maximum string length: 255
system_prompt
string
required

System prompt (Handlebars template).

greeting
string
required

Default greeting.

language
string
required
Maximum string length: 10
region
enum<string>
required

Region where the agent runs.

Available options:
us-east,
eu-central,
ap-south
models
object
required

Model configuration for the agent runtime (STT + LLM + TTS).

slng_api_key
string
required

SLNG API key the agent runtime uses to call STT/LLM/TTS.

inbound_greeting
string | null

Optional greeting override for inbound calls.

outbound_greeting
string | null

Optional greeting override for outbound calls.

idle_nudges
object

Optional silence recovery behavior. The runtime can send two follow-up nudges, then speak a final message and hang up.

enable_interruptions
boolean
default:true
tools
(Template tool · object | Utility tool · object | Webhook · object | Human transfer · object)[]

Built-in call control tools (hangup, voicemail detection).

sip_inbound_trunk_id
string<uuid> | null
Example:

"550e8400-e29b-41d4-a716-446655440000"

sip_outbound_trunk_id
string<uuid> | null
Example:

"550e8400-e29b-41d4-a716-446655440000"

template_defaults
object
runtime_variables
object[]

Response

Agent created.

id
string<uuid>
required
Example:

"550e8400-e29b-41d4-a716-446655440000"

organisation_id
string<uuid>
required
Example:

"550e8400-e29b-41d4-a716-446655440000"

name
string
required
system_prompt
string
required
greeting
string
required
language
string
required
region
string
required
models
object
required

Model configuration for the agent runtime (STT + LLM + TTS).

idle_nudges
object
required

Optional silence recovery behavior. The runtime can send two follow-up nudges, then speak a final message and hang up.

enable_interruptions
boolean
required
tools
(Template tool · object | Utility tool · object | Webhook · object | Human transfer · object)[]
required
template_variables
object
required
created_at
string<date-time>
required
Example:

"2026-01-15T10:30:00Z"

updated_at
string<date-time>
required
Example:

"2026-01-15T10:30:00Z"

inbound_greeting
string | null
outbound_greeting
string | null
sip_inbound_trunk_id
string<uuid> | null
Example:

"550e8400-e29b-41d4-a716-446655440000"

sip_outbound_trunk_id
string<uuid> | null
Example:

"550e8400-e29b-41d4-a716-446655440000"

runtime_variables
object[]
deleted_at
string<date-time> | null
Example:

"2026-01-15T10:30:00Z"