Edit an agent (any field or section)
https://server.heyrik.com/api/v1/agents/{id}Path parameters
idRequiredReplace {id} in the request URL with the value for this resource.
Headers
AuthorizationstringRequiredUse Bearer $HEYRIK_API_KEY with an account-scoped API key. Keep the key on your server.
Parameters 4
Fields documented for this operation. See the request example for placement and structure.
name / greeting / language—Top-level fields — send just the ones you want to change.
config.prompt_sectionsobject[]Replace the Conversation Flow (the instruction sections). Send the FULL array you want the agent to have — it replaces the whole flow, so include the sections you're keeping.
voice_settingsobjectSwap the voice: { "voice_id": "<id from GET /voices>" } — a library voice or one of your clones.
configobjectPatch any other builder section — call_behavior, no_response, transfer, fillers, personality, extracted_variables. Deep-merged, so the KB and untouched sections are preserved.
Response
Explore the example values. This is not a complete response schema.
dataobjectExplore 3 properties
idstringExample "agc_9f2a1c30"
greetingstringExample "Thanks for calling Acme!"
updated_atstringExample "2026-07-24T06:20:11.004Z"
curl -X PATCH https://server.heyrik.com/api/v1/agents/agc_9f2a1c30 \
-H "Authorization: Bearer $HEYRIK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"voice_settings": { "voice_id": "vx_7b1e44a2" },
"config": {
"personality": "Friendly",
"prompt_sections": [
{ "order": 0, "enabled": true, "title": "Identity & Purpose",
"content": "- You are a warm real-estate qualification agent. Qualify the caller for a site visit." },
{ "order": 1, "enabled": true, "title": "Conversational Flow",
"content": "- Ask, one at a time: property type, budget, location, timeline." },
{ "order": 2, "enabled": true, "title": "Closing",
"content": "- Secure agreement to speak with a senior expert, thank them, and end the call." }
],
"call_behavior": { "max_call_duration_sec": 600, "end_call_phrases": ["bye", "done"] }
}
}'{
"data": {
"id": "agc_9f2a1c30",
"greeting": "Thanks for calling Acme!",
"updated_at": "2026-07-24T06:20:11.004Z"
}
}Illustrative examples · No live request is sent
