Save a segment
Saves a named set of filters for the credential’s owner (at most 3 per person per website; names are unique per person).
Related: List your segments and Get a segment in Segments.
Request
Path parameters
websitestringrequiredWebsite id or domain, e.g. example.com
1–253 characters
Headers
AuthorizationstringrequiredBearer followed by an account token or an OAuth access token with the segments:write scope.
Content-TypestringrequiredSend the body as JSON.
One of: application/json
Body fields
namestringrequired1–60 characters
filtersobject[]required1–10 items
sharedbooleanoptionalResponse
The segment.
{
"status": "string",
"data": {
"id": "string",
"siteId": "string",
"userId": "string",
"name": "string",
"filters": [],
"shared": true,
"createdAt": "2026-01-01T00:00:00.000Z"
}
}Response fields
| Field | Type | Description |
|---|---|---|
| status | "ok" | |
| data | object | |
| data.id | string | |
| data.siteId | string | |
| data.userId | string | |
| data.name | string | |
| data.filters | object[] | |
| data.shared | boolean | |
| data.createdAt | string (date-time) |