Create or update an agent
PUT
/agent/create_update_agentCreates the agent when it does not exist yet, and updates it when it does. This is the recommended way to write agent configuration.
Auth
Authentication required.
Parameters
No parameters.
Request body
| Required | Content-Type | Shape |
|---|---|---|
| Yes | application/json | CreateUpdateAgentRequest |
| Name | Type | Required | Description |
|---|---|---|---|
| bot_name | string | Yes | — |
| agent_data | object | No | Default {}. |
| voice_data | object | No | Default {}. |
| transfer | object | No | Default {}. |
| webhook | WebhookField | No | Default {}. |
| webhook.auth | WebhookAuth | null | No | — |
| webhook.auth.type | enum(none | bearer | jwt | api_key) | No | Default "none". |
| webhook.auth.source | string | null | No | — |
| webhook.auth.header_name | string | null | No | — |
| webhook.auth.scheme | string | null | No | — |
| webhook.auth.token | string | null | No | — |
| webhook.auth.api_key | string | null | No | — |
| agent_id | string | null | No | — |
Responses
| Status | Description | Content-Type | Shape |
|---|---|---|---|
| 200 | Successful Response | application/json | unknown |
| 422 | Validation Error | application/json | HTTPValidationError |