Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

Create a new segment

POST/segmentsCreate a new segment

Request body

application/json
objectCreateSegmentOptions
audience_idstring

The ID of the audience this segment belongs to.

filterobject

Filter conditions for the segment.

namestringrequired

The name of the segment.

Example request
{
  "audience_id": "string",
  "filter": {},
  "name": "string"
}

Responses

201OKapplication/json
objectCreateSegmentResponseSuccess
idstring

The ID of the segment.

objectstring

The object type of the response.

Example response
{
  "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
  "object": "segment"
}
Documentation menu