Organization API: Organizations & Members: Orgs
The 2 Organization API operations for orgs.
Part of Organizations & Members.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/orgs |
List organizations |
| POST | /api/v1/orgs |
Create organization |
List organizations
Section titled List organizationsGET /api/v1/orgs
The organizations this account belongs to, newest first, each with
the caller's role in my_role: owner for the org's owner whatever
their member row says, as get_org_context decides it.
A deleted one is left out for every member: its owner deleted it, and
only platform staff can bring it back.
Authentication: an access token of a member of the organization, sent as Authorization: Bearer <token>.
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
A 200 response is a list; each item has these fields:
| Field | Type |
|---|---|
[].id |
integer |
[].slug |
string |
[].name |
string |
[].tier |
string |
[].status |
string |
[].billing_mode |
string |
[].created_at |
string (date-time) or null |
[].my_role |
string or null |
Create organization
Section titled Create organizationPOST /api/v1/orgs
Authentication: an access token of a member of the organization, sent as Authorization: Bearer <token>.
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
name |
string | yes |
slug |
string | yes |
billing_mode |
string | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
201 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 201 response:
| Field | Type |
|---|---|
id |
integer |
slug |
string |
name |
string |
owner_user_id |
integer |
parent_org_id |
integer or null |
tier |
string |
status |
string |
billing_mode |
string |
platform_fee_percent |
string |
max_customers |
integer |
max_services |
integer |
max_sub_resellers |
integer |
max_api_calls_month |
integer |
max_custom_products |
integer |
created_at |
string (date-time) or null |
updated_at |
string (date-time) or null |
my_role |
string or null |