Memberships live on the LIVE organization and govern its test twin: manage them with the live id.
| Role | Scopes |
|---|---|
owner |
organization:read, organization:write, members:read, members:write, service_accounts:read, service_accounts:write, issuers:read, issuers:write, series:read, series:write, invoices:read, invoices:emit, invoices:void, invoices:correct, customers:read, events:read, webhooks:read, webhooks:write, production:request, templates:read, templates:write, templates:promote |
admin |
organization:read, organization:write, members:read, members:write, service_accounts:read, service_accounts:write, issuers:read, issuers:write, series:read, series:write, invoices:read, invoices:emit, invoices:void, invoices:correct, customers:read, events:read, webhooks:read, webhooks:write, production:request, templates:read, templates:write, templates:promote |
operator |
organization:read, templates:read, issuers:read, series:read, invoices:read, invoices:emit, invoices:correct, customers:read, events:read |
viewer |
organization:read, issuers:read, series:read, invoices:read, customers:read, templates:read |
A person joins by invitation
-
An owner or admin calls
POST /v1/invitations(permissionmembers:write;Idempotency-Keyrequired) with theemailand therole. The service writes to that address with a code. The code is never returned by the API;deliverysays whether the email went out. -
The invited person signs in (see getting a credential) and calls
POST /v1/invitations/accept(a person’s access token) with that code astoken. The email of their account must be VERIFIED and equal to the invited one. The answer carries the id of the organization to send inX-Organization. To show the person what they are accepting first,POST /v1/invitations/inspectanswers the organization, the role and when it expires, and accepts nothing. A person without an agent uses the button of the email instead: it opens the web, which does the same two calls.
An invitation lasts 7 days. GET /v1/invitations lists them; POST /v1/invitations/{id}/resend sends a new code (the previous one stops working); DELETE /v1/invitations/{id} revokes it.
Accepting can refuse with: invitation_not_found, invitation_expired, email_not_verified, invitation_email_mismatch. Inviting can refuse with: live_organization_required, scope_not_grantable, already_member.
Changing and removing
PUT /v1/members/{user_id} (permission members:write) changes the role of someone who is already a member; DELETE /v1/members/{user_id} (permission members:write) removes them. Only an owner grants or removes the owner role, and an organization always keeps one (last_owner). The service accounts and keys a person created keep working: they belong to the organization.