v4

latestOpenAPI 3.1.02026-07-3163216290.7 KB
Audience segments

Create an audience segment

Create a new audience segment.

post/v1/audience-segments

Request body

namestring required

The name of the audience segment. Must be unique within the team.

descriptionstring

An optional description of the audience segment.

Example request

{
  "name": "Active users",
  "filter": {
    "conditions": [
      {
        "type": "property",
        "key": "plan",
        "operator": "equals",
        "value": "pro"
      }
    ]
  }
}

Response

Audience segment created.

idstring required

The ID of the audience segment.

namestring required

The name of the audience segment.

descriptionstring nullable required

An optional description of the audience segment.

createdAtstring required

ISO 8601 timestamp for when the audience segment was created.

updatedAtstring required

ISO 8601 timestamp for when the audience segment was last updated.

Example response

{
  "id": "cls6e8g0i2k4m6o8q0s2u4w6",
  "name": "Power users",
  "description": "Contacts on the pro plan",
  "createdAt": "2025-06-29T07:47:39.370Z",
  "updatedAt": "2025-06-29T07:47:39.370Z",
  "filter": {
    "match": "all",
    "conditions": [
      {
        "type": "property",
        "key": "plan",
        "operator": "equals",
        "value": "pro"
      }
    ]
  }
}