Approve a sign-up
A person who signed up under open sign-up is pending and can do nothing (pending_approval) until a tenant admin approves them here, with their first grants. The grants are checked exactly as an invite's are; the member becomes active, the grants are stored and one member_approved event is written in one step.
Authorization
bearer In: header
Path Parameters
Member id
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
The body of approveMember: the first grants of the person who signed up.
One grant per project at most; none is fine (the person starts with no access). Checked as an invite's grants are.
Teams of the tenant the member joins (at most 50 after duplicates are dropped); empty is none. Checked with the grants on the member's union, as an invite's are.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/members/497f6eca-6276-4993-bfeb-53cbbbba6f08/approve" \ -H "Content-Type: application/json" \ -d '{}'{ "accepted_at": "2019-08-24T14:15:22Z", "access": { "level": "tenant_admin", "projects": [ { "platform_role": "viewer", "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9", "via": "own" } ] }, "created_at": "2019-08-24T14:15:22Z", "display_name": "string", "email": "string", "has_access": true, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "invite": { "expires_at": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" }, "status": "invited", "suspended_at": "2019-08-24T14:15:22Z", "suspended_by": "c2e368d8-db1b-4e27-8850-4fa018b3a2bc", "tenant_admin": true}Remove a member DELETE
The member's grants, overrides and open invites go, their Postgres member roles are dropped on every branch, their personal logins are revoked (the member is marked offboarded) and realtime drops what they watched, all in this request. When they are an active member of no other tenant, their account's sessions end, and when no other tenant holds them at all (an open invite, a pending sign-up or a suspension counts) the account is banned too. While they are an active member of another tenant the account is left alone (its sessions name the tenant they were made for, and minting a token checks that membership). A still-valid token is refused at once. Every step runs even when one fails; removing a removed member again redoes every step after the removal.
Decline a sign-up POST
The pending member becomes `removed` (one `member_declined` event), then, as for a removal, their personal logins are revoked, their account's sessions end when they are an active member of no other tenant, and the account is banned when no other tenant holds them at all. A still-valid token is refused at once. Every step runs even when one fails; declining a removed member again redoes those steps.