Skip to content

Invite a person by email (admin; only owners grant owner)

POST
/v1/orgs/{org}/members
curl --request POST \
--url https://example.com/v1/orgs/example/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "example", "role": "viewer", "password_account": true, "locale": "en" }'
org
required
string

Organization (tenant) slug, e.g. alpenrobotik

Media typeapplication/json
object
email
required
string
role
required

Viewer reads; member also submits reports; admin also manages keys and members; owner also billing

string
Allowed values: viewer member admin owner
password_account

Also create a Keycloak password account and send its setup email (verify the address, choose a password, set up an authenticator app; the link works 24 h). For people without GitHub, Google or their company’s sign-in. Nothing is created or sent if the person already has any login. This happens after the response, which is the same either way, so it doesn’t tell whether the person has a login.

boolean
locale
One of:

A language Affectra is available in

string
Allowed values: en de fr it

Added. The person joins on first sign-in with that email.

Media typeapplication/json
object
user
required
string
email
required
string
name
string
role
required

Viewer reads; member also submits reports; admin also manages keys and members; owner also billing

string
Allowed values: viewer member admin owner
joined
required

False until the invited person has signed in once

boolean
source

Github: granted by the linked GitHub organization and removed when the person leaves it there

string
Allowed values: invite github

Example

{
"role": "viewer",
"source": "invite"
}

Invalid email, role or locale, or password accounts are not available

Caller is not an admin, or grants owner without being one

Already a member

Accounts.setupEmailLimit: too many setup emails for this organization (20 an hour); or request.rateLimited (RateLimited). See Retry-After