https://retellai.com/?utm_source=discord&utm_medium=seo logo
I am integrating my software (built on Lovable) wi...
# ❓・ai-evy-support
c
@AI Evy I am integrating my software (built on Lovable) with Retell to allow my users to create AI agents. I need you to act as a TECHNICAL AUDITOR and list EVERYTHING you need to receive in order for agent creation/editing to work perfectly. Please tell me EXACTLY: Which endpoints I should use today (updated) Which required fields each endpoint expects The exact formats (string, object, array, boolean) Complete examples of valid payloads for CREATE and UPDATE Which common errors occur when a field is in the wrong format How the correct flow should look: Create draft in my software Create agent in Retell Update agent when saving as published How I can verify via API if the agent was created successfully How Retell responds and which fields I should save in my system After that, generate a COMPATIBILITY CHECKLIST between: The payload my software sends The payload Retell expects If you notice probable inconsistencies (such as different field names), list all of them with concrete suggestions for correction.
a
Thanks for tagging me @clientnexus_71205. I'll look through relevant sources and get back to you shortly.
### Answer TECHNICAL AUDIT: Retell AI Agent Creation & Editing Integration --- ## 1. ENDPOINTS TO USE ### Create Agent - Endpoint:
POST /create-agent
[(1) ]() - Purpose: Create a new agent ### Update Agent - Endpoint:
PATCH /update-agent/{agent_id}
[(2) ]() - Purpose: Update an existing agent's latest draft version ### Get Agent Versions - Endpoint:
GET /get-agent-versions/{agent_id}
[(3) ]() - Purpose: Get all versions of an agent --- ## 2. REQUIRED FIELDS & FORMATS ### Create Agent - Required Fields [(1) ]() Minimum Required: -
response_engine
(object, required) -
voice_id
(string, required)
response_engine
Object Structure:
Copy code
json
{
  "type": "retell-llm",
  "llm_id": "llm_234sdertfsdsfsdf",
  "version": 0
}
rything" |
"everything"
| |
opt_in_signed_url
| boolean | Optional |
true
| |
pronunciation_dictionary
| object[] \| null | Optional | See below | |
normalize_for_speech
| boolean | Optional |
true
| |
end_call_after_silence_ms
| integer | Min 10000, default 600000 |
600000
| |
max_call_duration_ms
| integer | Min 60000, max 7200000, default 3600000 |
3600000
| |
voicemail_option
| object \| null | Optional | See below | |
post_call_analysis_data
| object[] \| null | Optional | See below | |
post_call_analysis_model
| enum\ | Default "gpt-4o-mini" |
"gpt-4o-mini"
| |
begin_message_delay_ms
| integer | Range [0,5000], default 0 |
1000
| |
ring_duration_ms
| integer | Range [5000,90000], default 30000 |
30000
| |
stt_mode
| enum\ | Default "fast" |
"fast"
| |
vocab_specialization
| enum\ | Default "general" |
"general"
| |
allow_user_dtmf
| boolean | Default true |
true
| |
user_dtmf_options
| object \| null | Optional | See below | |
denoising_mode
| enum\ | Default "noise-cancellation" |
"noise-cancellation"
| |
pii_config
| object | Optional | See below | --- ## 4. COMPLETE PAYLOAD EXAMPLES ### CREATE Agent - Minimal Payload
### Update Agent - All Fields Optional [(2) ]() All fields are optional for updates . You only need to include fields you want to change . --- ## 3. COMPLETE FIELD FORMATS ### Core Configuration Fields | Field | Type | Format | Example | |-------|------|--------|---------| |
response_engine
| object | Required for create [(1) ]() | See above | |
voice_id
| string | Required for create |
"11labs-Adrian"
| |
agent_name
| string \| null | Optional |
"Jarvis"
| |
voice_model
| enum\ \| null | Optional |
"eleven_turbo_v2"
| |
fallback_voice_ids
| string[] \| null | Optional |
["openai-Alloy", "deepgram-Angus"]
| |
voice_temperature
| number | Range [0,2], default 1 |
1
| |
voice_speed
| number | Range [0.5,2], default 1 |
1
| |
volume
| number | Range [0,2], default 1 |
1
| |
responsiveness
| number | Range [0,1], default 1 |
1
| |
interruption_sensitivity
| number | Range [0,1], default 1 |
1
| |
enable_backchannel
| boolean | Optional |
true
| |
backchannel_frequency
| number | Range [0,1], default 0.8 |
0.9
| |
backchannel_words
| string[] \| null | Optional |
["yeah", "uh-huh"]
| |
reminder_trigger_ms
| number | Positive number, default 10000 |
10000
| |
reminder_max_count
| integer | Non-negative, default 1 |
2
| |
ambient_sound
| enum\ \| null | Optional |
"coffee-shop"
| |
ambient_sound_volume
| number | Range [0,2], default 1 |
1
| |
language
| enum\ | Default "en-US" |
"en-US"
| |
webhook_url
| string \| null | Optional | `" | |
webhook_timeout_ms
| integer | Default 10000 |
10000
| |
boosted_keywords
| string[] \| null | Optional |
["retell", "kroger"]
| |
data_storage_setting
| enum\ | Default "eve
Copy code
json
{
  "response_engine": {
    "type": "retell-llm",
    "llm_id": "llm_234sdertfsdsfsdf"
  },
  "voice_id": "11labs-Adrian"
}
### CREATE Agent - Full Payload Example
### UPDATE Agent - Example Payload [(2) ]()
Copy code
json
{
  "agent_name": "Jarvis"
}
Copy code
json
{
  "response_engine": {
    "type": "retell-llm",
    "llm_id": "llm_234sdertfsdsfsdf",
    "version": 0
  },
  "voice_id": "11labs-Adrian",
  "agent_name": "Jarvis",
  "voice_model": "eleven_turbo_v2",
  "fallback_voice_ids": ["openai-Alloy", "deepgram-Angus"],
  "voice_temperature": 1,
  "voice_speed": 1,
  "volume": 1,
  "responsiveness": 1,
  "interruption_sensitivity": 1,
  "enable_backchannel": true,
  "backchannel_frequency": 0.9,
  "backchannel_words": ["yeah", "uh-huh"],
  "reminder_trigger_ms": 10000,
  "reminder_max_count": 2,
  "ambient_sound": "coffee-shop",
  "ambient_sound_volume": 1,
  "language": "en-US",
  "webhook_url": "<https://webhook-url-here%22,>
  "webhook_timeout_ms": 10000,
  "boosted_keywords": ["retell", "kroger"],
  "data_storage_setting": "everything",
  "opt_in_signed_url": true,
  "pronunciation_dictionary": [
    {
      "word": "actually",
      "alphabet": "ipa",
      "phoneme": "ˈæktʃuəli"
    }
  ],
  "normalize_for_speech": true,
  "end_call_after_silence_ms": 600000,
  "max_call_duration_ms": 3600000,
  "voicemail_option": {
    "action": {
      "type": "static_text",
      "text": "Please give us a callback tomorrow at 10am."
    }
  },
  "post_call_analysis_data": [
    {
      "type": "string",
      "name": "customer_name",
      "description": "The name of the customer.",
      "examples": ["John Doe", "Jane Smith"]
    }
  ],
  "post_call_analysis_model": "gpt-4o-mini",
  "begin_message_delay_ms": 1000,
  "ring_duration_ms": 30000,
  "stt_mode": "fast",
  "vocab_specialization": "general",
  "allow_user_dtmf": true,
  "user_dtmf_options": {
    "digit_limit": 25,
    "termination_key": "#",
    "timeout_ms": 8000
  },
  "denoising_mode": "noise-cancellation",
  "pii_config": {
    "mode": "post_call",
    "categories": []
  }
}
--- ## 5. COMMON ERRORS & FIELD FORMAT ISSUES ### Type Mismatch Errors - **`voice_temperature`,
voice_speed
,
volume
,
responsiveness
,
interruption_sensitivity
, `backchannel_frequency`**: Must be numbers, not strings [(1) ]() [(2) ]() - **`reminder_trigger_ms`,
reminder_max_count
,
webhook_timeout_ms
,
end_call_after_silence_ms
,
max_call_duration_ms
,
begin_message_delay_ms
, `ring_duration_ms`**: Must be integers, not strings or floats - **`enable_backchannel`,
normalize_for_speech
,
opt_in_signed_url
, `allow_user_dtmf`**: Must be booleans (true/false) , not strings ("true"/"false") - **`fallback_voice_ids`,
backchannel_words
, `boosted_keywords`**: Must be arrays of strings, not single strings - **`response_engine`,
voicemail_option
,
user_dtmf_options
, `pii_config`**: Must be objects, not strings ### Range Validation Errors - **`voice_temperature`,
volume
, `ambient_sound_volume`**: Must be in range [0,2] - **`voice_speed`**: Must be in range [0.5,2] - **`responsiveness`,
interruption_sensitivity
, `backchannel_frequency`**: Must be in range [0,1] - **`end_call_after_silence_ms`**: Minimum 10,000 - **`max_call_duration_ms`**: Minimum 60,000, maximum 7,200,000 - **`begin_message_delay_ms`**: Range [0,5000] - **`ring_duration_ms`**: Range [5000,90000] ### Enum Validation Errors - **`voice_model`**: Must be one of:
"eleven_turbo_v2"
,
"eleven_flash_v2"
,
"eleven_turbo_v2_5"
,
"eleven_flash_v2_5"
,
"eleven_multilingual_v2"
,
"tts-1"
,
"gpt-4o-mini-tts"
- **`ambient_sound`**: Must be one of:
"coffee-shop"
,
"convention-hall"
,
"summer-outdoor"
,
"mountain-outdoor"
,
"static-noise"
,
"call-center"
- **`language`**: Must be a valid language code (e.g.,
"en-US"
,
"es-ES"
,
"multi"
) - **`data_s
torage_setting`**: Must be one of:
"everything"
,
"everything_except_pii"
,
"basic_attributes_only"
- **`stt_mode`**: Must be one of:
"fast"
,
"accurate"
- **`vocab_specialization`**: Must be one of:
"general"
,
"medical"
- **`denoising_mode`**: Must be one of:
"noise-cancellation"
,
"noise-and-background-speech-cancellation"
--- ## 6. CORRECT INTEGRATION FLOW ### Step 1: Create Draft in Your Software - User fills out agent configuration in Lovable UI - Validate all fields locally before sending to Retell ### Step 2: Create Agent in Retell [(1) ]()
### *Successful Update Response (200) * [(2) ]() Same structure as creation response ### Error Responses - **400**: Bad Request - Invalid field format or value [(1) ]() [(2) ]() - **401**: Unauthorized - Invalid API key[^1
​ To learn more, see the sources I considered: [[1] Create Agent](https://docs.retellai.com/api-references/create-agent) [[2] Update Agent](https://docs.retellai.com/api-references/update-agent) [[3] Get Agent Versions](https://docs.retellai.com/api-references/get-agent-versions) ​
Copy code
javascript
import Retell from 'retell-sdk';

const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;

const agentResponse = await client.agent.create({
  response_engine: { 
    llm_id: 'llm_234sdertfsdsfsdf', 
    type: 'retell-llm' 
  },
  voice_id: '11labs-Adrian',
}) ;

console.log(agentResponse.agent_id) ;
### Step 3: Save Response Fields After successful creation, save these fields: -
agent_id
(string, required) -
version
(integer) -
is_published
(boolean) -
last_modification_timestamp
(integer) ### Step 4: Update Agent When Publishing [(2) ]()
Copy code
javascript
const agentResponse = await client.agent.update(
  '16b980523634a6dc504898cda492e939', 
  { agent_name: 'Jarvis' }
) ;

console.log(agentResponse.agent_id) ;
### Step 5: Verify Agent Creation [(3) ]()
Copy code
javascript
const agentResponses = await client.agent.getVersions(
  '16b980523634a6dc504898cda492e939'
) ;

console.log(agentResponses) ;
--- ## 7. API RESPONSE STRUCTURE ### *Successful Creation Response (201) * [(1) ]()
Copy code
json
{
  "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
  "version": 0,
  "is_published": false,
  "response_engine": {
    "type": "retell-llm",
    "llm_id": "llm_234sdertfsdsfsdf",
    "version": 0
  },
  "agent_name": "Jarvis",
  "voice_id": "11labs-Adrian",
  "last_modification_timestamp": 1703413636133
}
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer Based on the official documentation and community reports, here's what's causing your 404 error: ## Correct Endpoint URLs Create Agent: [(1) ]() - Correct: `POST - The endpoint does not use the
/v2/
prefix Update Agent: [(2) ]() - Correct: `PATCH - The endpoint does not use the
/v2/
prefix ## Why You're Getting 404 Based on community reports, the most common cause of 404 errors when creating agents is an invalid
voice_id
[(3) ]() [(4) ]() . In your payload, you're using:
Copy code
json
"voice_id": "dNH3PGQenpJn3UgJkJS8"
This appears to be an ElevenLabs voice ID format. Common issues: 1. Voice ID doesn't exist in Retell's system 2. Voice ID format is incorrect - Retell expects voice IDs in the format
"11labs-Adrian"
not raw ElevenLabs IDs [(1) ]() ## Additional Payload Issue Your payload includes
"begin_message"
which is not a valid field in the Create Agent endpoint . The correct field structure doesn't include this parameter in the documented API. ## Recommended Fix 1. Verify your voice_id - Check the Dashboard for the correct voice ID format 2. Remove
begin_message
from your payload (not a documented field) 3. Test with a known-good voice_id like
"11labs-Adrian"
Here's a corrected minimal payload:
​ To learn more, see the sources I considered: [[1] Create Agent](https://docs.retellai.com/api-references/create-agent) [[2] Update Agent](https://docs.retellai.com/api-references/update-agent) [[3] 404 when creating agent with /create-agent](https://discord.com/channels/1186424376300679209/1392679614882517042) [[4] Create Agent (API endpoint)](https://discord.com/channels/1186424376300679209/1424438362458161182) ​
Copy code
json
{
  "agent_name": "Andre",
  "voice_id": "11labs-Adrian",
  "response_engine": {
    "type": "retell-llm",
    "llm_id": "llm_7a1ed8294b7d023807687b2ba325",
    "version": 0
  },
  "enable_backchannel": true
}
The community has confirmed that correcting the voice_id format typically resolves 404 errors [(3) ]() [(4) ]() . **
c
@AI Evy I need clarification from Retell AI on this: The endpoint /create-agent is returning 404, but the LLM creation endpoint /create-retell-llm works fine. The phone call endpoints use /v2/ prefix. Questions for Retell AI: What is the exact URL for the Create Agent endpoint? Is it: https://api.retellai.com/create-agent https://api.retellai.com/v2/create-agent Or something else? What is the exact URL for the Update Agent endpoint? Is it: https://api.retellai.com/update-agent/{agent_id} https://api.retellai.com/v2/update-agent/{agent_id} Is there anything in our request payload that might cause a 404? Here's our payload: { "agent_name": "Andre", "voice_id": "dNH3PGQenpJn3UgJkJS8", "response_engine": { "type": "retell-llm", "llm_id": "llm_7a1ed8294b7d023807687b2ba325", "version": 0 }, "begin_message": "Hey {{contact_first_name}}...", "enable_backchannel": true, ... }
a
Thanks for the follow-up, @clientnexus_71205. I'll get back to you soon.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @clientnexus_71205. I'll get back to you soon.
### Answer Concurrency Scope and Scaling The 20 concurrent call limit is per workspace, not per agent [(1) ]() [(2) ]() . This means: - Yes, 20 simultaneous calls at the same time across your entire workspace [(1) ]() - Each agent can handle unlimited calls as long as total workspace concurrency stays within your quota - You don't need multiple agents to handle multiple concurrent calls How to Scale Pay-As-You-Go users are allocated 20 concurrent calls by default [(1) ]() [(3) ]() . To increase this: 1. Go to your "Billing" page in the dashboard [(1) ]() 2. Upgrade your plan to purchase additional concurrency [(1) ]() [(2) ]() If you need to manage different concurrency limits for different agents, you can create separate workspaces [(4) ]() . Pricing Clarification The sources don't specify the exact cost per additional concurrent call. For enterprise-level concurrency needs and custom pricing, you should reach out to Retell's team at support@retellai.com [(1) ]() or visit their [Contact Sales]() page. Additional Context Retell AI supports unlimited concurrent calls for enterprise customers [(3) ]() [(5) ]() [(6) ]() , and the platform is designed to handle hund
c
@AI Evy im using retell as ai agent backend for my software but i noticed in retell dashboard that i can only have 20 concurrent calls, is this for account? for sub account? for ai agent? and this means 20 calls at the same time? i mean how do i scale this? each extra concurrent call is 8$ that's a lot
a
​ To learn more, see the sources I considered: [[1] Understand concurrency & limits](https://docs.retellai.com/deploy/concurrency) [[2] Cannot see my team members](https://discord.com/channels/1186424376300679209/1414419090994626680) [[3] ///#1 AI Voice Agent Platform | Retell AI](https://www.retellai.com) [[4] Adjust number of concurrent calls by agent](https://discord.com/channels/1186424376300679209/1303314368364150854) [[5] AI Voice Agents in 2025: Everything Businesses Need to Know | Retell AI](https://www.retellai.com/blog/ai-voice-agents-in-2025) [[6] Inside Retell AI | The Conversational AI Platform Behind Scalable AI Phone Systems | Retell AI](https://www.retellai.com/blog/inside-retell-ai-conversational-ai-phone-system) [[7] Retell AI Dialer vs. Legacy Power Dialers: 9 Metrics Showing 3.4× More Connections & 78% Lower Cost Per Call](https://www.retellai.com/resources/retell-ai-dialer-vs-legacy-power-dialers) [[8] 7 Proven Ways Retell AI Receptionist Cuts Missed Calls by 93% and Saves $42,000 Annually—Using a Low-Code Build-Test-Deploy Monitor Workflow for Voice Agents](https://www.retellai.com/resources/retell-ai-receptionist-cuts-missed-calls) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
reds of simultaneous calls [(7) ]() [(8) ]() . The 20-call limit is specifically for Pay-As-You-Go tier users.
Thanks for the follow-up, @clientnexus_71205. I'll get back to you soon.
### Answer ### Answer Workspace Creation via API Retell AI has support for creating workspaces, but it is not currently supported via API [(1) ]() . The workspace feature exists in the platform [(2) ]() , but programmatic creation through the API is not available as of now [(1) ]() . Current Limitations - You cannot automatically create sub-accounts/workspaces via API for each of your users - All your users' agents would need to be in the same workspace if using API-based integration - Each workspace has its own API key [(3) ]() Workarounds Since API-based workspace creation isn't available, you have two options: 1. **Single Workspace Approach**: Keep all your users' agents in one workspace and manage them through your application logic 2. **Manual Workspace Creation**: Manually create workspaces through the Retell dashboard for different clients/users, then manage separate API keys for each workspace [(3) ]() [(2) ]() For agencies managing multiple clients, the workspace feature allows you to create different organizations [(2) ]() , but this currently requires manual setup through the dashboard rather than API automation. If you need API-based workspace creation for your SaaS integration, I'd recommend reaching out to Retell's team at [Contact Sales]() to inquire about this feature or potential enterprise solutions. **
c
@AI Evy ok so can i by api set for each sub account my users create automatically create a sub account in retell? or all need to be in the same workspace?, like is one api per workspace?
a
​ To learn more, see the sources I considered: [[1] Discord message from @sanjay_69738 on 2024-11-12](https://discord.com/channels/1186424376300679209/1294891368505937952/1305950003390316584) [[2] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[3] Manage API Keys](https://docs.retellai.com/accounts/manage-api-keys) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the feedback, glad I was helpful.
c
@AI Evy Webhook Configuration: Is a webhook URL configured in your Retell dashboard? The URL should be: https://togxiyvqacvtcjrzeqna.supabase.co/functions/v1/retell-call-webhook Are all events enabled: call_started, call_ended, call_analyzed? Call Recording & Transcription: Is call recording enabled for your agents in Retell? Is post-call analysis enabled (for transcription and summaries)? Check the agent settings in Retell dashboard → Does it show "Recording: Enabled"? API Response: When you make a test call via the "Call Now" button, does Retell's dashboard show the call? What is the call status in Retell's dashboard after the call ends?
a
Thanks for the follow-up, @clientnexus_71205. I'll get back to you soon.
Copy code
json
{
  "post_call_analysis_data": [
    {
      "type": "string",
      "name": "customer_name",
      "description": "The name of the customer.",
      "examples": ["John Doe", "Jane Smith"]
    }
  ],
  "post_call_analysis_model": "gpt-4o-mini"
}
The
call_analyzed
webhook event is triggered when call analysis is complete and includes the full
call_analysis
object [(1) ]() . --- API Response & Call Status 1. Checking Call Status via API You can retrieve call information using the Get Call endpoint [(4) ]() :
Copy code
javascript
import Retell from 'retell-sdk';

const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;

const callResponse = await client.call.retrieve('call_id_here') ;
console.log(callResponse.call_status) ;
2. Call Status Values The
call_status
field can have the following values [(5) ]() [(4) ]() : -
"registered"
- Call has been registered - Additional statuses are available after the call progresses [(4) ]() 3. Available Call Data After a call ends, you can access : -
transcript
- Transcription of the call -
recording_url
- Recording of the call -
recording_multi_channel_url
- Recording with each party's audio in separate channels -
call_analysis
- Post-call analysis including sentiment, summary, and custom data -
disconnection_reason
- The reason for call disconnection 4. Webhook Payload Example When
call_ended
is triggered, you'll receive a payload like this [(1) ]() :
### Answer Webhook Configuration 1. Webhook URL Setup You can register your webhook URL in two ways [(1) ]() [(2) ]() : Option 1: Account-level webhook - Set up through the system settings' webhooks tab for events related to any agent under your account [(2) ]() . Option 2: Agent-level webhook - Set up through the dashboard's agent detail page . Note: If an agent-level webhook is set, account-level webhooks will not be triggered for that agent . Your webhook URL ` should be configured in one of these locations . 2. Webhook Events Retell AI supports three webhook event types [(1) ]() : -
call_started
- Triggered when a new call begins -
call_ended
- Triggered when a call completes, transfers, or encounters an error -
call_analyzed
- Triggered when call analysis is complete Important: If the call did not connect (like
dial_failed
) , the
call_started
webhook event will not be triggered . However,
call_ended
and
call_analyzed
webhooks will still be triggered . 3. Webhook Behavior The webhook will
POST
the payload to your endpoint with a timeout of 10 seconds . If no success status (2xx) is received within 10 seconds, the webhook will be retried up to 3 times . Webhooks are triggered in order but are not blocking . --- Call Recording & Transcription 1. Recording Configuration Recording is controlled by the
data_storage_setting
field in your agent configuration [(3) ]() : -
"everything"
- Stores all data including transcripts, recordings, and logs - `"everything_except_p
ii"` - Stores data without PII when PII is detected -
"basic_attributes_only"
- Stores only basic attributes; no transcripts/recordings/logs The default value is
"everything"
. 2. Post-Call Analysis Post-call analysis is configured using the
post_call_analysis_data
field when creating or updating an agent . Example configuration:
Copy code
json
{
  "event": "call_ended",
  "call": {
    "call_type": "phone_call",
    "from_number": "+12137771234",
    "to_number": "+12137771235",
    "direction": "inbound",
    "call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
    "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
    "call_status": "registered",
    "metadata": {},
    "retell_llm_dynamic_variables": {
      "customer_name": "John Doe"
    },
    "start_timestamp": 1714608475945,
    "end_timestamp": 1714608491736,
    "disconnection_reason": "user_hangup",
    "transcript": "...",
    "opt_out_sensitive_data_storage": false
  }
}
--- Verification Steps To verify your setup: 1. Check webhook registration in your Retell dashboard (system settings or agent detail page) [(2) ]() 2. Verify all three events are enabled (
call_started
,
call_ended
,
call_analyzed
) [(1) ]() 3. Confirm
data_storage_setting
is not set to
"basic_attributes_only"
if you need recordings [(3) ]() 4. Test your webhook endpoint locally using the provided curl command [(2) ]() 5. Make a test call and check the Retell dashboard for call status 6. Verify webhook delivery by checking your endpoint logs for incoming POST requests [(1) ]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy how do i set up the account level webhook? im at the page i think you can see the screenshot right? but after i paste the webhook nothing happen https://cdn.discordapp.com/attachments/1443894177719910410/1444012122739572817/image.png?ex=692b2896&is=6929d716&hm=c5afb08a5623208e5f43be20d5956edb9e9a67ee5af8675817666f1acafaa60c&
a
Thanks for the follow-up, @clientnexus_71205. I'll get back to you soon.
2. Verify your webhook endpoint - Start a web call in the dashboard to verify the webhook is triggered correctly . Important webhook specifications: - The webhook will POST the payload to your endpoint with a timeout of 10 seconds [(2) ]() - If no success status (2xx) is received within 10 seconds, the webhook will be retried up to 3 times - Your endpoint needs to return a 204 status code to acknowledge receipt [(1) ]() Known Issue: There's a reported bug where webhook URLs may not save properly, especially when used together with conversation flow agents [(3) ]() . If you're experiencing this, the issue has been noted and may have been resolved . If the webhook still isn't saving after pasting, try: - Ensuring your URL is publicly accessible (not localhost) - Checking that your URL starts with ` - Verifying there are no trailing spaces in the URL field
### Answer Based on the setup guide, to configure an account-level webhook, you need to set it up through the system settings' webhooks tab for events related to any agent under your account [(1) ]() . After pasting your webhook URL, you should verify it's working by: 1. Testing your endpoint locally first - Before registering it in the dashboard, ensure your endpoint can accept POST requests . You can test with this curl command:
Copy code
bash
curl --location 'localhost:8080/webhook' \
--header 'Content-Type: application/json' \
--data '{
 "event": "call_ended",
 "call": {
 "call_type": "phone_call",
 "from_number": "+12137771234",
 "to_number": "+12137771235",
 "direction": "inbound",
 "call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
 "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
 "call_status": "registered",
 "metadata": {},
 "retell_llm_dynamic_variables": {
 "customer_name": "John Doe"
 },
 "start_timestamp": 1714608475945,
 "end_timestamp": 1714608491736,
 "disconnection_reason": "user_hangup",
 "transcript": "...",
 "opt_out_sensitive_data_storage": false
 }
}'
​ To learn more, see the sources I considered: [[1] Setup guide](https://docs.retellai.com/features/register-webhook) [[2] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[3] inbound webhook URL failing to save (or stay saved) and wont work together with conversation agaent](https://discord.com/channels/1186424376300679209/1398428473781125314) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy Hi, we’re preparing our calendar system to work with an AI agent that will check availability and book appointments through ETL. We need clarification on the following: What’s the recommended way to query availability for a specific user or resource? How should we send event creation requests (required fields, optional fields, timezones, buffers, durations)? How do you handle scheduling conflicts during event creation? Do you support multi-user calendars and multi-tenant environments? Should the AI check availability first or does your event-creation endpoint automatically validate conflicts? We want to align our architecture before implementing the logic.
a
Thanks for the follow-up, @clientnexus_71205. I'll get back to you soon.
### Answer --- ## Retell AI Calendar Integration Architecture Retell AI integrates with Cal.com to enable AI agents to check availability and book appointments [(1) ]() [(2) ]() [(3) ]() . Here's how to align your calendar system: ### 1. Querying Availability for Specific Users/Resources Retell AI uses Cal.com's Check Calendar Availability function to retrieve open time slots [(1) ]() [(3) ]() . To set this up: 1. Navigate to Cal.com and create an Event Type for your user/resource [(1) ]() 2. Obtain the Event Type ID from the URL (e.g.,
1427703
from ` 3. Get your Cal.com API Key from Settings → Developer → API Keys 4. Add the "Check Availability" function in Retell with these credentials [(1) ]() [(2) ]() The function checks availability based on pre-scheduled intervals that users can see [(2) ]() . ### 2. Event Creation Requests (Required Fields) To book appointments, Retell AI uses Cal.com's Book Appointment function [(1) ]() [(2) ]() [(3) ]() . Required setup: Required Fields: - Cal.com API Key [(1) ]() - Event Type ID - Email address (configured as
{{scheduling_email}}
) [(4) ](
90458808381) - Phone number (configured as
{{clinic_phone_number}}
) Timezone Handling: - Configure timezone in both the Cal.com function settings and the Cal.com platform itself [(2) ]() [(4) ]() - Use the
{{current_time}}
dynamic variable in your prompt before triggering availability check and book functions to avoid timezone conflicts [(4) ]() Duration: - Duration is determined by the Event Type configuration in Cal.com (e.g., 30-minute consultation calls) [(1) ]() ### 3. Handling Scheduling Conflicts Retell AI's integration automatically validates conflicts through Cal.com's availability checking [(1) ]() [(2) ]() [(3) ]() . The recommended flow is: 1. Check availability first using the
check_calendar_availability
function [(4) ]() 2. Present available slots to the user 3. Book the appointment only after confirming an available slot The system returns errors like
{"error":"Time range is in the past"}
when conflicts occur . ### 4. Multi-User Calendars and Multi-Tenant Support For managing multiple calendars (e.g., multiple closers with different calendars) , you have options [(5) ]() : Option 1: Cal.com Round Robin - Use Cal.com's built-in round robin feature Option 2: Multiple Calendar Functions - Set up distinct calendars in Cal.com for each user - Create separate "Check Availability" fu
nctions for each calendar [(6) ]() - Be very specific in your prompt about which calendar function to use Important: When using multiple check calendar functions, you must be explicit in your prompt about what to use as start and end times when calling the function . ### 5. Validation Flow: Check First or Auto-Validate? Recommended Flow: [(4) ]() 1. Always check availability first before booking 2. Use this prompt pattern:
Copy code
When user stated a time range, please check the calendar availability by calling the `check_calendar_availability` function and let user know whether that range work or not.
[(1) ]() 3. Include
{{current_time}}
in your prompt before both calendar functions to ensure accurate timezone handling [(4) ]() 4. After availability is confirmed, trigger the
book_appointment
function Why this matters: The booking endpoint does not automatically validate conflicts—you must check availability first to prevent booking errors . ### Architecture Alignment Recommendations 1. Timezone Synchronization: Ensure your calendar system's timezone matches both the Cal.com platform settings and the Retell AI function configuration [(2) ]() [(4) ]() 2. Multi-Turn Conversations: Retell AI's agents maintain context across multiple exchanges, allowing natural back-and-forth during scheduling [(7) ]() 3. Prompt Engineering: Be explicit about when to invoke calendar functions in your agent's prompt [(1) ]() [(8) ]() 4. Error Handling: Monitor for timezone-related errors where bookings occur on different days than requested—this typically indicates timezone misalignment [(4) ]() 5. State Management: For complex scheduling flows, consider using Multi-Prompt agents with separate states for qualification and booking [(9) ]() --- **
​ To learn more, see the sources I considered: [[1] Check Calendar Availability](https://docs.retellai.com/build/check-availability) [[2] AI Scheduling Assistant with Cal.com | Retell AI](https://www.retellai.com/blog/cal-coms-preset-tools) [[3] AI Appointment Scheduling with Voice AI Booking Assistant](https://www.retellai.com/features/book-appointments) [[4] Urgent: Cal.com Booked on different day - Potential Service Disruption with multiple issue.](https://discord.com/channels/1186424376300679209/1423174290458808381) [[5] Discord message from @67d3 on 2025-03-23](https://discord.com/channels/1186424376300679209/1294891368505937952/1353500621118115930) [[6] Multiple calendar availability functions?](https://discord.com/channels/1186424376300679209/1397338184739979395) [[7] Multi-Turn Conversation](https://www.retellai.com/glossary/multi-turn-conversation) [[8] 5 Useful Prompts for AI Agent Builders | Retell AI](https://www.retellai.com/blog/5-useful-prompts-for-building-ai-voice-agents-on-retell-ai) [[9] Single/Multi Prompt Agent Overview](https://docs.retellai.com/build/single-multi-prompt/prompt-overview) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy How does Retell know which eventTypeId to use? Should it be: Hardcoded per agent? Passed from agent configuration? Selected by AI based on conversation?
a
Thanks for the follow-up, @clientnexus_71205. I'll get back to you soon.
### Answer Based on the available sources, here's how Retell AI determines which
eventTypeId
to use: ## *Hardcoded per Agent (Current Default) * The Cal.com integration currently requires you to specify the Event Type ID during function setup/configuration [(1) ]() . This means: 1. When you add the "Check Calendar Availability" function in Retell, you must provide: - Cal.com API Key - Event Type ID - Tool description - (Optional) timezone 2. The Event Type ID is obtained from your Cal.com URL (e.g.,
1427703
from ` 3. This configuration is set at the agent level, meaning each agent's calendar function is tied to a specific Event Type ID ## Dynamic Selection Not Currently Supported According to community discussions, dynamic Event Type ID selection by the AI agent is not currently supported [(2) ]() . If you need the agent to dynamically specify different event type IDs (e.g., to check availability or book appointments to different calendars) , you would need to implement custom functions . ## Workaround for Multiple Calendars If you need to manage multiple calendars with different Event Type IDs, you have two options: 1. Create separate calendar functions for each Event Type ID, then use explicit prompt instructions to guide the agent on which function to use [(3) ]() 2. Implement custom functions with your own backend that can handle dynamic Event Type ID selection [(2) ]() The Cal.com integration implementation is not currently open-source , so for advanced use cases requiring dynamic variables as keys and
IDs, you'll need to build your own solution using custom functions . **
​ To learn more, see the sources I considered: [[1] Check Calendar Availability](https://docs.retellai.com/build/check-availability) [[2] cal.com Integration: Agent can specify event type id dynamically](https://discord.com/channels/1186424376300679209/1388617797491359915) [[3] My function in manual chat is working but not in test audio](https://discord.com/channels/1186424376300679209/1438648873299083327) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.