API reference
Agents
Create, duplicate and configure voice agents: their language, voice and model, their call flow, their after-call analysis and the webhook they report to.
/v1/agentsPOST/v1/agentsGET/v1/agents/{agentId}PATCH/v1/agents/{agentId}DELETE/v1/agents/{agentId}POST/v1/agents/{agentId}/duplicatePUT/v1/agents/{agentId}/webhookList agents
/v1/agentsList the agents of the authenticated tenant with pagination, optionally only those of one entity.
Authorization
AuthorizationstringrequiredBearer <API key>, a key created at app.callshift.ai/api-keys.
Query parameters
pageintegerlimitintegerentityIdstring<uuid>Return only the items of this entity. Send this or entityExternalId, not both.
entityExternalIdstringReturn only the items of the entity with this external id. Send this or entityId, not both.
Responses
Agents listed successfully
dataobject[]requiredShow child attributes
idstring<uuid>requirednamestringrequiredgenderenum<string>requiredFEMALEMALElanguageenum<string>requiredfrennlptesentityIdstring<uuid> | nullrequiredThe agent's entity, or null when the agent is shared.
pageCountnumberrequiredInvalid request
successenum<boolean>requiredfalseerrorobjectrequiredShow child attributes
nameenum<string>requiredZodErrorissuesobject[]requiredShow child attributes
codestringrequiredpathstring | number[]requiredmessagestringrequiredUnauthorized
errorstringrequiredEntity not found
errorstringrequiredInternal server error
errorstringrequiredcurl "https://api.callshift.ai/v1/agents?entityExternalId=club-42" \
-H "Authorization: Bearer $CALLSHIFT_API_KEY"const res = await fetch("https://api.callshift.ai/v1/agents?entityExternalId=club-42", {
headers: {
Authorization: `Bearer ${process.env.CALLSHIFT_API_KEY}`,
},
});
const data = await res.json();import os
import requests
res = requests.get(
"https://api.callshift.ai/v1/agents?entityExternalId=club-42",
headers={"Authorization": f"Bearer {os.environ['CALLSHIFT_API_KEY']}"},
)
print(res.json()){
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Alice",
"gender": "FEMALE",
"language": "en",
"entityId": null
}
],
"pageCount": 3
}{
"success": false,
"error": {
"name": "ZodError",
"issues": [
{
"code": "invalid_enum_value",
"path": [
"contacts",
0,
"email"
],
"message": "Invalid email"
}
]
}
}{
"error": "Authentication error"
}{
"error": "Entity not found"
}{
"error": "Internal server error"
}Create a new agent
/v1/agentsCreate a new agent from scratch for the authenticated tenant.
Authorization
AuthorizationstringrequiredBearer <API key>, a key created at app.callshift.ai/api-keys.
Body application/json
namestringrequiredgenderenum<string>requiredFEMALEMALElanguageenum<string>requiredfrennlptesbackgroundSoundenum<string> | nullAmbience played under the call, or null for none.
office_ambiencecity_ambienceforest_ambiencecrowded_roomkeyboard_typingkeyboard_typing2hold_musicgym_ambiencebackgroundSoundVolumenumber | nullVolume of the background sound, from 0 to 1. null uses the default of 0.2.
silenceTimeoutSecondsinteger | nullSeconds of caller silence before the agent hangs up, from 5 to 120. null uses the default of 25.
maxDurationSecondsinteger | nullMaximum length of a call, in seconds, from 60 to 3600. The call then ends with endedReason max-duration-exceeded. null uses the default of 420.
providerstringModel provider: google, openai or xai. Defaults to google on create.
modelstringRealtime (speech-to-speech) models: gemini-3.8-live, gemini-live-3.1-flash (google), gpt-realtime-2.1-mini, gpt-live-1 (openai), grok-voice-3.0 (xai). Pipeline models: gpt-4o-mini, gpt-4o, gpt-4.1-mini, gpt-5-mini, gpt-5.4-mini (openai). Defaults to gemini-live-3.1-flash on create.
voiceIdstringtemperaturenumbermaxTokensnumberminEndpointingDelaynumber | nullMinimum time, in seconds, the agent waits after the caller stops speaking before answering, from 0.3 to 2.5. Raise it if callers get cut off mid-sentence (with a slow STT like Azure, try 0.9). Higher values slow every reply. Only applies to pipeline models. null uses the default.
summaryPromptstring | nullevaluationPromptstring | nullinformationToCollectobject[]Show child attributes
idstringrequirednamestringrequiredtypeenum<string>requiredstringnumberbooleanenumdescriptionstringenumValuesstring[]diagramobjectThe conversation flow. knowHow node prompts are HTML. A tool (see GET /v1/tools) is attached to the agent by referencing it in a prompt with a <tool-node> element:
<tool-node functionname="checkOrder" category="custom" toolslug="" toolid="550e8400-e29b-41d4-a716-446655440000">Use checkOrder to look up the caller's order.</tool-node>
functionnameis the camelCase form of the tool name (Check order→checkOrder). The tool is resolved by this name, so renaming a tool detaches it from the agents that reference it until their prompts are updated.categoryiscustomorqueryfor those types,notificationsforsendSmsandsendEmail.toolidis the tool id. A diagram whose tool node matches no tool of the account by bothtoolidandfunctionnameis refused (422).- The element's text is the instruction the agent reads.
Transferring the call, handing over to another agent and ending the call are nodes (forwardCall, forwardAgent, endCall), not tools.
A forwardCall node with destinationType: "lookup" has no forwardingPhoneNumber: during the call, its lookupUrl receives the same request as a custom tool (with the arguments lookupParameters describes) and answers { "number": "+33…", "message"?, "context"? } or { "error": "…", "context"? } within 5 seconds. The number must be in the country of the line the call is on. The node becomes a tool named after the camelCase of its title, which no other tool of the agent may share (422). Agents on the current voice engine only: the others leave the node out.
Show child attributes
nodesobject[]requiredShow the variants
idstringrequiredtypeenum<string>requiredstartCallpositionobjectrequiredShow child attributes
xnumberrequiredynumberrequireddataobjectrequiredShow child attributes
briefstringrequiredwelcomeMessagestringrequiredoutboundobjectShow child attributes
voiceMailEnabledbooleanvoiceMailMessagestringrequiredvoiceMailExpectedDurationnumbervoiceMailProviderenum<string>googleopenaiwelcomeMessagestringrequiredfirstMessageModeenum<string>assistant-speaks-firstassistant-waits-for-userassistant-speaks-first-with-model-generated-messagepauseBeforeSpeakingSecondsnumberidstringrequiredtypeenum<string>requiredendCallpositionobjectrequiredShow child attributes
xnumberrequiredynumberrequireddataobjectrequiredShow child attributes
endCallMessagestringrequiredidstringrequiredtypeenum<string>requiredknowHowpositionobjectrequiredShow child attributes
xnumberrequiredynumberrequireddataobjectrequiredShow child attributes
titlestringrequiredpromptstringrequiredidstringrequiredtypeenum<string>requiredforwardAgentpositionobjectrequiredShow child attributes
xnumberrequiredynumberrequireddataobjectrequiredShow child attributes
agentIdstringrequiredmessagestringrequireddescriptionstringrequiredidstringrequiredtypeenum<string>requiredforwardCallpositionobjectrequiredShow child attributes
xnumberrequiredynumberrequireddataobjectrequiredShow the variants
titlestringrequiredpromptstringrequiredforwardingMessagestringrequireddestinationTypeenum<string>fixedlookupforwardingPhoneNumberstringlookupUrlstringlookupMessagestringlookupParametersobjectShow child attributes
typeenum<string>requiredobjectpropertiesobjectrequiredrequiredstring[]holdMusicenum<string>defaultcalmcustomholdMusicUrlstring<uri> | enum<string>humanDetectionEnabledbooleanhumanDetectionTimeoutnumberwhisperMessagestringthreeWayIntroductionstringtransferTimeoutnumberfallbackMessagestringtransferModeenum<string>requiredcoldgreetingMessagestringtitlestringrequiredpromptstringrequiredforwardingMessagestringrequireddestinationTypeenum<string>fixedlookupforwardingPhoneNumberstringlookupUrlstringlookupMessagestringlookupParametersobjectShow child attributes
typeenum<string>requiredobjectpropertiesobjectrequiredrequiredstring[]holdMusicenum<string>defaultcalmcustomholdMusicUrlstring<uri> | enum<string>humanDetectionEnabledbooleanhumanDetectionTimeoutnumberwhisperMessagestringthreeWayIntroductionstringtransferTimeoutnumberfallbackMessagestringtransferModeenum<string>requiredwarmgreetingMessagestringrequirededgesobject[]requiredShow child attributes
idstringrequiredsourcestringrequiredtargetstringrequireddataobjectShow child attributes
conditionenum<string>requiredisExistingContactnotExistingContactnotNewCallerisNewCallerinboundOnlyoutboundOnlyentityIdstring<uuid> | nullThe entity the item belongs to, or null to make it shared. Send this or entityExternalId, not both.
entityExternalIdstring | nullYour external id of the entity the item belongs to, or null to make it shared. Send this or entityId, not both.
Responses
Agent created successfully
idstring<uuid>requiredInvalid request payload
successenum<boolean>requiredfalseerrorobjectrequiredShow child attributes
nameenum<string>requiredZodErrorissuesobject[]requiredShow child attributes
codestringrequiredpathstring | number[]requiredmessagestringrequiredUnauthorized
errorstringrequiredEntity not found
errorstringrequiredThe diagram references a tool that does not exist, or names a looked-up forwardCall node like another tool
errorstringrequiredInternal server error
errorstringrequiredcurl -X POST "https://api.callshift.ai/v1/agents" \
-H "Authorization: Bearer $CALLSHIFT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Alice",
"gender": "FEMALE",
"language": "en",
"provider": "google",
"model": "gemini-live-3.1-flash",
"silenceTimeoutSeconds": 15,
"maxDurationSeconds": 600
}'const res = await fetch("https://api.callshift.ai/v1/agents", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CALLSHIFT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Alice",
"gender": "FEMALE",
"language": "en",
"provider": "google",
"model": "gemini-live-3.1-flash",
"silenceTimeoutSeconds": 15,
"maxDurationSeconds": 600
}),
});
const data = await res.json();import os
import requests
res = requests.post(
"https://api.callshift.ai/v1/agents",
headers={"Authorization": f"Bearer {os.environ['CALLSHIFT_API_KEY']}"},
json={
"name": "Alice",
"gender": "FEMALE",
"language": "en",
"provider": "google",
"model": "gemini-live-3.1-flash",
"silenceTimeoutSeconds": 15,
"maxDurationSeconds": 600,
},
)
print(res.json()){
"id": "550e8400-e29b-41d4-a716-446655440000"
}{
"success": false,
"error": {
"name": "ZodError",
"issues": [
{
"code": "invalid_enum_value",
"path": [
"contacts",
0,
"email"
],
"message": "Invalid email"
}
]
}
}{
"error": "Authentication error"
}{
"error": "Entity not found"
}{
"error": "The diagram references a tool that does not exist, or names a looked-up forwardCall node like another tool"
}{
"error": "Internal server error"
}Get agent details
/v1/agents/{agentId}Retrieve detailed information about a specific agent by ID.
Authorization
AuthorizationstringrequiredBearer <API key>, a key created at app.callshift.ai/api-keys.
Path parameters
agentIdstring<uuid>requiredResponses
Agent details retrieved successfully
idstring<uuid>requirednamestringrequiredgenderenum<string>requiredFEMALEMALElanguageenum<string>requiredfrennlptesentityIdstring<uuid> | nullrequiredThe agent's entity, or null when the agent is shared.
backgroundSoundenum<string> | nullrequiredoffice_ambiencecity_ambienceforest_ambiencecrowded_roomkeyboard_typingkeyboard_typing2hold_musicgym_ambiencebackgroundSoundVolumenumber | nullrequiredsilenceTimeoutSecondsinteger | nullrequiredmaxDurationSecondsinteger | nullrequiredproviderstringrequiredmodelstringrequiredtemperaturenumberrequiredmaxTokensnumberrequiredminEndpointingDelaynumber | nullrequiredsummaryPromptstring | nullrequiredevaluationPromptstring | nullrequiredinformationToCollectobject[] | nullrequiredShow child attributes
idstringrequirednamestringrequiredtypeenum<string>requiredstringnumberbooleanenumdescriptionstringenumValuesstring[]diagramobjectrequiredThe conversation flow. knowHow node prompts are HTML. A tool (see GET /v1/tools) is attached to the agent by referencing it in a prompt with a <tool-node> element:
<tool-node functionname="checkOrder" category="custom" toolslug="" toolid="550e8400-e29b-41d4-a716-446655440000">Use checkOrder to look up the caller's order.</tool-node>
functionnameis the camelCase form of the tool name (Check order→checkOrder). The tool is resolved by this name, so renaming a tool detaches it from the agents that reference it until their prompts are updated.categoryiscustomorqueryfor those types,notificationsforsendSmsandsendEmail.toolidis the tool id. A diagram whose tool node matches no tool of the account by bothtoolidandfunctionnameis refused (422).- The element's text is the instruction the agent reads.
Transferring the call, handing over to another agent and ending the call are nodes (forwardCall, forwardAgent, endCall), not tools.
A forwardCall node with destinationType: "lookup" has no forwardingPhoneNumber: during the call, its lookupUrl receives the same request as a custom tool (with the arguments lookupParameters describes) and answers { "number": "+33…", "message"?, "context"? } or { "error": "…", "context"? } within 5 seconds. The number must be in the country of the line the call is on. The node becomes a tool named after the camelCase of its title, which no other tool of the agent may share (422). Agents on the current voice engine only: the others leave the node out.
Show child attributes
nodesobject[]requiredShow the variants
idstringrequiredtypeenum<string>requiredstartCallpositionobjectrequiredShow child attributes
xnumberrequiredynumberrequireddataobjectrequiredShow child attributes
briefstringrequiredwelcomeMessagestringrequiredoutboundobjectShow child attributes
voiceMailEnabledbooleanvoiceMailMessagestringrequiredvoiceMailExpectedDurationnumbervoiceMailProviderenum<string>googleopenaiwelcomeMessagestringrequiredfirstMessageModeenum<string>assistant-speaks-firstassistant-waits-for-userassistant-speaks-first-with-model-generated-messagepauseBeforeSpeakingSecondsnumberidstringrequiredtypeenum<string>requiredendCallpositionobjectrequiredShow child attributes
xnumberrequiredynumberrequireddataobjectrequiredShow child attributes
endCallMessagestringrequiredidstringrequiredtypeenum<string>requiredknowHowpositionobjectrequiredShow child attributes
xnumberrequiredynumberrequireddataobjectrequiredShow child attributes
titlestringrequiredpromptstringrequiredidstringrequiredtypeenum<string>requiredforwardAgentpositionobjectrequiredShow child attributes
xnumberrequiredynumberrequireddataobjectrequiredShow child attributes
agentIdstringrequiredmessagestringrequireddescriptionstringrequiredidstringrequiredtypeenum<string>requiredforwardCallpositionobjectrequiredShow child attributes
xnumberrequiredynumberrequireddataobjectrequiredShow the variants
titlestringrequiredpromptstringrequiredforwardingMessagestringrequireddestinationTypeenum<string>fixedlookupforwardingPhoneNumberstringlookupUrlstringlookupMessagestringlookupParametersobjectShow child attributes
typeenum<string>requiredobjectpropertiesobjectrequiredrequiredstring[]holdMusicenum<string>defaultcalmcustomholdMusicUrlstring<uri> | enum<string>humanDetectionEnabledbooleanhumanDetectionTimeoutnumberwhisperMessagestringthreeWayIntroductionstringtransferTimeoutnumberfallbackMessagestringtransferModeenum<string>requiredcoldgreetingMessagestringtitlestringrequiredpromptstringrequiredforwardingMessagestringrequireddestinationTypeenum<string>fixedlookupforwardingPhoneNumberstringlookupUrlstringlookupMessagestringlookupParametersobjectShow child attributes
typeenum<string>requiredobjectpropertiesobjectrequiredrequiredstring[]holdMusicenum<string>defaultcalmcustomholdMusicUrlstring<uri> | enum<string>humanDetectionEnabledbooleanhumanDetectionTimeoutnumberwhisperMessagestringthreeWayIntroductionstringtransferTimeoutnumberfallbackMessagestringtransferModeenum<string>requiredwarmgreetingMessagestringrequirededgesobject[]requiredShow child attributes
idstringrequiredsourcestringrequiredtargetstringrequireddataobjectShow child attributes
conditionenum<string>requiredisExistingContactnotExistingContactnotNewCallerisNewCallerinboundOnlyoutboundOnlywebhookobject | nullrequiredAfter-call automation webhook settings, or null when never configured.
Show child attributes
enabledbooleanrequiredwebhookIdstring<uuid>toolsobject[]requiredTools referenced by the agent's diagram prompts (read-only: attach or detach a tool through diagram).
Show child attributes
idstring<uuid>requiredtypeenum<string>requiredcustomquerysendSmssendEmailnamestringrequiredUnauthorized
errorstringrequiredAgent not found
errorstringrequiredInternal server error
errorstringrequiredcurl "https://api.callshift.ai/v1/agents/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer $CALLSHIFT_API_KEY"const res = await fetch("https://api.callshift.ai/v1/agents/550e8400-e29b-41d4-a716-446655440000", {
headers: {
Authorization: `Bearer ${process.env.CALLSHIFT_API_KEY}`,
},
});
const data = await res.json();import os
import requests
res = requests.get(
"https://api.callshift.ai/v1/agents/550e8400-e29b-41d4-a716-446655440000",
headers={"Authorization": f"Bearer {os.environ['CALLSHIFT_API_KEY']}"},
)
print(res.json()){
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Alice",
"gender": "FEMALE",
"language": "en",
"entityId": null,
"backgroundSound": "office_ambience",
"backgroundSoundVolume": null,
"silenceTimeoutSeconds": null,
"maxDurationSeconds": null,
"provider": "google",
"model": "gemini-live-3.1-flash",
"temperature": 1,
"maxTokens": 1500,
"minEndpointingDelay": null,
"summaryPrompt": null,
"evaluationPrompt": null,
"informationToCollect": [
{
"id": "visit",
"name": "Visit booked",
"type": "boolean",
"description": "Did the caller book a visit?"
},
{
"id": "day",
"name": "Preferred day",
"type": "enum",
"enumValues": [
"Weekday",
"Weekend"
]
}
],
"diagram": {
"nodes": [
{
"id": "start",
"type": "startCall",
"position": {
"x": 0,
"y": 0
},
"data": {
"brief": "<p>You are Alice, the receptionist of Club Lyon Part-Dieu.</p>",
"welcomeMessage": "Hello, this is Alice, the AI assistant of Club Lyon Part-Dieu. How can I help?"
}
},
{
"id": "hours",
"type": "knowHow",
"position": {
"x": 0,
"y": 160
},
"data": {
"title": "Opening hours",
"prompt": "<p>The club is open every day from 6am to 11pm.</p>"
}
},
{
"id": "end",
"type": "endCall",
"position": {
"x": 0,
"y": 320
},
"data": {
"endCallMessage": "Thank you for calling. Have a good day!"
}
}
],
"edges": [
{
"id": "e1",
"source": "start",
"target": "hours"
},
{
"id": "e2",
"source": "hours",
"target": "end"
}
]
},
"webhook": {
"enabled": true,
"webhookId": "550e8400-e29b-41d4-a716-446655440000"
},
"tools": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"type": "custom",
"name": "Check order"
}
]
}{
"error": "Authentication error"
}{
"error": "Agent not found"
}{
"error": "Internal server error"
}Partially update an agent's settings
/v1/agents/{agentId}Apply updates to the agent's fields, such as name, language, model, temperature, summary/evaluation prompts, information to collect, and diagram.
Authorization
AuthorizationstringrequiredBearer <API key>, a key created at app.callshift.ai/api-keys.
Path parameters
agentIdstring<uuid>requiredBody application/json
namestringgenderenum<string>FEMALEMALElanguageenum<string>frennlptesbackgroundSoundenum<string> | nullAmbience played under the call, or null for none.
office_ambiencecity_ambienceforest_ambiencecrowded_roomkeyboard_typingkeyboard_typing2hold_musicgym_ambiencebackgroundSoundVolumenumber | nullVolume of the background sound, from 0 to 1. null uses the default of 0.2.
silenceTimeoutSecondsinteger | nullSeconds of caller silence before the agent hangs up, from 5 to 120. null uses the default of 25.
maxDurationSecondsinteger | nullMaximum length of a call, in seconds, from 60 to 3600. The call then ends with endedReason max-duration-exceeded. null uses the default of 420.
providerstringModel provider: google, openai or xai. Defaults to google on create.
modelstringRealtime (speech-to-speech) models: gemini-3.8-live, gemini-live-3.1-flash (google), gpt-realtime-2.1-mini, gpt-live-1 (openai), grok-voice-3.0 (xai). Pipeline models: gpt-4o-mini, gpt-4o, gpt-4.1-mini, gpt-5-mini, gpt-5.4-mini (openai). Defaults to gemini-live-3.1-flash on create.
voiceIdstringtemperaturenumbermaxTokensnumberminEndpointingDelaynumber | nullMinimum time, in seconds, the agent waits after the caller stops speaking before answering, from 0.3 to 2.5. Raise it if callers get cut off mid-sentence (with a slow STT like Azure, try 0.9). Higher values slow every reply. Only applies to pipeline models. null uses the default.
summaryPromptstring | nullevaluationPromptstring | nullinformationToCollectobject[]Show child attributes
idstringrequirednamestringrequiredtypeenum<string>requiredstringnumberbooleanenumdescriptionstringenumValuesstring[]diagramobjectThe conversation flow. knowHow node prompts are HTML. A tool (see GET /v1/tools) is attached to the agent by referencing it in a prompt with a <tool-node> element:
<tool-node functionname="checkOrder" category="custom" toolslug="" toolid="550e8400-e29b-41d4-a716-446655440000">Use checkOrder to look up the caller's order.</tool-node>
functionnameis the camelCase form of the tool name (Check order→checkOrder). The tool is resolved by this name, so renaming a tool detaches it from the agents that reference it until their prompts are updated.categoryiscustomorqueryfor those types,notificationsforsendSmsandsendEmail.toolidis the tool id. A diagram whose tool node matches no tool of the account by bothtoolidandfunctionnameis refused (422).- The element's text is the instruction the agent reads.
Transferring the call, handing over to another agent and ending the call are nodes (forwardCall, forwardAgent, endCall), not tools.
A forwardCall node with destinationType: "lookup" has no forwardingPhoneNumber: during the call, its lookupUrl receives the same request as a custom tool (with the arguments lookupParameters describes) and answers { "number": "+33…", "message"?, "context"? } or { "error": "…", "context"? } within 5 seconds. The number must be in the country of the line the call is on. The node becomes a tool named after the camelCase of its title, which no other tool of the agent may share (422). Agents on the current voice engine only: the others leave the node out.
Show child attributes
nodesobject[]requiredShow the variants
idstringrequiredtypeenum<string>requiredstartCallpositionobjectrequiredShow child attributes
xnumberrequiredynumberrequireddataobjectrequiredShow child attributes
briefstringrequiredwelcomeMessagestringrequiredoutboundobjectShow child attributes
voiceMailEnabledbooleanvoiceMailMessagestringrequiredvoiceMailExpectedDurationnumbervoiceMailProviderenum<string>googleopenaiwelcomeMessagestringrequiredfirstMessageModeenum<string>assistant-speaks-firstassistant-waits-for-userassistant-speaks-first-with-model-generated-messagepauseBeforeSpeakingSecondsnumberidstringrequiredtypeenum<string>requiredendCallpositionobjectrequiredShow child attributes
xnumberrequiredynumberrequireddataobjectrequiredShow child attributes
endCallMessagestringrequiredidstringrequiredtypeenum<string>requiredknowHowpositionobjectrequiredShow child attributes
xnumberrequiredynumberrequireddataobjectrequiredShow child attributes
titlestringrequiredpromptstringrequiredidstringrequiredtypeenum<string>requiredforwardAgentpositionobjectrequiredShow child attributes
xnumberrequiredynumberrequireddataobjectrequiredShow child attributes
agentIdstringrequiredmessagestringrequireddescriptionstringrequiredidstringrequiredtypeenum<string>requiredforwardCallpositionobjectrequiredShow child attributes
xnumberrequiredynumberrequireddataobjectrequiredShow the variants
titlestringrequiredpromptstringrequiredforwardingMessagestringrequireddestinationTypeenum<string>fixedlookupforwardingPhoneNumberstringlookupUrlstringlookupMessagestringlookupParametersobjectShow child attributes
typeenum<string>requiredobjectpropertiesobjectrequiredrequiredstring[]holdMusicenum<string>defaultcalmcustomholdMusicUrlstring<uri> | enum<string>humanDetectionEnabledbooleanhumanDetectionTimeoutnumberwhisperMessagestringthreeWayIntroductionstringtransferTimeoutnumberfallbackMessagestringtransferModeenum<string>requiredcoldgreetingMessagestringtitlestringrequiredpromptstringrequiredforwardingMessagestringrequireddestinationTypeenum<string>fixedlookupforwardingPhoneNumberstringlookupUrlstringlookupMessagestringlookupParametersobjectShow child attributes
typeenum<string>requiredobjectpropertiesobjectrequiredrequiredstring[]holdMusicenum<string>defaultcalmcustomholdMusicUrlstring<uri> | enum<string>humanDetectionEnabledbooleanhumanDetectionTimeoutnumberwhisperMessagestringthreeWayIntroductionstringtransferTimeoutnumberfallbackMessagestringtransferModeenum<string>requiredwarmgreetingMessagestringrequirededgesobject[]requiredShow child attributes
idstringrequiredsourcestringrequiredtargetstringrequireddataobjectShow child attributes
conditionenum<string>requiredisExistingContactnotExistingContactnotNewCallerisNewCallerinboundOnlyoutboundOnlyentityIdstring<uuid> | nullThe entity the item belongs to, or null to make it shared. Send this or entityExternalId, not both.
entityExternalIdstring | nullYour external id of the entity the item belongs to, or null to make it shared. Send this or entityId, not both.
Responses
Agent updated successfully.
successenum<boolean>requiredtrueInvalid request parameters or payload
successenum<boolean>requiredfalseerrorobjectrequiredShow child attributes
nameenum<string>requiredZodErrorissuesobject[]requiredShow child attributes
codestringrequiredpathstring | number[]requiredmessagestringrequiredUnauthorized
errorstringrequiredAgent or entity not found
errorstringrequiredThe change would link items of two different entities. The error names them.
errorstringrequiredThe diagram references a tool that does not exist, or names a looked-up forwardCall node like another tool
errorstringrequiredInternal server error
errorstringrequiredcurl -X PATCH "https://api.callshift.ai/v1/agents/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer $CALLSHIFT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Alice",
"temperature": 0.7,
"maxDurationSeconds": 600
}'const res = await fetch("https://api.callshift.ai/v1/agents/550e8400-e29b-41d4-a716-446655440000", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.CALLSHIFT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Alice",
"temperature": 0.7,
"maxDurationSeconds": 600
}),
});
const data = await res.json();import os
import requests
res = requests.patch(
"https://api.callshift.ai/v1/agents/550e8400-e29b-41d4-a716-446655440000",
headers={"Authorization": f"Bearer {os.environ['CALLSHIFT_API_KEY']}"},
json={
"name": "Alice",
"temperature": 0.7,
"maxDurationSeconds": 600,
},
)
print(res.json()){
"success": true
}{
"success": false,
"error": {
"name": "ZodError",
"issues": [
{
"code": "invalid_enum_value",
"path": [
"contacts",
0,
"email"
],
"message": "Invalid email"
}
]
}
}{
"error": "Authentication error"
}{
"error": "Agent or entity not found"
}{
"error": "The change would link items of two different entities. The error names them"
}{
"error": "The diagram references a tool that does not exist, or names a looked-up forwardCall node like another tool"
}{
"error": "Internal server error"
}Delete an agent
/v1/agents/{agentId}Soft-delete an agent by ID and release its assigned phone numbers.
Authorization
AuthorizationstringrequiredBearer <API key>, a key created at app.callshift.ai/api-keys.
Path parameters
agentIdstring<uuid>requiredResponses
Agent deleted successfully
No content.
Unauthorized
errorstringrequiredAgent not found
errorstringrequiredInternal server error
errorstringrequiredcurl -X DELETE "https://api.callshift.ai/v1/agents/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer $CALLSHIFT_API_KEY"const res = await fetch("https://api.callshift.ai/v1/agents/550e8400-e29b-41d4-a716-446655440000", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.CALLSHIFT_API_KEY}`,
},
});
console.log(res.status); // 204import os
import requests
res = requests.delete(
"https://api.callshift.ai/v1/agents/550e8400-e29b-41d4-a716-446655440000",
headers={"Authorization": f"Bearer {os.environ['CALLSHIFT_API_KEY']}"},
)
print(res.status_code) # 204No content{
"error": "Authentication error"
}{
"error": "Agent not found"
}{
"error": "Internal server error"
}Duplicate agent
/v1/agents/{agentId}/duplicateDuplicate an existing agent for the authenticated tenant. The copy stays in the source agent's entity unless the body names another one, or null for shared. A copy into another entity is refused while the source sends its after-call data to a webhook of its entity.
Authorization
AuthorizationstringrequiredBearer <API key>, a key created at app.callshift.ai/api-keys.
Path parameters
agentIdstring<uuid>requiredBody application/json
Omit both fields to keep the copy in the source agent's entity.
entityIdstring<uuid> | nullThe entity the item belongs to, or null to make it shared. Send this or entityExternalId, not both.
entityExternalIdstring | nullYour external id of the entity the item belongs to, or null to make it shared. Send this or entityId, not both.
Responses
Agent duplicated successfully
idstring<uuid>requiredInvalid request payload
successenum<boolean>requiredfalseerrorobjectrequiredShow child attributes
nameenum<string>requiredZodErrorissuesobject[]requiredShow child attributes
codestringrequiredpathstring | number[]requiredmessagestringrequiredUnauthorized
errorstringrequiredAgent or entity not found
errorstringrequiredThe change would link items of two different entities. The error names them.
errorstringrequiredInternal server error
errorstringrequiredcurl -X POST "https://api.callshift.ai/v1/agents/550e8400-e29b-41d4-a716-446655440000/duplicate" \
-H "Authorization: Bearer $CALLSHIFT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entityExternalId": "club-42"
}'const res = await fetch("https://api.callshift.ai/v1/agents/550e8400-e29b-41d4-a716-446655440000/duplicate", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CALLSHIFT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"entityExternalId": "club-42"
}),
});
const data = await res.json();import os
import requests
res = requests.post(
"https://api.callshift.ai/v1/agents/550e8400-e29b-41d4-a716-446655440000/duplicate",
headers={"Authorization": f"Bearer {os.environ['CALLSHIFT_API_KEY']}"},
json={
"entityExternalId": "club-42",
},
)
print(res.json()){
"id": "550e8400-e29b-41d4-a716-446655440000"
}{
"success": false,
"error": {
"name": "ZodError",
"issues": [
{
"code": "invalid_enum_value",
"path": [
"contacts",
0,
"email"
],
"message": "Invalid email"
}
]
}
}{
"error": "Authentication error"
}{
"error": "Agent or entity not found"
}{
"error": "The change would link items of two different entities. The error names them"
}{
"error": "Internal server error"
}Assign an after-call webhook to an agent
/v1/agents/{agentId}/webhookEnable the agent's after-call automation webhook and point it at one of the tenant's webhooks, or disable it. A webhook of another entity than the agent's is refused. Other notification settings (SMS, Slack) are left untouched.
Authorization
AuthorizationstringrequiredBearer <API key>, a key created at app.callshift.ai/api-keys.
Path parameters
agentIdstring<uuid>requiredBody application/json
enabledenum<boolean>requiredtruewebhookIdstring<uuid>requiredenabledenum<boolean>requiredfalseResponses
Agent webhook settings updated successfully
webhookobject | nullrequiredAfter-call automation webhook settings, or null when never configured.
Show child attributes
enabledbooleanrequiredwebhookIdstring<uuid>Invalid request body
successenum<boolean>requiredfalseerrorobjectrequiredShow child attributes
nameenum<string>requiredZodErrorissuesobject[]requiredShow child attributes
codestringrequiredpathstring | number[]requiredmessagestringrequiredUnauthorized
errorstringrequiredAgent or webhook not found
errorstringrequiredThe change would link items of two different entities. The error names them.
errorstringrequiredInternal server error
errorstringrequiredcurl -X PUT "https://api.callshift.ai/v1/agents/550e8400-e29b-41d4-a716-446655440000/webhook" \
-H "Authorization: Bearer $CALLSHIFT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"webhookId": "550e8400-e29b-41d4-a716-446655440000"
}'const res = await fetch("https://api.callshift.ai/v1/agents/550e8400-e29b-41d4-a716-446655440000/webhook", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.CALLSHIFT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"enabled": true,
"webhookId": "550e8400-e29b-41d4-a716-446655440000"
}),
});
const data = await res.json();import os
import requests
res = requests.put(
"https://api.callshift.ai/v1/agents/550e8400-e29b-41d4-a716-446655440000/webhook",
headers={"Authorization": f"Bearer {os.environ['CALLSHIFT_API_KEY']}"},
json={
"enabled": True,
"webhookId": "550e8400-e29b-41d4-a716-446655440000",
},
)
print(res.json()){
"webhook": {
"enabled": true,
"webhookId": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"success": false,
"error": {
"name": "ZodError",
"issues": [
{
"code": "invalid_enum_value",
"path": [
"contacts",
0,
"email"
],
"message": "Invalid email"
}
]
}
}{
"error": "Authentication error"
}{
"error": "Agent or webhook not found"
}{
"error": "The change would link items of two different entities. The error names them"
}{
"error": "Internal server error"
}