ESTAGE Support
IdeasMy tickets

Rename a segment or replace its conditions

Permission segments:writeRate limit writesIdempotent with Idempotency-Key

Send name, conditions or both; conditions replaces the whole list. Same rules as POST /v1/segments.

PATCHhttps://api.estage.com/v1/segments/{id}

Authorization

ESTAGE-API-Keystringheaderrequired

A project key, est_live_…, from Settings → API keys. Call from server code only.

Path parameters

idintegerrequired

Body

application/json
namestring≤ 255 chars
conditionsarray of object≤ 50 items
Show 1 field
ruleobjectrequired

field, condition, value, field_id, template_id, automation_id, broadcast_id

Headers

Idempotency-Keystring≤ 255 chars

Any unique string per attempt. A retry with the same key gets the first answer back instead of doing the work twice.

RequestcURL
curl --request PATCH \
  --url 'https://api.estage.com/v1/segments/segment-id' \
  --header 'ESTAGE-API-Key: est_live_your-api-key' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: your-unique-key' \
  --data '{ "conditions": [{ "rule": { "field": "tag", "condition": "c", "value": [12, 15] } }] }'
OK
{
  "data": {
    "id": 5,
    "name": "Customers still mailable",
    "conditions": [
      {
        "rule": {
          "field": "tag",
          "condition": "c",
          "value": [
            12,
            15
          ]
        }
      }
    ],
    "created_at": "2026-10-03T11:00:00Z",
    "updated_at": "2026-11-13T10:35:00Z"
  }
}
Example. Errors are { error: { code, message, details } }.