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.
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 name | Description |
|---|---|
| segment_id | Unique identifier of the segment (UUID). |
Request fields
All fields are optional; supply only the ones you want to change.
| Field name | Description |
|---|---|
| name | New name for the segment. |
| color | New hex color from the allowed palette. |
| description | New description. |
| rules_json | New rule definition. See Segment rules. Triggers a re-build. |
| contact_list_ids | New 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 code | Description |
|---|---|
| 200 | Segment updated successfully. |
| 400 | Invalid request data. |
| 401 | Unauthorized. |
| 404 | Segment not found. |