Skip to content

Update segment

If you have questions regarding this API, please visit our API FAQ page.

Updating a segment

Make a PATCH request to https://webapi.inboxroad.com/api/v2/segments/{segment_id}/ with a valid X-API-Key. Only the fields supplied in the body are changed.

Terminal window
curl -X PATCH 'https://webapi.inboxroad.com/api/v2/segments/{segment_id}/' \
-H 'X-API-Key: <your_token>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Updated Active Subscribers",
"description": "Updated segment description"
}'

Path parameters

Param nameDescription
segment_idUnique identifier of the segment (UUID).

Request fields

All fields are optional; supply only the ones you want to change.

Field nameDescription
nameNew name for the segment.
colorNew hex color from the allowed palette.
descriptionNew description.
rules_jsonNew rule definition. See Segment rules. Triggers a re-build.
contact_list_idsNew set of source contact list ids (UUIDs). Triggers a re-build.

Example request

{
"name": "Updated Active Subscribers",
"color": "#b6d8d5"
}

Response

Returns 200 with the full updated segment (same shape as Get segment).

Possible response codes

Status codeDescription
200Segment updated successfully.
400Invalid request data.
401Unauthorized.
404Segment not found.