API reference
Create a saved audience
Requires `write` (`audience:manage`).
POST
/api/audiencesAuthorizationBearer <token>
A Stet API key (prefix bk_), created under Settings → API keys. The whole API requires the Growth plan or higher; keys are scoped read or write — composing and sending require write.
In: header
namestring
Length
1 <= length <= 100description?string
Length
length <= 500channelIdsarray<string>
Items
1 <= items <= 1000color?AudienceColor
Value in
"a1" | "a2" | "a3" | "a4" | "a5" | "a6"Response Body
curl -X POST "https://app.stethq.com/api/audiences" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "channelIds": [ "string" ] }'{
"id": "string",
"warnings": [
{
"code": "bot_not_in_channel",
"channelIds": [
"string"
],
"message": "string"
}
]
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}Create an API key
**Dashboard-session only** — this operation does not accept `bk_` Bearer auth. Requires capability `apikey:manage` (Admin role). The plaintext secret is returned exactly once, in this response.
Append a block
Requires `write` (`broadcast:compose`). Draft-only — `409` on any other status.