Audience
Create a segment
Create a segment defined by condition groups (conditions within a group are joined by OR; groups are joined by AND). Requires the audience:write scope and is blocked for sandbox API keys.
post/audience/segments
Request
- Base URL: https://app.lettr.com/api
- URL: https://app.lettr.com/api/audience/segments
- Auth: HTTP bearer
Request body
Example request
{
"name": "Engaged subscribers",
"conditions": {
"groups": [
{
"conditions": [
{
"field": "email",
"operator": "equals",
"value": "@example.com"
}
]
}
]
}
}Response
Segment created
Example response
{
"message": "Segment retrieved successfully.",
"data": {
"name": "Engaged subscribers",
"condition_groups": [
{
"conditions": [
{
"field": "email",
"operator": "equals",
"value": "@example.com"
}
]
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.