curl --request POST \
--url https://prod-api.ringg.ai/ca/api/v0/public/agent \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"agent_name": "My Sales Agent",
"introduction_and_objective": "You are a customer support agent for Acme Corp.",
"response_guidelines": "Be polite, helpful, and concise. Always confirm understanding.",
"task": "Help customers with their orders and answer product questions.",
"primary_language": "en-IN",
"voice_id": "00000000-0000-4000-8000-00000000010e",
"intro_message": "Hello, this is Sarah from Acme Corp. How can I assist you today?",
"faq": "Q: What are your hours? A: We are open 9am-6pm IST.",
"sample_conversations": "User: Hi\nAgent: Hello! How can I help you today?",
"secondary_language": "hi-IN",
"agent_type": "outbound",
"custom_variables": [
"callee_name",
"mobile_number",
"company",
"lead_source"
],
"call_config": {
"call_time": {
"call_start_time": "10:00",
"call_end_time": "18:30",
"timezone": "America/New_York"
},
"max_call_length": 600,
"idle_timeout_warning": 8,
"idle_timeout_end": 20,
"noise_filter_config": {
"filter_noise": true,
"noise_suppression_level": 95
},
"voicemail": {
"detect": true,
"action": "end",
"retry": true
},
"background_audio_config": {
"audio_id": "office_ambience",
"volume": 0.35
},
"mute_during_intro": false
}
}
'import requests
url = "https://prod-api.ringg.ai/ca/api/v0/public/agent"
payload = {
"agent_name": "My Sales Agent",
"introduction_and_objective": "You are a customer support agent for Acme Corp.",
"response_guidelines": "Be polite, helpful, and concise. Always confirm understanding.",
"task": "Help customers with their orders and answer product questions.",
"primary_language": "en-IN",
"voice_id": "00000000-0000-4000-8000-00000000010e",
"intro_message": "Hello, this is Sarah from Acme Corp. How can I assist you today?",
"faq": "Q: What are your hours? A: We are open 9am-6pm IST.",
"sample_conversations": "User: Hi
Agent: Hello! How can I help you today?",
"secondary_language": "hi-IN",
"agent_type": "outbound",
"custom_variables": ["callee_name", "mobile_number", "company", "lead_source"],
"call_config": {
"call_time": {
"call_start_time": "10:00",
"call_end_time": "18:30",
"timezone": "America/New_York"
},
"max_call_length": 600,
"idle_timeout_warning": 8,
"idle_timeout_end": 20,
"noise_filter_config": {
"filter_noise": True,
"noise_suppression_level": 95
},
"voicemail": {
"detect": True,
"action": "end",
"retry": True
},
"background_audio_config": {
"audio_id": "office_ambience",
"volume": 0.35
},
"mute_during_intro": False
}
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_name: 'My Sales Agent',
introduction_and_objective: 'You are a customer support agent for Acme Corp.',
response_guidelines: 'Be polite, helpful, and concise. Always confirm understanding.',
task: 'Help customers with their orders and answer product questions.',
primary_language: 'en-IN',
voice_id: '00000000-0000-4000-8000-00000000010e',
intro_message: 'Hello, this is Sarah from Acme Corp. How can I assist you today?',
faq: 'Q: What are your hours? A: We are open 9am-6pm IST.',
sample_conversations: 'User: Hi\nAgent: Hello! How can I help you today?',
secondary_language: 'hi-IN',
agent_type: 'outbound',
custom_variables: ['callee_name', 'mobile_number', 'company', 'lead_source'],
call_config: {
call_time: {call_start_time: '10:00', call_end_time: '18:30', timezone: 'America/New_York'},
max_call_length: 600,
idle_timeout_warning: 8,
idle_timeout_end: 20,
noise_filter_config: {filter_noise: true, noise_suppression_level: 95},
voicemail: {detect: true, action: 'end', retry: true},
background_audio_config: {audio_id: 'office_ambience', volume: 0.35},
mute_during_intro: false
}
})
};
fetch('https://prod-api.ringg.ai/ca/api/v0/public/agent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"data": {
"id": "00000000-0000-4000-8000-000000000104",
"version": "v1",
"version_id": "00000000-0000-4000-8000-000000000105",
"created_at": "2024-12-16T13:03:29.947147+00:00"
},
"message": "Agent created successfully"
}{
"message": "Voice does not support language 'en-US'",
"code": "VOICE_LANGUAGE_MISMATCH"
}{
"message": "Invalid credentials"
}{
"message": "<string>"
}Create Agent
Create a single-prompt voice agent from a prompt, language, voice and first message, with optional call settings such as calling window and voicemail.
curl --request POST \
--url https://prod-api.ringg.ai/ca/api/v0/public/agent \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"agent_name": "My Sales Agent",
"introduction_and_objective": "You are a customer support agent for Acme Corp.",
"response_guidelines": "Be polite, helpful, and concise. Always confirm understanding.",
"task": "Help customers with their orders and answer product questions.",
"primary_language": "en-IN",
"voice_id": "00000000-0000-4000-8000-00000000010e",
"intro_message": "Hello, this is Sarah from Acme Corp. How can I assist you today?",
"faq": "Q: What are your hours? A: We are open 9am-6pm IST.",
"sample_conversations": "User: Hi\nAgent: Hello! How can I help you today?",
"secondary_language": "hi-IN",
"agent_type": "outbound",
"custom_variables": [
"callee_name",
"mobile_number",
"company",
"lead_source"
],
"call_config": {
"call_time": {
"call_start_time": "10:00",
"call_end_time": "18:30",
"timezone": "America/New_York"
},
"max_call_length": 600,
"idle_timeout_warning": 8,
"idle_timeout_end": 20,
"noise_filter_config": {
"filter_noise": true,
"noise_suppression_level": 95
},
"voicemail": {
"detect": true,
"action": "end",
"retry": true
},
"background_audio_config": {
"audio_id": "office_ambience",
"volume": 0.35
},
"mute_during_intro": false
}
}
'import requests
url = "https://prod-api.ringg.ai/ca/api/v0/public/agent"
payload = {
"agent_name": "My Sales Agent",
"introduction_and_objective": "You are a customer support agent for Acme Corp.",
"response_guidelines": "Be polite, helpful, and concise. Always confirm understanding.",
"task": "Help customers with their orders and answer product questions.",
"primary_language": "en-IN",
"voice_id": "00000000-0000-4000-8000-00000000010e",
"intro_message": "Hello, this is Sarah from Acme Corp. How can I assist you today?",
"faq": "Q: What are your hours? A: We are open 9am-6pm IST.",
"sample_conversations": "User: Hi
Agent: Hello! How can I help you today?",
"secondary_language": "hi-IN",
"agent_type": "outbound",
"custom_variables": ["callee_name", "mobile_number", "company", "lead_source"],
"call_config": {
"call_time": {
"call_start_time": "10:00",
"call_end_time": "18:30",
"timezone": "America/New_York"
},
"max_call_length": 600,
"idle_timeout_warning": 8,
"idle_timeout_end": 20,
"noise_filter_config": {
"filter_noise": True,
"noise_suppression_level": 95
},
"voicemail": {
"detect": True,
"action": "end",
"retry": True
},
"background_audio_config": {
"audio_id": "office_ambience",
"volume": 0.35
},
"mute_during_intro": False
}
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_name: 'My Sales Agent',
introduction_and_objective: 'You are a customer support agent for Acme Corp.',
response_guidelines: 'Be polite, helpful, and concise. Always confirm understanding.',
task: 'Help customers with their orders and answer product questions.',
primary_language: 'en-IN',
voice_id: '00000000-0000-4000-8000-00000000010e',
intro_message: 'Hello, this is Sarah from Acme Corp. How can I assist you today?',
faq: 'Q: What are your hours? A: We are open 9am-6pm IST.',
sample_conversations: 'User: Hi\nAgent: Hello! How can I help you today?',
secondary_language: 'hi-IN',
agent_type: 'outbound',
custom_variables: ['callee_name', 'mobile_number', 'company', 'lead_source'],
call_config: {
call_time: {call_start_time: '10:00', call_end_time: '18:30', timezone: 'America/New_York'},
max_call_length: 600,
idle_timeout_warning: 8,
idle_timeout_end: 20,
noise_filter_config: {filter_noise: true, noise_suppression_level: 95},
voicemail: {detect: true, action: 'end', retry: true},
background_audio_config: {audio_id: 'office_ambience', volume: 0.35},
mute_during_intro: false
}
})
};
fetch('https://prod-api.ringg.ai/ca/api/v0/public/agent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"data": {
"id": "00000000-0000-4000-8000-000000000104",
"version": "v1",
"version_id": "00000000-0000-4000-8000-000000000105",
"created_at": "2024-12-16T13:03:29.947147+00:00"
},
"message": "Agent created successfully"
}{
"message": "Voice does not support language 'en-US'",
"code": "VOICE_LANGUAGE_MISMATCH"
}{
"message": "Invalid credentials"
}{
"message": "<string>"
}data.id. Store it: calls and campaigns need it as agent_id.
Prompt sections
The prompt fields become the agent’s prompt sections, in this order:| Field | Section in the dashboard |
|---|---|
introduction_and_objective | Objective |
response_guidelines | Response Guidelines |
task | Conversation Script; sample_conversations is added at its end |
faq | FAQs (empty when faq is left out) |
intro_message becomes the agent’s first message.
primary_language and secondary_language accept en-US, en-GB, en-AU, en-IN, hi-IN, ta-IN, te-IN, bn-IN, mr-IN, kn-IN, ms-MY, zh-CN, od-IN, pa-IN and my-MM. The voice must support the language, or the request returns 400 with code VOICE_LANGUAGE_MISMATCH.
Call settings
call_config sets how the agent’s calls behave. Every key is optional; leave one out to keep its default.
| Field | What it controls | Default |
|---|---|---|
call_time | Daily calling window: call_start_time and call_end_time (HH:MM, 24-hour) in timezone | 09:00–21:00, Asia/Kolkata |
max_call_length | Hard cap on call length, in seconds (10–3600) | 240 |
idle_timeout_warning | Seconds of caller silence (0–600) before the agent asks if they are still there; 0 turns the check-in off | 5 |
idle_timeout_end | Seconds of caller silence (1–600) before the call ends; must be greater than idle_timeout_warning | 10 |
noise_filter_config | Noise cancellation on the caller’s audio: filter_noise on/off, noise_suppression_level 0–100 | off, 80 |
voicemail | detect voicemail, then action: end, summarise, or static_message (speaks the static_message text); retry re-queues the call | detect on, end, retry on |
background_audio_config | Ambient track under the agent’s voice: audio_id (only office_ambience) and volume from 0.0 to 1.0 | off |
mute_during_intro | true: the caller cannot interrupt the first message | true |
{
"agent_name": "EMI reminder",
"introduction_and_objective": "You are Asha, calling Acme Lending customers about an upcoming EMI.",
"response_guidelines": "Be polite and brief. Confirm the due date before ending the call.",
"task": "Remind the customer of the EMI due date and amount, and note if they want a callback.",
"primary_language": "en-IN",
"voice_id": "your-voice-id",
"intro_message": "Hello, this is Asha from Acme Lending.",
"call_config": {
"call_time": { "call_start_time": "10:00", "call_end_time": "18:30", "timezone": "Asia/Kolkata" },
"max_call_length": 300,
"idle_timeout_warning": 8,
"idle_timeout_end": 20,
"voicemail": { "detect": true, "action": "end", "retry": true },
"mute_during_intro": false
}
}
voice_id from List voices.
Calling window
Outbound calls placed outside the window wait for the next opening, and so do retries. A campaign or an individual call can set its own window instead. The window may cross midnight:22:00 to 06:00 is valid.
timezone accepts any IANA zone, such as America/New_York, Europe/London, Asia/Dubai, Australia/Sydney or UTC.
Region/City form. IST, PST and CST are rejected. EST, MST, HST and GMT are accepted but never change for daylight saving, so an agent on EST calls an hour late for most of the year compared with America/New_York.Validation rules
The request fails, rather than the agent’s later calls, when:- a time is not zero-padded 24-hour (
09:00works,9:00and9:00 AMdo not); idle_timeout_warningis not less thanidle_timeout_end;background_audio_config.volumeis outside0.0–1.0(send0.5, not50).
Notes
- To change call settings after creation, use
edit_call_configon Edit agent settings, or Call settings in the dashboard.PATCH /public/agent/{agent_id}(Update Agent) changes the prompt fields, language, voice, first message, type and variables, but notcall_config. - Before running a campaign, check the new agent with one individual call.
Authorizations
Headers
(Required) Your Ringg AI API key.
"rg_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Body
(Required) Name of the agent
100"My Sales Agent"
(Required) Introduction and objective of the agent
2000"You are a customer support agent for Acme Corp."
(Required) Guidelines for how the agent should respond
3000"Be polite, helpful, and concise. Always confirm understanding."
(Required) The task the agent should perform
1500"Help customers with their orders and answer product questions."
(Required) Primary language locale for the agent
en-US, en-GB, en-AU, en-IN, hi-IN, ta-IN, te-IN, bn-IN, mr-IN, kn-IN, ms-MY, zh-CN, od-IN, pa-IN, my-MM "en-IN"
(Required) Voice ID (UUID). Get available voices from the List Voices endpoint.
"00000000-0000-4000-8000-00000000010e"
(Required) Introduction message the agent will speak when the call starts
500"Hello, this is Sarah from Acme Corp. How can I assist you today?"
(Optional) FAQ content for the agent
5000"Q: What are your hours? A: We are open 9am-6pm IST."
(Optional) Example conversations for the agent. Use \n for newlines between turns.
5000"User: Hi\nAgent: Hello! How can I help you today?"
(Optional) Secondary language locale for the agent
en-US, en-GB, en-AU, en-IN, hi-IN, ta-IN, te-IN, bn-IN, mr-IN, kn-IN, ms-MY, zh-CN, od-IN, pa-IN, my-MM "hi-IN"
(Required) Type of agent. Defaults to outbound.
inbound, outbound, outbound_inbound "outbound"
(Optional) Custom variables for the agent. For outbound agents, callee_name and mobile_number are always included automatically.
[
"callee_name",
"mobile_number",
"company",
"lead_source"
]
(Optional) Call behaviour for the agent. Every field is optional — omit the block, or any key in it, to accept the default. These are the same keys the settings are stored under, so what you send here is what the agent runs with.
Show child attributes
Show child attributes
{
"call_time": {
"call_start_time": "10:00",
"call_end_time": "18:30",
"timezone": "America/New_York"
},
"max_call_length": 600,
"idle_timeout_warning": 8,
"idle_timeout_end": 20,
"noise_filter_config": {
"filter_noise": true,
"noise_suppression_level": 95
},
"voicemail": {
"detect": true,
"action": "end",
"retry": true
},
"background_audio_config": {
"audio_id": "office_ambience",
"volume": 0.35
},
"mute_during_intro": false
}
Was this page helpful?