Getting Started
Errors & conventions
Content types, error envelopes, and the full status-code reference.
Conventions
- Content type — send
Content-Type: application/jsononPOSTandPATCH. - Responses — JSON. A successful call returns the resource, or
{ "message": "..." }.
Error envelopes
There are two error shapes.
Shape validation (Joi) → 422
Request-shape errors return an error array. Each entry's path points at the exact
offending field, so a caller (or agent) can correct itself.
{
"error": [
{
"message": "\"values\" must contain at least 1 items",
"path": ["channels", "FB_PAGE_123", "superpower", "conditionGroups", 0, "conditions", 0, "values"],
"type": "array.min",
"context": {}
}
]
}Business errors → 400 / 409 / 422
Model and business-rule errors return a message (plus optional details).
{ "message": "Hashtag already in use" }Status codes
| Code | When |
|---|---|
200 | OK — reads, updates, lifecycle transitions, delete. |
201 | Scheduled post created. |
400 | Unknown/foreign channel id; model validation error (e.g. a past scheduledFor). |
402 | Organization inactive. |
403 | Auth failure — see Authentication. |
404 | Resource not found. |
409 | Superpower hashtag already in use, or duplicated within the request. |
422 | Request shape invalid (Joi), or a superpower's per-template config is incomplete. |