---
title: "Update Customer Agent"
description: "How to call Update Customer Agent (PATCH /api/customer-agents/{id}) in the Klaviyo REST API: authentication, parameters, request and response bodies, and an example request."
url: "https://developers.klaviyo.com/en/reference/update_customer_agent_beta"
revision: "2026-10-15.pre"
operationId: "update_customer_agent_beta"
method: "PATCH"
endpoint: "https://a.klaviyo.com/api/customer-agents/{id}"
authentication: "privateKey"
scopes: ["agents:write"]
rateLimits: {"burst":"10/s","steady":"150/m"}
revisionHeader: {"name":"revision","required":true}
deprecated: false
preRelease: "BETA"
openApi: "https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15.pre/openapi/beta/apis/update_customer_agent_beta.json"
jsonApi: {"fields":{"customer-agent":["channels","channels.email","channels.email.blockers","channels.email.enabled","channels.sms","channels.sms.blockers","channels.sms.enabled","channels.web_chat","channels.web_chat.blockers","channels.web_chat.enabled","channels.whatsapp","channels.whatsapp.blockers","channels.whatsapp.enabled","communication_styles","escalation_rules","handoff","handoff.email_address","handoff.fallback_message","handoff.handoff_message","handoff.include_ticket_id","handoff.mechanism","id","name","tone_of_voice","tone_of_voice.custom_instruction","tone_of_voice.preset"]}}
related: ["https://developers.klaviyo.com/en/reference/customer-agent-beta/llms.txt","https://developers.klaviyo.com/en/reference/create_customer_agent_conversation_context_beta.md","https://developers.klaviyo.com/en/reference/get_customer_agents_beta.md","https://developers.klaviyo.com/en/reference/get_customer_agent_beta.md","https://developers.klaviyo.com/en/reference/create_customer_agent_beta.md","https://developers.klaviyo.com/en/reference/get_customer_agent_training_runs_beta.md","https://developers.klaviyo.com/en/reference/start_customer_agent_training_run_beta.md","https://developers.klaviyo.com/en/reference/create_customer_agent_response_beta.md","https://developers.klaviyo.com/en/reference/get_agent_conversation_context_ids_for_customer_agent_conversation_beta.md","https://developers.klaviyo.com/en/reference/get_agent_conversation_contexts_for_customer_agent_conversation_beta.md"]
---

# Update Customer Agent

> This is the Markdown version of https://developers.klaviyo.com/en/reference/update_customer_agent_beta

```http
PATCH https://a.klaviyo.com/api/customer-agents/{id}
```


> [!WARNING]
> **This endpoint is in beta and subject to change.**
> A beta revision header (2026-10-15.pre) is required to use our beta APIs. Klaviyo APIs in beta are not intended for use in production. See our [versioning and deprecation policy](https://developers.klaviyo.com/en/docs/api_versioning_and_deprecation_policy.md) for more information.


Patches the Customer Agent resource for the calling company.

The request body ``data.id`` must match the path parameter. Supports ``name``, ``tone_of_voice``, ``escalation_rules``, ``communication_styles``, ``handoff``, and ``channels``. For tone, provide ``tone_of_voice.preset`` from the supported enum, or ``preset: "custom"`` together with ``custom_instruction``. For ``escalation_rules`` and ``communication_styles``, the supplied array replaces the existing list; omit the field to leave the existing list unchanged. ``handoff`` is merged into the stored default handoff configuration: fields you omit are unchanged, and selecting a helpdesk that is not connected is rejected. In ``channels``, set ``enabled`` to turn a channel on or off. Enabling a channel that has ``blockers`` is rejected, and ``sms`` and ``whatsapp`` cannot be changed through the API. Takes effect on the next turn.

- Revision header: `revision: 2026-10-15.pre` (required)
- Scopes: `agents:write`
- Rate limits: Burst: `10/s`, Steady: `150/m`
- OpenAPI: [Download this endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15.pre/openapi/beta/apis/update_customer_agent_beta.json)

## Example request

### curl

```bash
curl --request PATCH \
     --url 'https://a.klaviyo.com/api/customer-agents/id' \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'revision: 2026-10-15.pre' \
     --header 'content-type: application/vnd.api+json' \
     --data '{
  "data": {
    "type": "customer-agent",
    "id": "string",
    "attributes": {}
  }
}'
```

### CLI

```bash
klaviyo beta customer-agent update id \
  -d '{
  "data": {
    "type": "customer-agent",
    "id": "string",
    "attributes": {}
  }
}'
```

Sign in first with `klaviyo auth login`. [Install the Klaviyo CLI](https://developers.klaviyo.com/en/docs/klaviyo_cli.md)

## Path parameters

- `id` (string, required)

## Query parameters

- `fields[customer-agent]` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/reference.md) Allowed values: `channels`, `channels.email`, `channels.email.blockers`, `channels.email.enabled`, `channels.sms`, `channels.sms.blockers`, `channels.sms.enabled`, `channels.web_chat`, `channels.web_chat.blockers`, `channels.web_chat.enabled`, `channels.whatsapp`, `channels.whatsapp.blockers`, `channels.whatsapp.enabled`, `communication_styles`, `escalation_rules`, `handoff`, `handoff.email_address`, `handoff.fallback_message`, `handoff.handoff_message`, `handoff.include_ticket_id`, `handoff.mechanism`, `id`, `name`, `tone_of_voice`, `tone_of_voice.custom_instruction`, `tone_of_voice.preset`

## Headers

- `revision` (string, required): API endpoint revision (format: YYYY-MM-DD[.suffix]) Default: `2026-10-15.pre`

## Request body

Content type: `application/vnd.api+json` (required)

- `data` (object, required)
  - `type` (string, required): Allowed values: `customer-agent`
  - `id` (string, required): Customer Agent resource id. Must match the `id` path parameter.
  - `attributes` (object, required)
    - `name` (string, nullable): The name of the AI agent.
    - `tone_of_voice` (object, nullable): Patchable tone-of-voice settings for the Customer Agent resource.
      - `preset` (string, nullable): Built-in tone preset. Allowed values: `neutral`, `professional`, `friendly`, `playful`, `custom`
      - `custom_instruction` (string, nullable): Free-text instruction the agent uses for tone when `preset` is `custom`. Ignored otherwise.
    - `escalation_rules` (object[], nullable): Natural-language triggers that, when matched, cause the agent to escalate to a human. When provided, the supplied array replaces the existing list; omit to leave the existing list unchanged.
      - `title` (string, required): Short, human-readable label for the escalation rule.
      - `description` (string, required): Natural-language description of when this rule fires.
      - `status` (string, required): Whether this guidance item is active. Allowed values: `enabled`, `disabled`
      - `countries` (string[], nullable): Countries this rule applies to, as ISO 3166-1 alpha-2 codes. Empty or null means every country.
      - `languages` (string[], nullable): Languages this rule applies to, as ISO 639-1 codes, or ISO 639-3 where none exists. Some languages aren't supported. Empty or null means every language.
    - `communication_styles` (object[], nullable): Communication styles the agent applies on every turn. When provided, the supplied array replaces the existing list; omit to leave the existing list unchanged.
      - `title` (string, required): Short, human-readable label for the communication style.
      - `description` (string, required): Natural-language communication style the agent must follow on every turn.
      - `status` (string, required): Whether this guidance item is active. Allowed values: `enabled`, `disabled`
      - `countries` (string[], nullable): Countries this rule applies to, as ISO 3166-1 alpha-2 codes. Empty or null means every country.
      - `languages` (string[], nullable): Languages this rule applies to, as ISO 639-1 codes, or ISO 639-3 where none exists. Some languages aren't supported. Empty or null means every language.
    - `handoff` (object, nullable): Patchable default handoff configuration. Fields you omit are left unchanged.
      - `mechanism` (string, nullable): How the agent hands a shopper off to a human. Cannot be null. A helpdesk that is not connected is rejected. Allowed values: `GORGIAS`, `ZENDESK`, `INBOX`, `OTHER_EMAIL_BASED`, `FALLBACK_MESSAGE`
      - `fallback_message` (string, nullable): Sent when the agent is unable to answer and no human is available. Cannot be null.
      - `handoff_message` (string, nullable): Sent when the agent hands the shopper off to a human. Cannot be null.
      - `include_ticket_id` (boolean, nullable): Whether the handoff message includes the helpdesk ticket reference number. Cannot be null.
      - `email_address` (string, nullable): Address handoffs are emailed to. Required when `mechanism` is `OTHER_EMAIL_BASED`.
    - `channels` (object, nullable): Patchable channel state. Channels you omit are left unchanged.
      - `web_chat` (object, nullable): Web chat. Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15.pre/openapi/beta/apis/update_customer_agent_beta.json).
      - `email` (object, nullable): Email. Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15.pre/openapi/beta/apis/update_customer_agent_beta.json).
      - `sms` (object, nullable): SMS. Writes are rejected. Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15.pre/openapi/beta/apis/update_customer_agent_beta.json).
      - `whatsapp` (object, nullable): WhatsApp. Writes are rejected. Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15.pre/openapi/beta/apis/update_customer_agent_beta.json).

### Example request body

```json
{
  "data": {
    "type": "customer-agent",
    "id": "string",
    "attributes": {}
  }
}
```

## Responses

### 200: Success

Content type: `application/vnd.api+json`

- `data` (object, required)
  - `type` (string, required): Allowed values: `customer-agent`
  - `id` (string, required): Customer Agent resource id. This is the account's ID. Example: `AbC123`
  - `attributes` (object, required)
    - `name` (string, nullable): The name of the AI agent.
    - `tone_of_voice` (object, required): Tone-of-voice settings for the Customer Agent resource.
      - `preset` (string, required): Built-in tone preset. Allowed values: `neutral`, `professional`, `friendly`, `playful`, `custom`
      - `custom_instruction` (string, nullable): Free-text instruction the agent uses for tone when `preset` is `custom`. Ignored otherwise.
    - `escalation_rules` (object[], required): Natural-language triggers that, when matched, cause the agent to escalate to a human. Each rule is individually enabled or disabled.
      - `title` (string, required): Short, human-readable label for the escalation rule.
      - `description` (string, required): Natural-language description of when this rule fires.
      - `status` (string, required): Whether this guidance item is active. Allowed values: `enabled`, `disabled`
      - `countries` (string[], nullable): Countries this rule applies to, as ISO 3166-1 alpha-2 codes. Empty or null means every country.
      - `languages` (string[], nullable): Languages this rule applies to, as ISO 639-1 codes, or ISO 639-3 where none exists. Some languages aren't supported. Empty or null means every language.
    - `communication_styles` (object[], required): Communication styles the agent applies on every turn, such as opening conventions, formatting preferences, and word choices to avoid. Each style is individually enabled or disabled.
      - `title` (string, required): Short, human-readable label for the communication style.
      - `description` (string, required): Natural-language communication style the agent must follow on every turn.
      - `status` (string, required): Whether this guidance item is active. Allowed values: `enabled`, `disabled`
      - `countries` (string[], nullable): Countries this rule applies to, as ISO 3166-1 alpha-2 codes. Empty or null means every country.
      - `languages` (string[], nullable): Languages this rule applies to, as ISO 639-1 codes, or ISO 639-3 where none exists. Some languages aren't supported. Empty or null means every language.
    - `handoff` (object, required): The account-wide default handoff configuration, which every channel inherits.
      - `mechanism` (string, nullable): How the agent hands a shopper off to a human. Null when the account uses a mechanism this API does not expose. Allowed values: `GORGIAS`, `ZENDESK`, `INBOX`, `OTHER_EMAIL_BASED`, `FALLBACK_MESSAGE`
      - `fallback_message` (string, nullable): Sent when the agent is unable to answer and no human is available.
      - `handoff_message` (string, nullable): Sent when the agent hands the shopper off to a human.
      - `include_ticket_id` (boolean, required): Whether the handoff message includes the helpdesk ticket reference number.
      - `email_address` (string, nullable): Address handoffs are emailed to. Used when `mechanism` is `OTHER_EMAIL_BASED`.
    - `channels` (object, required): Whether each channel is on, and what stops it from being turned on.
      - `web_chat` (object, required): Web chat. Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15.pre/openapi/beta/apis/update_customer_agent_beta.json).
      - `email` (object, required): Email. Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15.pre/openapi/beta/apis/update_customer_agent_beta.json).
      - `sms` (object, required): SMS. Read-only through the API. Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15.pre/openapi/beta/apis/update_customer_agent_beta.json).
      - `whatsapp` (object, required): WhatsApp. Read-only through the API. Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15.pre/openapi/beta/apis/update_customer_agent_beta.json).
  - `links` (object, required)
    - `self` (string<uri>, required)
- `links` (ObjectLinks): Same fields as the first ObjectLinks above.

#### Example response body

```json
{
  "data": {
    "type": "customer-agent",
    "id": "AbC123",
    "attributes": {
      "name": "string",
      "tone_of_voice": {
        "preset": "neutral",
        "custom_instruction": "string"
      },
      "escalation_rules": [
        {
          "title": "string",
          "description": "string",
          "status": "enabled",
          "countries": [
            "string"
          ],
          "languages": [
            "string"
          ]
        }
      ],
      "communication_styles": [
        {
          "title": "string",
          "description": "string",
          "status": "enabled",
          "countries": [
            "string"
          ],
          "languages": [
            "string"
          ]
        }
      ],
      "handoff": {
        "mechanism": "GORGIAS",
        "fallback_message": "string",
        "handoff_message": "string",
        "include_ticket_id": true,
        "email_address": "string"
      },
      "channels": {
        "web_chat": {
          "enabled": true,
          "blockers": [
            "HANDOFF_NOT_CONFIGURED"
          ]
        },
        "email": {
          "enabled": true,
          "blockers": [
            "HANDOFF_NOT_CONFIGURED"
          ]
        },
        "sms": {
          "enabled": true,
          "blockers": [
            "HANDOFF_NOT_CONFIGURED"
          ]
        },
        "whatsapp": {
          "enabled": true,
          "blockers": [
            "HANDOFF_NOT_CONFIGURED"
          ]
        }
      }
    },
    "links": {
      "self": "https://www.example.com"
    }
  },
  "links": {
    "self": "https://www.example.com"
  }
}
```

### 4XX: Client Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```

### 5XX: Server Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```
