Update an agent

Partially update an agent configuration in the authenticated business.

PATCH/api/external/v2/agents/:agent_id

Authentication

This endpoint authenticates with an API key via the X-API-Key header (ek_live_... format), instead of the bearer token used in the rest of the reference.

Path parameters

ParameterTypeRequiredDescription
agent_idString (UUID)RequiredUUID of the agent to update.

Request body

ParameterTypeRequiredDescription
agentObjectRequiredObject containing the agent fields to modify.
agent.prompt_configObjectOptionalStructured prompt configuration. Partially merged with the existing value.
agent.toolsObjectOptionalTool configuration. Partially merged with the existing value.
agent.activation_rulesObjectOptionalActivation or exit rules. Partially merged with the existing value.

Example request

bash
curl -X PATCH "https://eclectic-api-537143970188.us-central1.run.app/api/external/v2/agents/4b2f7a1e-0e88-4aa7-bf67-7d0a3e0f5b91" \
  -H "X-API-Key: ek_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "agent": {
      "prompt_config": {
        "tone_prompt": "Warm, direct and helpful."
      },
      "tools": {
        "handoff_to_human_control": {
          "enabled": true
        }
      }
    }
  }'

Example response

json
{
  "agent": {
    "id": "4b2f7a1e-0e88-4aa7-bf67-7d0a3e0f5b91",
    "name": "Support Agent",
    "type": "BASIC",
    "prompt_config": {
      "tone_prompt": "Warm, direct and helpful."
    },
    "tools": {
      "handoff_to_human_control": {
        "enabled": true,
        "instructions": "..."
      }
    }
  },
  "business_id": "2a4b8d4b-23fa-420a-94c2-cb9a4d2c7fb8"
}

Notes

  • JSON fields prompt_config, tools, data, activation_rules, follow_up_settings, and inactivity_run_settings are partially merged.
  • Null values are omitted before validation and save.
  • PUT is available and uses the same partial-update behavior as PATCH.