Update agent
PATCH/agents/{id}
Partial update — send only the fields you want to change. To clear assigned_phone_number_id send null.
Requires
Authorization: Bearer <api_key>. Create a key in the Inspra dashboard under Workspace Settings → API Keys.Path parameters
- idstringrequiredUUID of the resource.
Body application/json
- namestring1–40 charsoptionalHuman-readable agent name. 1-40 chars when present.
- descriptionstringoptionalOptional free-form notes.
- providerstringoptionalVoice agent runtime. Changing this after creation may invalidate provider-specific config keys.
vapiretellinspra - voice_providerstringoptionalText-to-speech engine.
elevenlabsdeepgramazureopenaicartesiagoogle_tts - model_providerstringoptionalLLM provider.
openaianthropicgooglegroqxai - transcriber_providerstringoptionalSpeech-to-text engine.
deepgramassemblyaiopenai - agent_directionstringoptionalPrimary calling direction.
inboundoutbound - allow_outboundbooleanoptionalFor inbound agents, when true outbound endpoints may select this agent.
- assigned_phone_number_idstringnullableoptionalUUID of a workspace phone number; null to unassign.
- configobjectoptionalProvider-agnostic agent configuration. Open object — only the commonly used fields are documented; additional provider-specific keys (e.g. VAPI custom_voice, transcriber_settings, knowledge_base) are accepted and round-tripped as-is. Mirrors the
configblock of createWorkspaceAgentSchema intypes/api.types.ts.8 fields
- system_promptstringoptionalThe agent's role and instructions, sent to the LLM as a system message at the start of every call. Plain text; supports template variables that get filled from the
variablesmap on place-call. - first_messagestringoptionalWhat the agent says first when it answers (inbound) or the call connects (outbound). Only used when
agent_speaks_firstis true for VAPI; other providers may ignore this. - agent_speaks_firstbooleanoptionalVAPI-only. When true, the agent opens the call by saying
first_message. When false, the agent waits for the caller to speak first. When omitted, the VAPI integration treats it as true (runtime convention; the field is not stored with a default, so GET responses show it as absent unless you set it explicitly). - voice_idstringoptionalProvider-specific voice identifier. Look up IDs in the voice provider's dashboard (e.g. ElevenLabs voice library, Cartesia voices, Azure neural voices). Must match the agent's
voice_provider. - voice_settingsobjectoptionalVoice synthesis tuning. All values are provider-specific; the listed ranges are validated by the API but each voice provider (ElevenLabs, Azure, Cartesia, etc.) applies its own mapping. Omitted fields fall back to the provider's defaults.
5 fields
- stabilitynumber0–1optionalElevenLabs-style stability. 0 = more variation/expressive, 1 = monotone/consistent. Defaults to the provider's preset when omitted.
- similarity_boostnumber0–1optionalElevenLabs-style adherence to the original voice clone. 0 = looser, 1 = stricter. Higher values can amplify clone artifacts.
- speednumber0.5–2optionalPlayback-rate multiplier. 1 = normal. 0.5 = half speed, 2 = double speed. Distinct from
speaking_rate(which targets the synthesis engine's own pacing). - pitchnumber-20–20optionalPitch offset in provider-specific units. 0 = unchanged. Negative = lower, positive = higher. ElevenLabs treats this as roughly semitone-scale; other providers map it differently.
- speaking_ratenumber0.25–4optionalAlternative pacing knob accepted by the API but not forwarded by the current VAPI or Retell integrations (only
speedis). Provided for forward-compatibility with providers that distinguish synthesis pacing from playback rate. 1 = normal.
- max_duration_secondsinteger60–3600optionalMaximum total call length in seconds. Hard cap is 1 hour (3600s). The agent ends the call automatically when this elapses.
- end_call_phrasesstring[]optionalPhrases the caller or agent can say to end the call gracefully (e.g. "goodbye", "thanks bye"). Provider-specific matching rules.
- toolsobject[]optionalFunction-calling tools the agent can invoke mid-call. Each item is a provider-specific tool definition (free-form to allow provider evolution). See the Inspra UI agent editor for the canonical shapes per provider.
Response 200 OK
Updated agent.
- idstringoptionalStable UUID of the agent within this workspace.
- workspace_idstringoptionalUUID of the owning workspace. Always matches the workspace bound to the API key.
- namestringoptionalHuman-readable agent name. 1-40 chars.
- descriptionstringnullableoptionalFree-form notes about the agent. Not shown to callers.
- providerstringoptionalVoice agent runtime.
vapi(Vapi.ai),retell(Retell AI), orinspra(native Inspra runtime). Determines which integration credentials and config keys apply.vapiretellinspra - is_activebooleannullableoptionalWhen false, the agent is hidden from selection lists and cannot place or receive calls.
- agent_directionstringnullableoptionalPrimary calling direction.
inboundreceives calls;outboundplaces calls (manual + campaign). An inbound agent can still place outbound calls whenallow_outboundis true.inboundoutbound - allow_outboundbooleannullableoptionalFor inbound agents, when true the agent may be selected by outbound endpoints (place call, campaigns).
- voice_providerstringnullableoptionalText-to-speech engine. One of
elevenlabs,deepgram,azure,openai,cartesia,google_tts. Must be one the workspace has credentials for. - model_providerstringnullableoptionalLLM provider for the conversation. One of
openai,anthropic,google,groq,xai. - transcriber_providerstringnullableoptionalSpeech-to-text engine. One of
deepgram,assemblyai,openai. - assigned_phone_number_idstringnullableoptionalUUID of a phone number from Workspace Settings → Phone Numbers. For inbound agents this is the number callers dial; for outbound agents (or
allow_outbound=true) it is the displayed caller ID. - sync_statusstringnullableoptionalLast known sync state with the upstream provider (e.g.
synced,pending,not_synced,error). Read-only; populated by the platform. - created_atstringnullableoptionalISO 8601 UTC timestamp when the agent was created.
- updated_atstringnullableoptionalISO 8601 UTC timestamp of the last update.
- configobjectoptionalProvider-agnostic agent configuration. Open object — only the commonly used fields are documented; additional provider-specific keys (e.g. VAPI custom_voice, transcriber_settings, knowledge_base) are accepted and round-tripped as-is. Mirrors the
configblock of createWorkspaceAgentSchema intypes/api.types.ts.8 fields
- system_promptstringoptionalThe agent's role and instructions, sent to the LLM as a system message at the start of every call. Plain text; supports template variables that get filled from the
variablesmap on place-call. - first_messagestringoptionalWhat the agent says first when it answers (inbound) or the call connects (outbound). Only used when
agent_speaks_firstis true for VAPI; other providers may ignore this. - agent_speaks_firstbooleanoptionalVAPI-only. When true, the agent opens the call by saying
first_message. When false, the agent waits for the caller to speak first. When omitted, the VAPI integration treats it as true (runtime convention; the field is not stored with a default, so GET responses show it as absent unless you set it explicitly). - voice_idstringoptionalProvider-specific voice identifier. Look up IDs in the voice provider's dashboard (e.g. ElevenLabs voice library, Cartesia voices, Azure neural voices). Must match the agent's
voice_provider. - voice_settingsobjectoptionalVoice synthesis tuning. All values are provider-specific; the listed ranges are validated by the API but each voice provider (ElevenLabs, Azure, Cartesia, etc.) applies its own mapping. Omitted fields fall back to the provider's defaults.
5 fields
- stabilitynumber0–1optionalElevenLabs-style stability. 0 = more variation/expressive, 1 = monotone/consistent. Defaults to the provider's preset when omitted.
- similarity_boostnumber0–1optionalElevenLabs-style adherence to the original voice clone. 0 = looser, 1 = stricter. Higher values can amplify clone artifacts.
- speednumber0.5–2optionalPlayback-rate multiplier. 1 = normal. 0.5 = half speed, 2 = double speed. Distinct from
speaking_rate(which targets the synthesis engine's own pacing). - pitchnumber-20–20optionalPitch offset in provider-specific units. 0 = unchanged. Negative = lower, positive = higher. ElevenLabs treats this as roughly semitone-scale; other providers map it differently.
- speaking_ratenumber0.25–4optionalAlternative pacing knob accepted by the API but not forwarded by the current VAPI or Retell integrations (only
speedis). Provided for forward-compatibility with providers that distinguish synthesis pacing from playback rate. 1 = normal.
- max_duration_secondsinteger60–3600optionalMaximum total call length in seconds. Hard cap is 1 hour (3600s). The agent ends the call automatically when this elapses.
- end_call_phrasesstring[]optionalPhrases the caller or agent can say to end the call gracefully (e.g. "goodbye", "thanks bye"). Provider-specific matching rules.
- toolsobject[]optionalFunction-calling tools the agent can invoke mid-call. Each item is a provider-specific tool definition (free-form to allow provider evolution). See the Inspra UI agent editor for the canonical shapes per provider.
Errors
- 400Bad RequestValidation failed / malformed request.
- 401UnauthorizedMissing, malformed, or invalid API key.
- 403ForbiddenWorkspace unavailable, suspended, or paywalled.
- 404Not FoundResource not found in this workspace.
- 429Too Many RequestsWorkspace request limit exceeded; shared across all its API keys.