Invite a person by email (admin; only owners grant owner)
const url = 'https://example.com/v1/orgs/example/members';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"email":"example","role":"viewer","password_account":true,"locale":"en"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization (tenant) slug, e.g. alpenrobotik
Request Bodyrequired
Section titled “Request Bodyrequired”object
Viewer reads; member also submits reports; admin also manages keys and members; owner also billing
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.
Responses
Section titled “Responses”Added. The person joins on first sign-in with that email.
object
Viewer reads; member also submits reports; admin also manages keys and members; owner also billing
False until the invited person has signed in once
Github: granted by the linked GitHub organization and removed when the person leaves it there
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