Response format
All responses are JSON. Successful collection endpoints return arrays at the top level; single-resource endpoints return a single object.
Successful responses
Section titled “Successful responses”Collection endpoint (GET /organizations/:id/collabs.json):
[ { "id": 9, "name": "Spring lipsticks", "state": "published", ... }, { "id": 10, "name": "Summer fragrances", "state": "draft", ... }]Single resource (GET /organizations/:id/collabs/9.json):
{ "id": 9, "name": "Spring lipsticks", "state": "published", "brief": "<p>...</p>" }brief-style rich-text fields are returned as pre-rendered HTML and are typically only included on show, not on index.
Error responses
Section titled “Error responses”For authorization / authentication errors:
{ "error": "Not authorized" }For validation errors (422 Unprocessable Content):
{ "errors": { "name": ["can't be blank"] } }The errors object is keyed by attribute name; each value is an array of human-readable messages.
Content-Type
Section titled “Content-Type”Every JSON request must include:
Accept: application/jsonMutation requests (POST, PATCH, PUT) should also send:
Content-Type: application/jsonWithout Accept: application/json, endpoints respond with HTML — the same controllers serve both.