Skip to content
AchaduDevelopers
Operational APIGo to website ↗
Dashboard →
Developers/API/segment_update
Segments

Update segment

Updates the segment's identity, distribution and showcase.

PATCH/segments/{id}segments:write
BEHAVIOR

The change is validated and persisted in the key account before responding. Query the returned resource as the source of truth.

EFFECT

It can change the resource and emit the corresponding domain event.

REPETITION

On network failure, confirm the resource status before retrying. Automatically redo only 429 and 5xx with backoff and jitter.

Request

idstring · pathResource identifier.minLength 2 · maxLength 100mandatory
namestring · bodySegment name.optional
slugstring · bodyPublic slug.optional
descriptionstring · bodyDescription.optional
store_namestring · bodyStorefront name.optional
store_taglinestring · bodyPhrase from the window.optional
store_colorstring · bodyMain color.optional
auto_expandboolean · bodyEnables automatic expansion.optional
distributionstring · bodyDistribution strategy.optional
waitlistboolean · bodyActivates queue.optional
AuthorizationBearer ach_live_...
Acceptapplication/json
Scopesegments:write

Executable example

curl
curl -X PATCH 'https://achadu.com/api/v1/segments/resource_id' \
  -H 'Authorization: Bearer ach_live_...' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "name": "My integration",
  "slug": "string",
  "description": "string"
}'

Response and errors

Every response includes request_id. Lists add pagination; mutable resources return the persisted state after the operation.

200 application/json
{
  "data": {
    "id": "seg_01J...",
    "name": "Home and kitchen",
    "slug": "home-and-kitchen",
    "distribution": "balanced",
    "created_at": "2026-08-31T18:20:00.000Z"
  },
  "request_id": "req_01J..."
}
200Operation completed.
400Invalid parameter, body or transition.
401Missing, invalid, expired or revoked key.
402The account plan does not release this interface.
403A chave precisa do escopo segments:write.
404Feature does not exist in this account.
409The current state prevents this operation.
413The JSON body exceeds 128 KB.
429The 120 requests per minute window has been exceeded.