import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/invites/invite/"
payload = {
"email": "[email protected]",
"permissions": ["CAN_VIEW_DATA", "CAN_PERFORM_ADMIN_ACTIONS"],
"profile": "contributor"
}
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: '[email protected]',
permissions: ['CAN_VIEW_DATA', 'CAN_PERFORM_ADMIN_ACTIONS'],
profile: 'contributor'
})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/invites/invite/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/invites/invite/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"permissions": [
"CAN_VIEW_DATA",
"CAN_PERFORM_ADMIN_ACTIONS"
],
"profile": "contributor"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]",
"permissions": [
"CAN_PERFORM_ADMIN_ACTIONS"
],
"profile": "contributor",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"invited_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]",
"display_name": "<string>",
"is_service_account": true,
"date_joined": "2023-11-07T05:31:56Z"
},
"assigned_interview_count": 123,
"type": "new_user"
}{
"error": "User not found"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}Invite user to project
Invite a user to join the project.
- For new users (not registered): Creates a pending invite and sends an email.
- For existing users: Automatically accepts the invite and sends a notification.
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/invites/invite/"
payload = {
"email": "[email protected]",
"permissions": ["CAN_VIEW_DATA", "CAN_PERFORM_ADMIN_ACTIONS"],
"profile": "contributor"
}
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: '[email protected]',
permissions: ['CAN_VIEW_DATA', 'CAN_PERFORM_ADMIN_ACTIONS'],
profile: 'contributor'
})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/invites/invite/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/invites/invite/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"permissions": [
"CAN_VIEW_DATA",
"CAN_PERFORM_ADMIN_ACTIONS"
],
"profile": "contributor"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]",
"permissions": [
"CAN_PERFORM_ADMIN_ACTIONS"
],
"profile": "contributor",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"invited_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]",
"display_name": "<string>",
"is_service_account": true,
"date_joined": "2023-11-07T05:31:56Z"
},
"assigned_interview_count": 123,
"type": "new_user"
}{
"error": "User not found"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}Authorizations
Use Authorization: Bearer <token>. The token is either a user token / OAuth access
token, or a service-account API key (cfk_...). A key is valid on every endpoint and
acts as its service account, an organization member with per-store permissions.
Refused keys answer 403 with Invalid API key., API key revoked.,
API key expired. or API key disabled..
Path Parameters
UUID of the project
Body
Email address of the user to invite
Permissions to grant to the user
CAN_PERFORM_ADMIN_ACTIONS: Full administrative accessCAN_VIEW_DATA: Read-only access to project dataCAN_IMPERSONATE_OTHER_USERS: Impersonate other users in API calls (for a person, contact Clarifeye to enable it; org admins grant it to a service account)
CAN_PERFORM_ADMIN_ACTIONS, CAN_VIEW_DATA, CAN_IMPERSONATE_OTHER_USERS [ "CAN_VIEW_DATA", "CAN_PERFORM_ADMIN_ACTIONS" ]
Profile to assign to the invited user on the project.
Defaults to contributor when omitted.
tech, contributor, user Response
Invitation created successfully
CAN_PERFORM_ADMIN_ACTIONS: Full administrative accessCAN_VIEW_DATA: Read-only access to project dataCAN_IMPERSONATE_OTHER_USERS: Impersonate other users in API calls (for a person, contact Clarifeye to enable it; org admins grant it to a service account)
CAN_PERFORM_ADMIN_ACTIONS, CAN_VIEW_DATA, CAN_IMPERSONATE_OTHER_USERS Profile of the user on the project. The profile shapes the UI surface a
user sees (sidebar, available views) and complements the fine-grained
permissions list.
tech: Technical profile with access to advanced/technical interfacescontributor: Default profile for users who contribute to the projectuser: End-user profile with the most restricted UI surface
tech, contributor, user pending: Invitation sent, awaiting responseaccepted: User accepted the invitationcancelled: Invitation was cancelled
pending, accepted, cancelled Show child attributes
Show child attributes
Interviews still waiting on this invitation. Non-zero means the invitation exists to deliver an interview, so removing CAN_TAKE_INTERVIEW would leave the invitee notified but unable to open it.
new_user: User not registered, invite is pendingexisting_user: User exists, invite auto-accepted
new_user, existing_user