POST
/
api
/
segments
Create Tenant Segment
curl --request POST \
  --url https://api.embedreach.com/api/segments \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "conditions": [
    {
      "field": "userId",
      "value": [
        "<string>"
      ],
      "operator": "equals"
    }
  ],
  "type": "custom"
}'
{
  "success": true,
  "message": "<string>",
  "data": {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "createdAt": "<string>",
    "type": "all_users"
  }
}

Headers

reach-tenant-id
string

If using a platform scoped JWT, you can pass in a header to impersonate a specific tenant to impersonate the request as.

Body

application/json

Response

200
application/json

Status 200 response

The response is of type object.