API referenceSegments

Create a segment

POST/segments

With a filter: a live filter segment (seg_). Without one: a Resend manual segment, which is a private list (lst_).

Authorization

apiKey
AuthorizationBearer <token>

A project API key: Authorization: Bearer s0_…

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/segments" \  -H "Content-Type: application/json" \  -d '{    "filter": {      "property1": null,      "property2": null    },    "name": "string"  }'
{  "object": "segment",  "id": "string",  "kind": "filter",  "name": "string",  "description": "string",  "filter": {    "property1": null,    "property2": null  },  "contacts_count": 0,  "counted_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}