cURL
curl --request POST \ --url https://api.emailr.dev/v1/segments \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "name": "Active Users", "conditions": { "opened_email": { "within_days": 30 } }, "description": "Users who opened an email in the last 30 days" } '
{ "id": "123e4567-e89b-12d3-a456-426614174000", "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "name": "<string>", "description": "<string>", "conditions": {}, "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "created_at": "2023-11-07T05:31:56Z", "updated_at": "2023-11-07T05:31:56Z" }
Create a new contact segment
API key authentication. Use your API key as the bearer token.
1
"Active Users"
Show child attributes
{ "opened_email": { "within_days": 30 } }
"Users who opened an email in the last 30 days"
Segment created
"123e4567-e89b-12d3-a456-426614174000"