Edit an agent (any field or section)

PATCHhttps://server.heyrik.com/api/v1/agents/{id}

Path parameters

idRequired

Replace {id} in the request URL with the value for this resource.

Headers

AuthorizationstringRequired

Use Bearer $HEYRIK_API_KEY with an account-scoped API key. Keep the key on your server.

Get your API key

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_settingsobject

Swap the voice: { "voice_id": "<id from GET /voices>" } — a library voice or one of your clones.

configobject

Patch 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.

dataobject
Explore 3 properties
idstring

Example "agc_9f2a1c30"

greetingstring

Example "Thanks for calling Acme!"

updated_atstring

Example "2026-07-24T06:20:11.004Z"

Error reference
PATCH/agents/{id}
cURL
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"] }
    }
  }'
Response example
JSON
{
  "data": {
    "id": "agc_9f2a1c30",
    "greeting": "Thanks for calling Acme!",
    "updated_at": "2026-07-24T06:20:11.004Z"
  }
}

Illustrative examples · No live request is sent

Docs

Build sophisticated voice experiences with HeyRik.

© 2026 HeyRik · Support