Rename a segment or replace its conditions
Permission
segments:writeRate limit writesIdempotent with Idempotency-KeySend name, conditions or both; conditions replaces the whole list. Same rules as POST /v1/segments.
Authorization
ESTAGE-API-KeystringheaderrequiredA project key, est_live_…, from Settings → API keys. Call from server code only.
Path parameters
idintegerrequiredBody
application/jsonnamestring≤ 255 charsconditionsarray of object≤ 50 itemsShow 1 field
ruleobjectrequiredfield, condition, value, field_id, template_id, automation_id, broadcast_id
Headers
Idempotency-Keystring≤ 255 charsAny 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 } }.