Skip to main content
POST
/
segments
/
data
Get segment data
curl --request POST \
  --url https://api.wacht.dev/segments/data \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "target_type": "user",
  "filters": {
    "segment_id": "<string>",
    "user": {
      "name": "<string>",
      "email": "<string>",
      "phone": "<string>"
    },
    "organization": {
      "name": "<string>"
    },
    "workspace": {
      "name": "<string>"
    }
  }
}
'
{
  "data": [
    {
      "id": "1234567890123456789",
      "name": "John Doe",
      "first_name": "John",
      "last_name": "Doe"
    }
  ],
  "has_more": true,
  "limit": 123,
  "offset": 123
}

Authorizations

Authorization
string
header
required

API key authentication (format: Bearer {api_key})

Body

application/json
target_type
enum<string>
required

Type of entities to query

Available options:
user,
organization,
workspace
Example:

"user"

filters
object

Response

200 - application/json

Entities matching segment criteria

data
object[]
has_more
boolean

Whether there are more results

limit
integer | null

Page size

offset
integer | null

Number of items skipped