import requests
url = "https://platform.ankra.app/api/v1/org/organisation/invite"
payload = {
"invitee_email": "jsmith@example.com",
"organisation_id": "<string>"
}
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({invitee_email: 'jsmith@example.com', organisation_id: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/organisation/invite', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/organisation/invite \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invitee_email": "jsmith@example.com",
"organisation_id": "<string>"
}
'{
"message": "<string>",
"success": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Invite user to organisation
Invites a user by email into an organisation with the role member, admin or read-only and emails them the invitation. Only organisation admins may invite (403 otherwise); returns 400 when an invite already exists or the plan’s member limit is reached.
import requests
url = "https://platform.ankra.app/api/v1/org/organisation/invite"
payload = {
"invitee_email": "jsmith@example.com",
"organisation_id": "<string>"
}
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({invitee_email: 'jsmith@example.com', organisation_id: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/organisation/invite', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/organisation/invite \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invitee_email": "jsmith@example.com",
"organisation_id": "<string>"
}
'{
"message": "<string>",
"success": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The membership role. project limits the invitee to one project: it grants nothing organisation-wide and requires project_id.
member, admin, read-only, project Required with role project, refused with any other role: the project of this organisation the invitee will be limited to (404 when it is not a live project of the organisation).
Only with role project: the built-in role the invitee holds in the project (member when omitted); organisation-level permissions of the role never reach a project.
admin, operator, member, viewer