Segments

Create a segment

A static segment, whose contacts are added one by one; with `rules` (an exx extension) a dynamic one, whose contacts are those its rule selects when it is read. A static segment may require double opt-in (`doi_required`, `doi_from`: exx extensions).

POST
/segments

A static segment, whose contacts are added one by one; with rules (an exx extension) a dynamic one, whose contacts are those its rule selects when it is read. A static segment may require double opt-in (doi_required, doi_from: exx extensions).

Authorization

bearer
headerAuthorizationBearer <token>

Request Body

application/json
  1. body
days?|

The sunset preset's window, 1 to [segments] max_activity_days (default sunset_default_days).

Formatint32
Range0 <= value
doi_from?|

An exx extension: the confirmation's sender, an address at a verified domain of the project; required with doi_required.

doi_required?|

An exx extension: a contact added waits for its confirmation (double opt-in); a static segment's only.

name*string
preset?|

An exx extension: sunset, a dynamic segment of the contacts without a human open or click in the last days days (instead of rules).

rules?|

An exx extension: a rule (ADR-0052) that makes the segment dynamic, its contacts those the rule selects when it is read. Without it the segment is static.

Response Body

Success

application/json
  1. response

The answer to a create: the segment's id and name.

id*string
Formatuuid
name*string
object*string
Example Request
curl -X POST 'https://api.exx.sh/segments' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "object": "string"}