Skip to main content
PATCH
/
agents
/
{agent_id}
Update Agent
curl --request PATCH \
  --url https://api.kejue.co/api/v1/agents/{agent_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "avatar": "<string>",
  "is_active": true,
  "memory_enabled": true,
  "call_settings": {
    "allowed_days": [
      0,
      1,
      2,
      3,
      4
    ],
    "auto_retry": true,
    "call_end_hour": 17,
    "call_start_hour": 9,
    "phone_assignment_mode": "local",
    "retry_schedule": [
      60,
      240
    ],
    "scoring_criteria": "Score 0-100 based on buying intent",
    "structured_data_schema": [
      {
        "description": "Stated budget range",
        "key": "budget"
      },
      {
        "description": "Decision timeline",
        "key": "timeline"
      }
    ],
    "tags": [
      {
        "description": "Contact expressed buying interest",
        "name": "Interested"
      },
      {
        "description": "Contact requested a follow-up call",
        "name": "Follow-up"
      }
    ]
  }
}
'
{
  "id": "<string>",
  "name": "<string>",
  "is_active": true,
  "memory_enabled": true,
  "description": "<string>",
  "call_settings": {
    "allowed_days": [
      0,
      1,
      2,
      3,
      4
    ],
    "auto_retry": true,
    "call_end_hour": 17,
    "call_start_hour": 9,
    "phone_assignment_mode": "local",
    "retry_schedule": [
      60,
      240
    ],
    "scoring_criteria": "Score 0-100 based on buying intent",
    "structured_data_schema": [
      {
        "description": "Stated budget range",
        "key": "budget"
      },
      {
        "description": "Decision timeline",
        "key": "timeline"
      }
    ],
    "tags": [
      {
        "description": "Contact expressed buying interest",
        "name": "Interested"
      },
      {
        "description": "Contact requested a follow-up call",
        "name": "Follow-up"
      }
    ]
  },
  "voice_configs": [
    {
      "id": "<string>",
      "name": "<string>",
      "language_locale": "<string>",
      "prompt": "<string>",
      "first_speaker": "<string>",
      "recording_enabled": true,
      "silence_timeout": 123,
      "max_duration": 123,
      "is_default": true,
      "is_active": true,
      "first_message": "<string>",
      "first_message_uninterruptible": false,
      "first_message_delay_ms": 123,
      "voice_id": "<string>",
      "voice_name": "<string>",
      "model": "<string>",
      "temperature": 123,
      "inactivity_messages": [
        {}
      ],
      "corpus_id": "<string>",
      "created_at": "<string>",
      "updated_at": "<string>"
    }
  ],
  "tools": [
    {
      "tool_name": "<string>",
      "channels": [
        "<string>"
      ],
      "config": {},
      "tool_id": "<string>"
    }
  ],
  "created_at": "<string>",
  "updated_at": "<string>"
}

Authorizations

X-API-Key
string
header
required

Workspace API key (e.g. kej_live_...)

Path Parameters

agent_id
string
required

Body

application/json

Partial update for an agent.

name
string | null
Required string length: 1 - 255
description
string | null
avatar
string | null
is_active
boolean | null
memory_enabled
boolean | null
call_settings
CallSettingsInput · object

Unified call settings -- controls call window, retry, scoring, tags, and post-call behavior.

Can be set at agent level or campaign level. Null fields inherit from the parent level. Hierarchy (lowest -> highest priority): System Defaults -> Workspace -> Agent -> Campaign -> API Override.

Example:
{
"allowed_days": [0, 1, 2, 3, 4],
"auto_retry": true,
"call_end_hour": 17,
"call_start_hour": 9,
"phone_assignment_mode": "local",
"retry_schedule": [60, 240],
"scoring_criteria": "Score 0-100 based on buying intent",
"structured_data_schema": [
{
"description": "Stated budget range",
"key": "budget"
},
{
"description": "Decision timeline",
"key": "timeline"
}
],
"tags": [
{
"description": "Contact expressed buying interest",
"name": "Interested"
},
{
"description": "Contact requested a follow-up call",
"name": "Follow-up"
}
]
}

Response

Successful Response

Full agent (persona) response (public-safe).

id
string
required
name
string
required
is_active
boolean
required
memory_enabled
boolean
required
description
string | null
call_settings
CallSettingsInput · object

Unified call settings -- controls call window, retry, scoring, tags, and post-call behavior.

Can be set at agent level or campaign level. Null fields inherit from the parent level. Hierarchy (lowest -> highest priority): System Defaults -> Workspace -> Agent -> Campaign -> API Override.

Example:
{
"allowed_days": [0, 1, 2, 3, 4],
"auto_retry": true,
"call_end_hour": 17,
"call_start_hour": 9,
"phone_assignment_mode": "local",
"retry_schedule": [60, 240],
"scoring_criteria": "Score 0-100 based on buying intent",
"structured_data_schema": [
{
"description": "Stated budget range",
"key": "budget"
},
{
"description": "Decision timeline",
"key": "timeline"
}
],
"tags": [
{
"description": "Contact expressed buying interest",
"name": "Interested"
},
{
"description": "Contact requested a follow-up call",
"name": "Follow-up"
}
]
}
voice_configs
VoiceConfigResponse · object[]
tools
AgentToolResponse · object[]
created_at
string | null
updated_at
string | null