Skip to navigation

Archive a segment

Archives the segment and removes it from every customer. It stays readable and its key stays reserved, and it can’t be added to a customer again. Archiving an archived segment is status_conflict. {segment} takes the segment’s seg_ ID or its key. A value starting seg_ is tried as a Paid ID first.

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Path parameters

segmentstringRequired1-255 characters

The segment’s seg_ ID or its key.

Headers

Paid-BetaenumRequired

This endpoint is in the segments=v1 beta. Send this header to use it.

Allowed values:

Response

200
idstring
The segment's ID.
objectenum

The type of object. Always segment.

Allowed values:
createdAtdatetime
When the object was created.
archivedAtdatetime or null

When the segment was archived, or null. An archived segment stays readable, is removed from every customer, and keeps its key reserved.

descriptionstring or null<=500 characters
What the segment is for, up to 500 characters, or null.
keystringformat: "^[a-z0-9_]{1,64}$"

Your stable name for the segment, 1 to 64 lowercase letters, digits and _. Unique on your account, archived segments included. Immutable. Accepted wherever a segment is named.

livemodeboolean

true for an object on a live account, false on a test account.

metadatamap from strings to strings

String key-value pairs of your own, up to 500 characters per value. Always updatable.

namestring1-255 characters
Display name, shown in the dashboard. Customers never see it.
updatedAtdatetime
When the object was last changed.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error