Audiences API
Manage audience profiles and state.
POST /audiences
| Field | Type | Required |
|---|---|---|
type | string | Yes |
identity | object | No |
context | object | Yes |
rhythm | object | No |
bounds | object | Yes |
type: individual, role, cohort
// 201
{
"audience": { "id": "uuid", "type": "individual" }
}GET /audiences/:id
// 200
{
"audience": {},
"state": {
"lastContacted": "2025-01-15T08:00:00Z",
"beatsToday": 1,
"beatsThisWeek": 3,
"cooldownUntil": "2025-01-15T09:00:00Z",
"declined": false,
"signals": []
}
}PATCH /audiences/:id
Only context, rhythm, and bounds updatable.
// 200
{
"audience": {}
}GET /audiences/:id/scenes
| Param | Type |
|---|---|
status | string |
// 200
{
"scenes": []
}DELETE /audiences/:id
Fails if audience has active scenes. Returns 204.