---
title: "Update Segment"
description: "How to call Update Segment (PATCH /api/segments/{id}) in the Klaviyo REST API: authentication, parameters, request and response bodies, and an example request."
url: "https://developers.klaviyo.com/en/v2026-07-15/reference/update_segment"
revision: "2026-07-15"
latestUrl: "https://developers.klaviyo.com/en/reference/update_segment"
operationId: "update_segment"
method: "PATCH"
endpoint: "https://a.klaviyo.com/api/segments/{id}"
authentication: "privateKey"
scopes: ["segments:write"]
rateLimits: {"burst":"1/s","steady":"15/m","daily":"100/d"}
revisionHeader: {"name":"revision","required":true}
deprecated: false
openApi: "https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15/openapi/stable/apis/update_segment.json"
jsonApi: {"fields":{"segment":["created","definition","definition.condition_groups","id","is_active","is_processing","is_starred","name","updated"]}}
related: ["https://developers.klaviyo.com/en/v2026-07-15/reference/segments/llms.txt","https://developers.klaviyo.com/en/v2026-07-15/reference/get_segments.md","https://developers.klaviyo.com/en/v2026-07-15/reference/get_segment.md","https://developers.klaviyo.com/en/v2026-07-15/reference/create_segment.md","https://developers.klaviyo.com/en/v2026-07-15/reference/delete_segment.md","https://developers.klaviyo.com/en/v2026-07-15/reference/get_tags_for_segment.md","https://developers.klaviyo.com/en/v2026-07-15/reference/get_tag_ids_for_segment.md","https://developers.klaviyo.com/en/v2026-07-15/reference/get_profiles_for_segment.md","https://developers.klaviyo.com/en/v2026-07-15/reference/get_profile_ids_for_segment.md","https://developers.klaviyo.com/en/v2026-07-15/reference/get_flows_triggered_by_segment.md","https://developers.klaviyo.com/en/v2026-07-15/reference/get_ids_for_flows_triggered_by_segment.md"]
---

# Update Segment

> This is the Markdown version of https://developers.klaviyo.com/en/v2026-07-15/reference/update_segment

```http
PATCH https://a.klaviyo.com/api/segments/{id}
```

Update a segment with the given segment ID.

- Revision header: `revision: 2026-07-15` (required)
- Scopes: `segments:write`
- Rate limits: Burst: `1/s`, Steady: `15/m`, Daily: `100/d`
- OpenAPI: [Download this endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15/openapi/stable/apis/update_segment.json)

## Example request

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

## Path parameters

- `id` (string, required)

## Query parameters

- `fields[segment]` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/v2026-07-15/reference.md) Allowed values: `created`, `definition`, `definition.condition_groups`, `id`, `is_active`, `is_processing`, `is_starred`, `name`, `updated`

## Headers

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

## Request body

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

- `data` (object, required)
  - `type` (string, required): Allowed values: `segment`
  - `id` (string, required)
  - `attributes` (object, required)
    - `definition` (object)
      - `condition_groups` (object[], required): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15/openapi/stable/apis/update_segment.json).
    - `name` (string, nullable)
    - `is_starred` (boolean, nullable)
    - `is_active` (boolean, nullable): Set to false to deactivate the segment. When deactivating, this must be the only attribute in the request body. Deactivation cannot be combined with other updates. Marking a segment inactive will impact campaigns, flows, ad syncs, forms, helpdesk routing, and other features that reference this segment. Set to true to reactivate a deactivated segment.

### Example request body

```json
{
  "data": {
    "type": "segment",
    "id": "string",
    "attributes": {}
  }
}
```

## Responses

### 200: Success

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

- `data` (object, required)
  - `type` (string, required): Allowed values: `segment`
  - `id` (string, required)
  - `attributes` (object, required)
    - `name` (string, nullable): A helpful name to label the segment Example: `Repeat Purchasers`
    - `definition` (object): Same fields as SegmentDefinition in the request body above.
    - `created` (string<date-time>, nullable): Date and time when the segment was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm) Example: `2022-11-08T00:00:00+00:00`
    - `updated` (string<date-time>, nullable): Date and time when the segment was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm) Example: `2022-11-08T00:00:00+00:00`
    - `is_active` (boolean, required): Whether the segment is active. Inactive segments are not processed and their membership does not update.
    - `is_processing` (boolean, required)
    - `is_starred` (boolean, required)
  - `relationships` (object)
    - `profiles` (object)
      - `data` (object[]): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15/openapi/stable/apis/update_segment.json).
      - `links` (object): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15/openapi/stable/apis/update_segment.json).
    - `tags` (object)
      - `data` (object[]): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15/openapi/stable/apis/update_segment.json).
      - `links` (RelationshipLinks): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15/openapi/stable/apis/update_segment.json).
    - `flow-triggers` (object)
      - `data` (object[]): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15/openapi/stable/apis/update_segment.json).
      - `links` (RelationshipLinks): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15/openapi/stable/apis/update_segment.json).
  - `links` (object, required)
    - `self` (string<uri>, required)
- `links` (ObjectLinks): Same fields as the first ObjectLinks above.
- `meta` (object): Response-level metadata
  - `agent_hints` (object): Optional hints emitted by the API for agent callers
    - `next_steps` (string[]): Suggested follow-up actions for agents to take after this response

#### Example response body

```json
{
  "data": {
    "type": "segment",
    "id": "string",
    "attributes": {
      "name": "Repeat Purchasers",
      "definition": {
        "condition_groups": [
          {
            "conditions": [
              {
                "type": "profile-group-membership",
                "is_member": true,
                "group_ids": [
                  "string"
                ],
                "timeframe_filter": {
                  "type": "date",
                  "operator": "after",
                  "date": "2022-11-08T00:00:00+00:00"
                }
              }
            ]
          }
        ]
      },
      "created": "2022-11-08T00:00:00+00:00",
      "updated": "2022-11-08T00:00:00+00:00",
      "is_active": true,
      "is_processing": true,
      "is_starred": true
    },
    "relationships": {
      "profiles": {
        "data": [
          {
            "type": "profile",
            "id": "string"
          }
        ],
        "links": {
          "self": "https://www.example.com",
          "related": "https://www.example.com"
        }
      },
      "tags": {
        "data": [
          {
            "type": "tag",
            "id": "string"
          }
        ],
        "links": {
          "self": "https://www.example.com",
          "related": "https://www.example.com"
        }
      },
      "flow-triggers": {
        "data": [
          {
            "type": "flow",
            "id": "string"
          }
        ],
        "links": {
          "self": "https://www.example.com",
          "related": "https://www.example.com"
        }
      }
    },
    "links": {
      "self": "https://www.example.com"
    }
  },
  "links": {
    "self": "https://www.example.com"
  },
  "meta": {
    "agent_hints": {
      "next_steps": [
        "string"
      ]
    }
  }
}
```

### 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"
      }
    }
  ]
}
```
