> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nedzo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update agent

> Update an existing AI agent by ID via the Nedzo REST API. Modify the agent prompt, voice, language, actions, or knowledge base configuration.

> [!NOTE]
>
> This endpoint is for the VIP plan only. Other plans get a `403`. See [Plan access](https://docs.nedzo.ai/api-reference/introduction.md#plan-access).

Update an agent's details. All fields are optional - only provided fields will be updated.

## Path Parameters

**id** `string` *required*

The unique UUID of the Agent

## Common Fields

**name** `string`

Agent name (1-255 characters)

**isActive** `boolean`

Whether the agent is active

**prompt** `string`

System prompt for the agent

**language** `string`

Agent language. Valid values: `english`, `spanish`, `french`, `german`, `portuguese`, `dutch`, `chinese`, `japanese`

**direction** `string` *deprecated*

**Deprecated and ignored.** An agent has no direction — its number both answers and places calls. Still accepted on Voice agents so existing integrations keep working, but it does not change the agent. Sending it on a Chat or Widget agent is still rejected.

## Settings for every agent type

**tone** `string`

How the agent sounds. One of `Friendly`, `Casual`, `Neutral`, `Direct`, `Professional`, `Humorous`.

**answerLength** `string`

How long its answers are. One of `Concise`, `Standard`, `Thorough`.

**aiDisclosureEnabled** `boolean`

Tell the contact they are talking to an AI.

**aiDisclosureScript** `object`

The AI disclosure line for each language, like `{ "english": "You are talking to an AI assistant." }`. An empty line is dropped. `null` uses the default line.

## Type-Specific Fields

A field from another agent type's tab gets a `400` that names the field.

> [tab] Voice
>
> **openingLine** `string`
>
> Opening line the agent says when starting a conversation
>
> **voiceId** `string`
>
> Voice ID for text-to-speech
>
> **voicemail** `boolean`
>
> Enable voicemail detection. Applies to calls the agent places.
>
> **voicemailMessage** `string`
>
> Message to leave on voicemail
>
> **backgroundSound** `boolean`
>
> Enable background sound
>
> **hipaaCompliance** `boolean`
>
> When this is enabled, no logs, recordings, or transcriptions will be stored
>
> **callDuration** `integer`
>
> Maximum call duration in minutes, 1-60
>
> **speed** `number`
>
> Voice speed multiplier, 0.5-1.5
>
> **postConversationWebhookUrl** `string`
>
> URL to receive a POST request after each conversation ends. The payload includes the transcript, summary, outcome, duration, contact details, and extracted fields. Set to `null` to disable. See the [Post-conversation webhook](https://docs.nedzo.ai/agents/post-conversation-webhook.md) page for the full payload.
>
> **consentRecordingEnabled** `boolean`
>
> Ask the caller to agree to recording.
>
> **consentScript** `object`
>
> The recording consent line for each language. `null` uses the default line.
>
> **consentOptOutDigit** `string`
>
> The key a caller presses to say no to recording: one digit, `*` or `#`.
>
> **aiCloneDisclosureScript** `object`
>
> The disclosure line for each language when the agent speaks in a cloned voice.
>
> **postCallWebhookUrl** `string` *deprecated*
>
> **Deprecated.** Use `postConversationWebhookUrl` instead. Still accepted on input for backwards compatibility; responses always use the new field.

> [tab] Chat
>
> **enabledChannels** `string[]`
>
> The channels the agent answers on: `sms`, `email`, `whatsapp`, `instagram`, `messenger`. Leaving out `email` also frees the agent's inbound email address.
>
> **waitTimeSeconds** `integer`
>
> Seconds to wait before it answers, 0-60, so a contact can finish typing.
>
> **maxMessagesPerConversation** `integer`
>
> The most AI messages in one conversation. `null` means no limit.
>
> **maxMessagesSendFinal** `boolean`
>
> Send a last message when the limit is reached.
>
> **maxMessagesFinalMessage** `string`
>
> The last message to send.
>
> **pauseOnAppointmentBooked** `boolean`
>
> Stop answering after an appointment is booked.
>
> **protectionKeywords** `string[]`
>
> Up to 50 words that stop the AI at once, so a teammate can take over.
>
> **triggerKeywords** `string[]`
>
> Up to 50 words. The agent answers only after a contact message has one of them. An empty list answers everything.
>
> **profanityDetectionEnabled** `boolean`
>
> Stop answering on rude messages.
>
> **postConversationWebhookUrl** `string`
>
> URL to receive a POST request after each chat conversation ends (SMS, Instagram, Messenger, email, or web chat). The payload includes the transcript, summary, channel, contact details, and extracted fields. Set to `null` to disable. See the [Post-conversation webhook](https://docs.nedzo.ai/agents/post-conversation-webhook.md) page for the full payload.

> [tab] Widget
>
> **widgetName** `string`
>
> The name shown in the widget.
>
> **widgetDescription** `string`
>
> The line under the name.
>
> **widgetMode** `string`
>
> What the widget offers: `voice`, `chat` or `both`.
>
> **widgetTheme** `string`
>
> `light` or `dark`.
>
> **widgetPosition** `string`
>
> Where it sits on the page: `bottom-right`, `bottom-center`, `bottom-left`, `center-right`, `center-left`, `top-right` or `top-left`.
>
> **widgetCtaText** `string`
>
> The button text.
>
> **widgetAvatarUrl** `string`
>
> An `https` image URL for the avatar. `null` removes it.
>
> **widgetShowBranding** `boolean`
>
> Show the "Powered by" badge.
>
> **widgetBrandingText** `string`
>
> The badge text. Empty or `null` uses the default text.
>
> **anonymousVoiceEnabled** `boolean`
>
> Let website visitors call the agent from the widget.
>
> **triggerKeywords** `string[]`
>
> Up to 50 words. The agent answers only after a visitor message has one of them.
>
> **profanityDetectionEnabled** `boolean`
>
> Stop answering on rude messages.
>
> A change to a widget agent shows on websites right away.
>
> **postConversationWebhookUrl** `string`
>
> URL to receive a POST request after each web agent conversation ends. The payload includes the transcript, summary, outcome, duration, and extracted fields. Set to `null` to disable. See the [Post-conversation webhook](https://docs.nedzo.ai/agents/post-conversation-webhook.md) page for the full payload.

```bash cURL theme={null}
curl -X PATCH "https://api.nedzo.ai/v1/agents/123e4567-e89b-12d3-a456-426614174000" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Updated Agent Name",
      "prompt": "Updated system prompt...",
      "isActive": true,
      "backgroundSound": true,
      "openingLine": "Hello! How can I help you today?",
      "language": "spanish",
      "voicemail": false,
      "voicemailMessage": "Please leave a message after the tone.",
      "callDuration": 30,
      "voiceId": "voice_123",
      "postConversationWebhookUrl": "https://example.com/webhooks/conversation-completed"
    }'
```

```json Response theme={null}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Updated Agent Name",
  "agentType": "Voice",
  "direction": null,
  "prompt": "Updated system prompt...",
  "isActive": true,
  "backgroundSound": true,
  "openingLine": "Hello! How can I help you today?",
  "language": "spanish",
  "voicemail": false,
  "voicemailMessage": null,
  "hipaaCompliance": false,
  "callDuration": 30,
  "speed": 1.0,
  "voiceId": "voice_123",
  "postConversationWebhookUrl": "https://example.com/webhooks/conversation-completed",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T11:00:00Z"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.