# POST /segments (Resend API)
Base URL: https://api.resend.com
Auth: Authorization: Bearer <RESEND_API_KEY>
Last verified: 2026-09-03

> Create a new segment

## Critical Gotchas
* All requests must include a `User-Agent` header (e.g. `User-Agent: my-app/1.0`) or the API returns HTTP 403.
* The `to` field is an array of strings, even when sending to a single recipient.

## cURL
curl -X POST 'https://api.resend.com/segments' \
  -H "Authorization: Bearer $RESEND_API_KEY" \
  -H 'User-Agent: my-app/1.0' \
  -H 'Content-Type: application/json' \
  -d '{"name":"string","audience_id":"string","filter":{}}'

## Parameters
| Name | In | Type | Required | Description |
| :--- | :--- | :--- | :--- | :--- |
| name | body | string | Yes | The name of the segment. |
| audience_id | body | string | No | The ID of the audience this segment belongs to. |
| filter | body | object | No | Filter conditions for the segment. |

## Response (200 OK)
{"id":"78261eea-8f8b-4381-83c6-79fa7120f1cf","object":"segment"}

---
Need an API key? Get one at https://resend.com/signup