API · Audiences
Create Audience
Create an audience (requires full access). This deprecated endpoint is an alias for segments.
POST
/audiencesFull accessRequest parameters
| Parameter | Type | Description |
|---|---|---|
Idempotency-Keyheader · optional | string1–256 characters | Makes the request safe to retry. See Idempotency. |
namebody · required | string | Trimmed nonempty segment name, at most 200 characters. |
Request example
Set OPENSEND_BASE_URL=https://api.example.com and OPENSEND_API_KEY=os_replace_me on your server.
bash
curl -X POST "$OPENSEND_BASE_URL/audiences" \
-H "Authorization: Bearer $OPENSEND_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"name":"Customers"}'Response
201 · application/json. Example IDs stand for IDs returned by your installation.
json
{
"object": "audience",
"id": "YOUR_ID"
}Behavior and errors
This deprecated route is an alias for the same segment records. Prefer the segments API for new integrations. Singular responses use object: "audience". The SDK’s audiences alias calls /segments, so the Node example uses the generic transport to demonstrate this legacy route.
Use a full-access credential. Unknown or foreign resources return 404. See authentication, errors, rate limits, and pagination.