Invite a user by email
curl --request POST \
--url https://albus.sh/api/invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com"
}
'import requests
url = "https://albus.sh/api/invites"
payload = { "email": "jsmith@example.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com'})
};
fetch('https://albus.sh/api/invites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"email": "<string>",
"role": "<string>",
"organization_id": "<string>"
}{
"message": "Invalid request parameters"
}{
"message": "Invalid or expired token"
}{
"message": "Idempotency key reused with a different request body"
}Invites
Invite a user by email
Creates a pending invitation for an email address. Omit organization_id to invite the user as the founder of a new organization that is created on their first sign-in; provide it to invite them into an existing organization. The invitation is redeemed automatically the first time the invitee signs in with that email.
POST
/
invites
Invite a user by email
curl --request POST \
--url https://albus.sh/api/invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com"
}
'import requests
url = "https://albus.sh/api/invites"
payload = { "email": "jsmith@example.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com'})
};
fetch('https://albus.sh/api/invites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"email": "<string>",
"role": "<string>",
"organization_id": "<string>"
}{
"message": "Invalid request parameters"
}{
"message": "Invalid or expired token"
}{
"message": "Idempotency key reused with a different request body"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Email address of the person to invite.
Role to grant the invitee. Defaults to admin when inviting to a new organization and member when inviting into an existing one.
Available options:
admin, member Organization to invite the user into (e.g. "42"). Omit to create a new organization for the user on their first sign-in.