Errors
Error structure
All errors share one envelope:
{
"error": {
"id": "<correlation-id>",
"code": "<error_code>",
"message": "<human-readable message>",
"details": [
{ "code": "<detail_code>", "message": "<detail message>", "data": "<optional>" }
]
}
}
id— the request correlation id (also returned as theresponseIdresponse header, alongside atimestampheader). Quote it in bug reports.code— a stable, enumerated error code you can branch on.details— present for multi-field validation errors; each entry has its owncode,message, and sometimesdata(e.g. the list of offending ids).
Status codes you'll see
| Status | Meaning | Typical codes |
|---|---|---|
| 400 | Malformed request / bad value | invalid_status, missing_required_params |
| 401 | Not authenticated | unauthorized |
| 403 | Feature off or insufficient permissions | cohorts_not_enabled, forbidden |
| 404 | Resource not found | cohort_not_found, section_not_found, content_not_found, member_not_found |
| 409 | Conflict with current state | cohort_not_deletable, cohort_expired_modification_not_allowed, cohort_not_active, cohort_expired, content_already_exists, cannot_remove_creator, cannot_leave_mandatory |
| 422 | Validation failed | validation_failed, duplicate_card_ids, content_type_not_supported, bulk_limit_exceeded, invite_failed, add_members_failed, add_authors_failed, community_not_topic_based, page_token_not_exclusive, page_token_invalid |
| 503 | Content service unavailable | content_service_unavailable |
Rule of thumb
422 means your input is wrong; 409 means the input is fine but the cohort's current state won't allow it.