Organizations
A brand owned or co-administered by the authenticated user.
Resource shape
Section titled “Resource shape”{ "id": 3, "name": "Acme Cosmetics", "privacy_setting": "public", "website": "https://acme.example.com", "created_at": "2026-04-01T10:00:00Z", "updated_at": "2026-05-01T10:00:00Z", "url": "https://hypemarket.ai/organizations/3.json", "logo_url": "https://hypemarket.ai/rails/active_storage/..."}privacy_setting is one of public, private, restricted. logo_url is omitted when no logo is attached.
GET /organizations.jsonReturns the brands the authenticated user belongs to. Paginated — see Pagination.
GET /organizations/:id.jsonReturns one brand. Sets an ETag — supply If-None-Match for 304 Not Modified. Returns 404 if the brand exists but you’re not a member.
Create
Section titled “Create”POST /organizations.json
{ "organization": { "name": "Hot new brand", "privacy_setting": "public" } }Requires a write-scoped token. The authenticated user becomes the brand’s owner. Returns 201 Created with the new brand. Logo upload requires a multipart request.
Update
Section titled “Update”PATCH /organizations/:id.json
{ "organization": { "name": "Renamed", "website": "https://new.example.com" } }Requires write scope and an admin role on the brand. Pass purge_logo: "1" to remove an existing logo.
Delete
Section titled “Delete”DELETE /organizations/:id.jsonReturns 204 No Content. Fails with 422 if the brand has an active subscription.
Errors
Section titled “Errors”| Code | When |
|---|---|
401 | Missing token, or read token attempting a write |
403 | Authenticated, but role does not permit this action |
404 | Brand does not exist for you |
422 | Validation failed (e.g. private brand without a logo) |