Skip to content

Organizations

An organization the authenticated user belongs to.

OperationMethod + pathToken scopeRoleNotes
List organizationsGET /organizations.jsonread or writeAuthenticated userPaginated
Show organizationGET /organizations/:id.jsonread or writeOrganization memberETag on show
Create organizationPOST /organizations.jsonwriteAuthenticated userCreator becomes owner
Update organizationPATCH /organizations/:id.jsonwriteOrganization adminpurge_logo removes logo
Delete organizationDELETE /organizations/:id.jsonwriteOrganization ownerGuarded by subscription and resource checks
{
"id": "gKpMxN",
"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/gKpMxN.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.json

Returns the organizations the authenticated user belongs to. Paginated — see Pagination.

GET /organizations/:id.json

Returns one organization. Sets an ETag — supply If-None-Match for 304 Not Modified. Returns 404 if the organization exists but you’re not a member.

POST /organizations.json
{ "organization": { "name": "Hot new organization", "privacy_setting": "public" } }

Requires a write-scoped token. The authenticated user becomes the organization’s owner. Returns 201 Created with the new organization. Logo upload requires a multipart request.

PATCH /organizations/:id.json
{ "organization": { "name": "Renamed", "website": "https://new.example.com" } }

Requires write scope and an admin role on the organization. To remove an existing logo, include "purge_logo": "1" inside the organization payload.

DELETE /organizations/:id.json

Returns 204 No Content. Fails with 422 if the organization still has an active subscription, any campaigns, or any collabs.

CodeWhen
401Missing token, or read token attempting a write
403Authenticated, but role does not permit this action
404Organization does not exist for you
422Validation failed, or a delete guard blocked the operation