Update a segment
PATCH/api/v1/segments/{id}
scope
contacts:writeRenames a segment or changes its description or colour. Membership is not affected.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string (uuid) | Segment id |
Body
application/json| Name | Type | Description |
|---|---|---|
nameoptional | string | |
descriptionoptional | string | null | |
coloroptional | string | Six-digit hex colour, e.g. #3b82f6 |
Request
curl -X PATCH "https://your-crm.example.com/api/v1/segments/5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b" \
-H "Authorization: Bearer $RAABTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Website leads — Q3"
}'Response · 200 OK
{
"data": {
"id": "5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
"name": "Website leads — Q3",
"description": "Everyone who booked through the website this month",
"color": "#3b82f6",
"member_count": 42,
"created_at": "2026-09-01T08:00:00.000Z",
"updated_at": "2026-09-02T10:00:00.000Z"
}
}Response
Wrapped in { data: … }| Name | Type | Description |
|---|---|---|
idrequired | string (uuid) | UUID |
namerequired | string | The segment’s name |
descriptionrequired | string | null | What the segment is for |
colorrequired | string | Hex colour used for the segment in the dashboard |
member_countrequired | integer | How many contacts are in the segment. Counts contacts on a member’s private number too, which the API never lists, so it can be higher than the contacts you can page through |
created_atrequired | string (date-time) | ISO 8601 timestamp |
updated_atrequired | string (date-time) | ISO 8601 timestamp |
Errors
| Status | Code | When |
|---|---|---|
| 400 | bad_request | The request could not be parsed: malformed JSON, an invalid cursor, or a query parameter of the wrong shape. |
| 400 | validation_error | The body or query failed validation. `details` lists each failing field with a `path` and a `message`. |
| 401 | unauthorized | No usable API key: the Authorization header is missing or malformed, or the key is unknown, revoked or expired. The three are deliberately indistinguishable. |
| 403 | forbidden | The key is valid but lacks the scope this endpoint requires, or the request came from an address outside the key’s IP allowlist. The message says which. |
| 403 | account_suspended | The account this key belongs to is suspended. Rotating the key will not help; contact support. |
| 404 | not_found | No such resource in this account. A resource that exists in another account also returns this. |
| 429 | rate_limited | The per-key budget, or the per-IP budget for failed authentication, is exhausted. Honour `Retry-After` before retrying. |
| 500 | internal | Something failed on our side. Safe to retry with the same Idempotency-Key; quote `request_id` if it persists. |