Launch Week 02 wrapped — explore all five launches

Create Invitations

POSThttps://api.confident-ai.com/v2/projects/{projectId}/invitations

Invites people to this project by email and emails each of them a link. Accepting it adds the invitee to the project and, if they are not already in it, to the organization the project belongs to — so this endpoint can grow the organization, not just the project. Addresses are lowercased and must be company addresses. An address that already has an invitation to this project is dropped from the batch, and so is one that is already a member of it; if that leaves nothing to invite, the whole request is refused as a conflict instead. Note that someone who already belongs to the organization but not to this project is still invitable. projectRoleId sets the role every invitee lands on, and the Owner role cannot be handed out this way. On the Free plan, the organization's members plus new invitations cannot exceed 2 users. Only the invitations that were created are returned, each with its token.

POST/v2/projects/{projectId}/invitations
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>"
}'
200
{
  "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_KEYstringRequired

    The organization API key for your Confident AI organization.

Path parameters

  • projectIdstringRequired

    The id of the project, which must belong to your organization.

Request body

  • emailslist of stringsRequired

    The 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.

  • projectRoleIdstring

    The id of the project role every invitee lands on when they accept. Omit it to give them the default Member role. The Owner role cannot be handed out this way.

Response

Create Invitations succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    Every 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 objects

      The project's pending and declined invitations.

      Show 6 propertiesHide 6 properties
      • idinteger

        The id of the invitation, generated by Confident AI.

      • emailstring

        The email address the invitation was sent to, lowercased when it was created.

      • statusenum

        Where an invitation stands: PENDING while its link can still be accepted, ACCEPTED once the invitee joined, DECLINED once they turned it down. A declined invitation cannot be accepted again until it is resent.

        Show 3 enum valuesHide 3 enum values
        • PENDING
        • ACCEPTED
        • DECLINED
      • created_atstring

        When the invitation was issued, as an ISO 8601 datetime. Resending an invitation stamps this again.

      • projectRoleIdstring | null

        The id of the project role the invitee lands on when they accept, or null to give them the default Member role.

      • tokenstring | null

        The 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 null when the invitation has no token stored, in which case its link only points the invitee at signup.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI