Create Project Invitations
(v2)POST
Invites people to this project by email, each with a link. Accepting can grow the organization too, not just the project. Addresses that already have an invitation to this project, or already belong to it, are dropped from the batch; if that leaves nothing, the request is refused as a conflict. The Free plan caps the organization's members plus invitations at 2. Only the invitations created are returned.
curl -X POST "https://api.confident-ai.com/v2/projects/{projectId}/invitations" \
-H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"emails": [
"jane@acme.com"
],
"projectRoleId": "<PROJECT-ROLE-ID>"
}'{
"success": true,
"data": {
"invitations": [
{
"id": 42,
"email": "jane@acme.com",
"status": "PENDING",
"created_at": "2025-01-15T10:30:00.000Z",
"projectRoleId": "<PROJECT-ROLE-ID>",
"token": "<INVITATION-TOKEN>"
}
]
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe organization API key for your Confident AI organization.
Path parameters
projectIdstringRequiredThe id of the project, which must belong to your organization.
Request body
emailslist of stringsRequiredThe email addresses to invite, between 1 and 50 of them. Each is trimmed and lowercased, and must be a company address — free and disposable domains are refused.
projectRoleIdstringThe id of the project role every invitee lands on when they accept. Omit it to give them the default
Memberrole. TheOwnerrole cannot be handed out this way.
Response
Create Project Invitations succeeded.
successbooleanIndicates if the request was successful.
dataobjectEvery invitation to this project that has not been accepted or revoked. Accepted invitations are left out, since the invitee is a project member by then.
Show 1 propertyHide 1 property
invitationslist of objectsThe project's pending and declined invitations.
Show 6 propertiesHide 6 properties
idintegerThe id of the invitation, generated by Confident AI.
emailstringThe email address the invitation was sent to, lowercased when it was created.
statusenumWhere an invitation stands:
PENDINGwhile its link can still be accepted,ACCEPTEDonce the invitee joined,DECLINEDonce they turned it down. A declined invitation cannot be accepted again until it is resent.Show 3 enum valuesHide 3 enum values
PENDINGACCEPTEDDECLINED
created_atstringWhen the invitation was issued, as an ISO 8601 datetime. Resending an invitation stamps this again.
projectRoleIdstring | nullThe id of the project role the invitee lands on when they accept, or
nullto give them the defaultMemberrole.tokenstring | nullThe token embedded in the invitee's invite link, returned unmasked. Anyone holding it can accept the invitation as the invited email address, so treat it as a secret. It is replaced whenever the invitation is resent, which invalidates any link sent earlier. It is
nullwhen the invitation has no token stored, in which case its link only points the invitee at signup.
deprecatedbooleanIndicates if this endpoint is deprecated.