POST /invites
Updated Oct 1, 20261 minute read
Invite somebody
The invitation exists immediately and the email sends itself; path is the invite link's path on the dashboard, for sharing by hand. Token-only: a key acts for the organization with nobody behind it, and inviting somebody in is a person's decision. Only an owner's own token can grant owner.
Part of Organization.
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | |
role | "owner" | "admin" | "member" | Yes |
Responses
| Status | Description |
|---|---|
200 | The invitation and its link. |
400 | The request is malformed, and the message names the field. |
401 | The bearer token is missing, revoked, or expired. |
403 | The token's person does not hold the role this needs. |
409 | It already exists, or it was already settled. |
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 | |
path | string | No |
Example request
curl -X POST https://api.median.sh/v1/invites \
-H "Authorization: Bearer $BEARER_AUTH" \
-H "content-type: application/json" \
-d '{"email":"casey@example.com","role":"member"}'