organizations
Módulo Identity · 6 operaciones
List organization rows
GET/organizations
Every company on the platform: a tenant (with a subscription), an external account, or both. A partner org cannot have a parent partner. Returns a cursor page of organization rows the caller may see. The default order is `created_at` ascending. Supports sparse fieldsets and the filter grammar.
Create an organization
POST/organizations
Creates an organization with the caller as its Owner, in one transaction, through `app.create_organization`. It starts a 14-day Pro trial with no card and moves to the Access plan when the trial ends unless a card is added (Section 14.7). A reserved or taken slug is refused with 422. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.
Get an organization
GET/organizations/{id}
Every company on the platform: a tenant (with a subscription), an external account, or both. A partner org cannot have a parent partner. Returns one organization with its `ETag`. A organization the caller may not see returns 404.
Update an organization
PATCH/organizations/{id}
Every company on the platform: a tenant (with a subscription), an external account, or both. A partner org cannot have a parent partner. Updates the fields sent; omitted fields are unchanged. Requires `If-Match` with the current `ETag`: a stale tag returns 412 and a missing tag returns 428.
Create a client organization
POST/organizations/clients
Partner console (Section 4.6.1): creates a client organization under the caller's partner organization, on the given plan, with an Owner invite for the client, through `app.create_client_organization`. Requires `org.partner.manage` in the partner organization; partner staff gain no access to the client organization. The invite token is returned once. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.
Leave the partner
POST/organizations/leave-partner
The client Owner (org.billing.manage) types the bound org's name; the org leaves its partner and becomes a direct customer (app.leave_partner). Its rendered brand becomes its own, the partner's support sessions and standing grants end, and billing moves to the org as a 14-day trial of the same plan that stays once a card is added. Data and members are untouched. An org without a partner answers 422. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.