POST /organizations
Updated Oct 1, 20261 minute read
Create an organization
Creates one, makes the token's person its owner, and binds the session to it, so the next request is already working inside it. Token-only. The slug derives from the name when omitted.
Part of Account.
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
slug | string | No |
Responses
| Status | Description |
|---|---|
200 | The organization, already bound. |
400 | The request is malformed, and the message names the field. |
401 | The bearer token is missing, revoked, or expired. |
429 | Too many requests. Wait the seconds in Retry-After. Limits depend on the plan. See rate limits. |
200 body
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | |
name | string | No | |
slug | string | No |
Example request
curl -X POST https://api.median.sh/v1/organizations \
-H "Authorization: Bearer $BEARER_AUTH" \
-H "content-type: application/json" \
-d '{"name":"Acme"}'