Segments

Create new segment

Changed on

Creates a new empty segment with the specified name and optional description.

Scopes Required: [segments:Write]

Default Rate Limit: 100 requests per second

post/v2/segments

Request

  • Base URL
    https://api.attentivemobile.com
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization code: https://ui-devel.attentivemobile.com/integrations/oauth-install?client_id={clientId}&redirect_uri={redirectUri}&scope={scope}
      Token URL: https://api.attentivemobile.com/v1/authorization-codes/tokens scopes: segments:write

Request body

namestring required

The name of the segment. Cannot be empty or whitespace only. Leading and trailing whitespace will be trimmed.

descriptionstring

Optional description of the segment. If not provided, defaults to "Manual Segment Upload Public API V2". When provided, cannot be empty or whitespace only and must be at least 2 characters. Leading and trailing whitespace will be trimmed.

externalIdstring

Auto generated if not supplied. Optional externalId set on the segment. Cannot be empty or whitespace only. Leading and trailing whitespace will be trimmed.

Example request

{
  "name": "Loyalty Gold Members",
  "description": "Customers with gold loyalty status",
  "externalId": "SEG_abc123def456"
}

Response

Segment created successfully

externalIdstring

The external segment ID (client-facing identifier)

namestring

The name of the segment

descriptionstring

The description of the segment

Example response

{
  "externalId": "loyalty_gold_2025",
  "name": "Loyalty Gold Members",
  "description": "Customers with gold loyalty status"
}

Changes