Docs
Segments

Update a segment

PATCH/segments/{id}Needscontent.edit

Changes apply to drafts right away. Live content keeps the segment as it was when it was published, until you publish it again (its draft shows unpublished changes meanwhile).

Authorization

secretKey
headerAuthorizationBearer <sk_…>

A secret API key from Settings → API keys. It acts with its creator's role.

Path Parameters

id*integer

The segment's id.

Range1 <= value

Request Body

application/json
  1. body
name?string

1–100 characters, unique in the workspace (case-insensitive).

Lengthlength <= 100
description?|null
rules?

Replaces the rules. Live content keeps the rules it was published with until it is published again.

Response Body

OK

application/json
  1. response
segment*

A saved, reusable audience.

Shell
curl -X PATCH 'https://app.cueston.com/api/segments/1' \
  -H 'Content-Type: application/json' \
  -d '{}'
Example Response
JSON
{
  "segment": {
    "id": 42,
    "name": "Workspace admins",
    "description": "string",
    "rules": {
      "enabled": false,
      "matchType": "all",
      "rules": [
        {
          "id": "string",
          "attribute": "string",
          "operator": "equals",
          "value": "string",
          "key": "string"
        }
      ]
    },
    "createdBy": {
      "id": 42,
      "name": "Ada Lovelace"
    },
    "createdAt": "2026-10-26T09:30:00Z",
    "updatedAt": "2026-10-26T09:30:00Z",
    "usage": [
      {
        "type": "string",
        "id": 42,
        "name": "Onboarding tour"
      }
    ],
    "liveUsage": 0
  }
}