Skip to Content
Agents

Update a version's after-call configuration

Permissionagents:updateAuthentication
PATCH
/agent-versions/{vid}/after-call

Updates only the fields you supply.

The version must be the active mutable draft — numbered, staging and production snapshots are immutable.

Active extraction and webhook references are validated in the same transaction.

Send summary_prompt as null or a blank string to restore the system prompt.

Which ETag to send

Supply the after-call ETag, not the parent agent aggregate ETag.

A changed configuration also advances the parent agent aggregate revision; Sonus-Agent-ETag returns the parent tag that subsequent lifecycle mutations need. A semantic no-op preserves both revision domains.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Path Parameters

vid*string
Formatuuid

Header Parameters

If-Match?string

Optional strong ETag (or *) from a prior response. A stale tag returns 412 without changing the resource.

Request Body

application/json
  1. body
Properties1 <= properties
summary_enabled?boolean
summary_prompt?|

Whitespace is trimmed. Send null or an empty string to restore the system-default summary prompt.

extraction_object_ids?array<>

Complete set of active extraction objects to attach. Send [] to clear all.

Itemsitems <= 100
webhook_config_ids?array<>

Complete set of non-archived webhook configurations to attach. Send [] to clear all.

Itemsitems <= 100

Response Body

Updated configuration, or the unchanged representation for a semantic no-op.

application/json
  1. response

Complete after-call behavior for one agent version. Nullable fields are always present. A virtual default has id, summary_prompt, created_at, and updated_at set to null and version 0.

id*|

Persisted configuration ID, or null when the response is a virtual default.

agent_version_id*string
Formatuuid
summary_enabled*boolean
summary_prompt*|

Custom summary prompt, or null to use the system default.

extraction_object_ids*array<>
webhook_config_ids*array<>
version*integer

Strong resource version. Zero is reserved for a virtual default; persisted configurations start at one.

Formatint64
Range0 <= value
created_at*|null
updated_at*|null
Example Request
curl -X PATCH 'https://api.kejue.co/v1/agent-versions/497f6eca-6276-4993-bfeb-53cbbbba6f08/after-call' \  -H 'Content-Type: application/json' \  -d '{  "summary_enabled": true,  "summary_prompt": "Summarize the caller'\''s issue, resolution, and promised follow-up without adding facts.",  "extraction_object_ids": [    "44444444-4444-4444-8444-444444444444"  ],  "webhook_config_ids": [    "55555555-5555-4555-8555-555555555555"  ]}'
Example Response
{  "id": "66666666-6666-4666-8666-666666666666",  "agent_version_id": "22222222-2222-4222-8222-222222222222",  "summary_enabled": true,  "summary_prompt": "Summarize the caller's issue, resolution, and promised follow-up without adding facts.",  "extraction_object_ids": [    "44444444-4444-4444-8444-444444444444"  ],  "webhook_config_ids": [    "55555555-5555-4555-8555-555555555555"  ],  "version": 1,  "created_at": "2026-07-20T09:10:00Z",  "updated_at": "2026-07-20T09:10:00Z"}