POST /api/v2/billing/trial/extend#
OWNER ONLY. The trial's one self-serve extension: 7 more days, once. The optional reason answers "What's left to try?" and is kept for staff.
Authentication: Bearer token
Request body application/json
| Field | Type | Description |
|---|
reason | string | |
Responses
200 Extended
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
data required | object | |
type required | string one of trial | |
id required | string | |
attributes required | object | |
trial_ends_at required | string | |
trial_extended required | boolean | |
relationships | object | |
meta | object | |
included | array<object> | |
type required | string | |
id required | string | |
attributes required | object | |
meta | object | |
401 Unauthenticated
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
404 Not the owner. Identical to the body a stranger gets.
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
409 NOT_IN_TRIAL, or TRIAL_ALREADY_EXTENDED (staff can arrange more)
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
422 Validation error: reason over 500 characters
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
GET /api/v2/organizations/me#
The calling organization and the caller's role in it. `me` is the only addressable organization: a caller never names which one a request concerns.
Authentication: Bearer token
Parameters
| Name | In | Type | Description |
|---|
start_new_workspace | query | string one of true | |
Responses
200 The organization
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
data required | object | |
type required | string one of organizations | |
id required | string | |
attributes required | OrganizationAttrs | |
name required | string | |
brand_color required | string | null | |
role required | string one of owner, admin, reviewer, viewer | |
user_id required | string (uuid) | |
email required | string | null | |
relationships | object | |
meta | object | |
included | array<object> | |
type required | string | |
id required | string | |
attributes required | object | |
meta | object | |
401 Unauthenticated
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
409 JOIN_INVITATION_PENDING: no organization yet and an invitation is waiting for this address. The invitation link is not returned: it is only in the invitation email (040 M6, review R-H1). REMOVED_FROM_ORGANIZATION: removed and not yet started a workspace of their own; ?start_new_workspace=true skips this and answers WORKSPACE_SETUP_REQUIRED (040 M7). WORKSPACE_SETUP_REQUIRED: no workspace yet; this route no longer creates one, POST /api/v2/onboarding/workspace does (#091 D1).
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
GET /api/v2/organizations/me/entitlements#
The workspace plan as the API enforces it: resolved features, limits and allowances, and every public plan to compare. Any role. The console only hints from it.
Authentication: Bearer token
Responses
200 The resolved plan
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
data required | object | |
type required | string one of organization_entitlements | |
id required | string | |
attributes required | OrganizationEntitlementsAttrs | |
plan required | string | |
plan_name required | string | |
plan_version required | integer | |
status required | string one of trialing, active, past_due, restricted, paused, canceled | |
rev required | integer | |
period_start required | string | |
period_end required | string | |
scheduled_change required | object | null | |
trial_ends_at required | string | null | While trialing: when the trial ends. Null otherwise. |
trial_extended required | boolean | Whether the trial's one self-serve extension has been used. |
can_manage_billing required | boolean | The caller is the owner, or an admin with the billing-manager grant. |
checkout_available required | boolean | Whether this workspace can pay in the console; false means upgrades are arranged with us. |
test_controls required | boolean | The caller may use POST /billing/test/scenario: the test payment provider is in use, outside production. |
previous_plan required | object | null | On Free for under two weeks: the plan that ended, so the console can say so. |
plan_key required | string | |
plan_name required | string | |
ended_at required | string | |
reason required | string one of trial, founder, paid | |
features required | object | |
limits required | object | |
allowances required | object | |
plans required | array<object> | The current version of every public plan, cheapest first. |
key required | string | |
name required | string | |
sort_order required | integer | |
prices required | object | |
entitlements required | PlanEntitlements | |
features required | object | |
limits required | object | Null is unlimited. |
allowances required | object | |
overage | object | |
queue | object | |
relationships | object | |
meta | object | |
included | array<object> | |
type required | string | |
id required | string | |
attributes required | object | |
meta | object | |
401 Unauthenticated
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
GET /api/v2/organizations/me/invitations#
Staff invitations, newest first. The token is never returned.
Authentication: Bearer token
Responses
200 Invitations
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
data required | array<object> | |
type required | string one of organization_invitations | |
id required | string | |
attributes required | OrganizationInvitationAttrs | |
email required | string | |
role required | string one of owner, admin, reviewer, viewer | |
status required | string one of pending, accepted, revoked, expired | |
invited_by_user_id required | string | null | |
expires_at required | string | |
accepted_at required | string | null | |
created_at required | string | |
delivery_status | string one of delivered, delivery_failed | |
relationships | object | |
meta | object | |
meta | object | |
401 Unauthenticated
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
404 Not permitted
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
POST /api/v2/organizations/me/invitations#
Invite a colleague by email with a role. The token goes out by email and is never in the response.
Authentication: Bearer token
Request body application/json
| Field | Type | Description |
|---|
email required | string (email) | |
role required | string one of owner, admin, reviewer, viewer | |
Responses
201 Invitation created and a notification composed
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
data required | object | |
type required | string one of organization_invitations | |
id required | string | |
attributes required | OrganizationInvitationAttrs | |
email required | string | |
role required | string one of owner, admin, reviewer, viewer | |
status required | string one of pending, accepted, revoked, expired | |
invited_by_user_id required | string | null | |
expires_at required | string | |
accepted_at required | string | null | |
created_at required | string | |
delivery_status | string one of delivered, delivery_failed | |
relationships | object | |
meta | object | |
included | array<object> | |
type required | string | |
id required | string | |
attributes required | object | |
meta | object | |
401 Unauthenticated
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
404 Not permitted, including an admin inviting an owner
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
409 Already a member, or already has a pending invitation
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
422 Validation error
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
DELETE /api/v2/organizations/me/invitations/{id}#
Revoke a pending invitation.
Authentication: Bearer token
Parameters
| Name | In | Type | Description |
|---|
id required | path | string (uuid) | |
Responses
204 Revoked
No body.
401 Unauthenticated
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
404 No pending invitation with that id here
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
POST /api/v2/organizations/me/invitations/{id}/resend#
Send a pending staff invitation's email again, same token and expiry (040 M16).
Authentication: Bearer token
Parameters
| Name | In | Type | Description |
|---|
id required | path | string (uuid) | |
Responses
200 Resent; delivery_status says whether it went
No body.
404 No pending invitation by that id
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
429 RESEND_TOO_SOON: the last email was delivered under 5 minutes ago; Retry-After says when (review R-L3)
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
GET /api/v2/organizations/me/members#
People in the organization and their roles.
Authentication: Bearer token
Responses
200 Members
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
data required | array<object> | |
type required | string one of organization_members | |
id required | string | |
attributes required | OrganizationMemberAttrs | |
user_id required | string (uuid) | |
email required | string | null | |
role required | string one of owner, admin, reviewer, viewer | |
joined_at required | string | |
relationships | object | |
meta | object | |
meta | object | |
401 Unauthenticated
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
PATCH /api/v2/organizations/me/members/{userId}#
Change a role. Refuses demoting the last owner (409) and refuses an admin touching an owner (404, indistinguishable from absent).
Authentication: Bearer token
Parameters
| Name | In | Type | Description |
|---|
userId required | path | string (uuid) | |
Request body application/json
| Field | Type | Description |
|---|
role required | string one of owner, admin, reviewer, viewer | |
Responses
200 Role changed
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
data required | object | |
type required | string one of organization_members | |
id required | string | |
attributes required | OrganizationMemberAttrs | |
user_id required | string (uuid) | |
email required | string | null | |
role required | string one of owner, admin, reviewer, viewer | |
joined_at required | string | |
relationships | object | |
meta | object | |
included | array<object> | |
type required | string | |
id required | string | |
attributes required | object | |
meta | object | |
401 Unauthenticated
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
404 Not in this organization, or not permitted — identical in both cases
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
409 Would leave the organization with no owner
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
422 Validation error
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
DELETE /api/v2/organizations/me/members/{userId}#
Remove somebody. Their access ends on their next request; nothing is cached that would let them keep working. API keys they are responsible for are revoked, unless `keep_api_keys=true` holds them 14 days for an owner or admin to adopt (#093 D8).
Authentication: Bearer token
Parameters
| Name | In | Type | Description |
|---|
userId required | path | string (uuid) | |
keep_api_keys | query | string one of true, false | |
Responses
204 Removed
No body.
401 Unauthenticated
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
404 Not in this organization, or not permitted — identical in both cases
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
409 Would leave the organization with no owner
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
DELETE /api/v2/organizations/me/membership#
Leave the organization, of one's own accord (040 M6). Any role may; the last owner may not.
Authentication: Bearer token
Responses
204 Left
No body.
401 Unauthenticated
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
409 The last owner cannot leave
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
GET /api/v2/organizations/me/notices#
Maintenance notices in force for console users, with how loud each is now.
Authentication: Bearer token
Responses
200 OK
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
data required | array<object> | |
type required | string one of maintenance_notices | |
id required | string | |
attributes required | object | |
relationships | object | |
meta | object | |
meta | object | |
401 Missing or invalid user identity
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
404 Not found
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
GET /api/v2/organizations/me/oversight#
OWNER ONLY. Activity per person and organization totals that reconcile with it. There is no per-person route: a sub-user must not reach another person's activity, and the surest way is for it not to exist.
Authentication: Bearer token
Parameters
| Name | In | Type | Description |
|---|
from | query | string | |
to | query | string | |
Responses
200 Oversight for the resolved range
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
data required | object | |
type required | string one of organization_oversight | |
id required | string | |
attributes required | OversightAttrs | |
range required | object | |
from required | string | |
to required | string | |
days required | integer | |
time_zone required | string one of UTC | |
totals required | object | |
actions required | integer | |
by_action required | object | |
people_active required | integer | |
organization required | object | |
members required | integer | |
former_members_with_activity required | integer | |
people required | array<object> | |
user_id required | string (uuid) | |
email required | string | null | |
role required | any | |
in_organization required | boolean | |
actions required | integer | |
by_action required | object | |
last_active_at required | string | null | |
recent required | array<object> | |
id required | string (uuid) | |
actor_user_id required | string | null | |
actor_email required | string | null | |
action required | string | |
label required | string | |
subject_type required | string | null | |
subject_id required | string | null | |
occurred_at required | string | |
reconciles required | boolean | |
relationships | object | |
meta | object | |
included | array<object> | |
type required | string | |
id required | string | |
attributes required | object | |
meta | object | |
401 Unauthenticated
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
404 Not an owner. Identical to the body a stranger gets.
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
422 Invalid range; never silently clamped
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
GET /api/v2/organizations/me/usage#
This period's metered usage against each allowance, and the live counts behind each count-limit. Any role.
Authentication: Bearer token
Responses
200 Usage
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
data required | object | |
type required | string one of organization_usage | |
id required | string | |
attributes required | OrganizationUsageAttrs | |
plan required | string | |
period_start required | string | |
period_end required | string | |
meters required | array<object> | |
meter required | string | |
used required | integer | |
included required | integer | null | |
overage required | integer | |
cap required | string one of hard, soft | |
counts required | array<object> | |
key required | string | |
used required | integer | |
limit required | integer | null | |
relationships | object | |
meta | object | |
included | array<object> | |
type required | string | |
id required | string | |
attributes required | object | |
meta | object | |
401 Unauthenticated
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
GET /api/v2/public/organization-invitations/{token}#
What this invitation is, for the accept page. Unauthenticated: being asked to sign in to see what you are signing in for is how invitations get abandoned.
Authentication: No credential
Parameters
| Name | In | Type | Description |
|---|
token required | path | string (uuid) | |
Responses
200 A pending invitation
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
data required | object | |
type required | string one of organization_invitations | |
id required | string | |
attributes required | PendingInvitationAttrs | |
organization_name required | string | |
role required | string one of owner, admin, reviewer, viewer | |
email required | string | |
expires_at required | string | |
relationships | object | |
meta | object | |
included | array<object> | |
type required | string | |
id required | string | |
attributes required | object | |
meta | object | |
410 Expired, revoked, already accepted, or unknown — one body for all four
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
POST /api/v2/public/organization-invitations/{token}/accept#
Join the organization. Membership-free, NOT identity-free: the account that joins is the verified bearer of the token in the Authorization header, and must be the address invited.
Authentication: Bearer token
Parameters
| Name | In | Type | Description |
|---|
token required | path | string (uuid) | |
Responses
200 Joined
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
data required | object | |
type required | string one of organization_members | |
id required | string | |
attributes required | AcceptedInvitationAttrs | |
organization_name required | string | null | |
role required | string one of owner, admin, reviewer, viewer | |
joined_at required | string | |
relationships | object | |
meta | object | |
included | array<object> | |
type required | string | |
id required | string | |
attributes required | object | |
meta | object | |
401 Not signed in
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
409 Already in this organization, or already in another one
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
410 Expired, revoked, unknown, or signed in as a different address
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |