Use this API to manage invitations and add users to a group or project.

List all pending invitations for a group

GET /api/v4/groups/{id}/invitations

Lists all pending invitations for a specified group viewable by the authenticated user. Returns invitations to direct members only, and not through inherited ancestor groups. This function takes pagination parameters page and per_page to restrict the list of members.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the group
page
Query
IntegerPage number of results to retrieve
Default: 1
Example: 1
per_page
Query
IntegerNumber of items to list per page
Default: 20
Example: 20
query
Query
StringReturn only invitations sent to this email address. Must match exactly. If omitted, returns all invitations

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesInvitation
400Bad Request—
404Not Found—

Add a member to a group

POST /api/v4/groups/{id}/invitations

Adds a member to a group. You can specify a user ID or invite a user by email.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the group

Request body (application/json)

PropertyTypeDescription
access_level
Required
IntegerAccess level to grant to the invited user. For a list of values, see roles
Allowed values: 10, 15, 20, 25, 30, 40, 50
emailArray of stringsEmail address of the member to invite, or multiple email addresses separated by commas. Required if user_id is not provided
expires_atString (date-time)Date when the invitation expires
invite_sourceStringSource of the invitation that starts the member creation process
Default: invitations-api
user_idArray of stringsID of the user to invite, or multiple IDs separated by commas. Required if email is not provided

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesInvitation
400Bad Request—
404Not Found—

Update an invitation to a group

PUT /api/v4/groups/{id}/invitations/{email}

Updates a pending invitation to a group.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the group
email
Path, required
StringEmail address the invitation was previously sent to

Request body (application/json)

PropertyTypeDescription
access_levelIntegerAccess level to grant to the invited user. For a list of values, see roles
Allowed values: 10, 15, 20, 25, 30, 40, 50
expires_atString (date-time)Date when the invitation expires

Responses

CodeDescriptionSchema
200OKAPIEntitiesInvitation
400Bad Request—
404Not Found—

Delete an invitation to a group

DELETE /api/v4/groups/{id}/invitations/{email}

Deletes a pending invitation to a specified email address for a group.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the group
email
Path, required
StringEmail address the invitation was previously sent to

Responses

CodeDescriptionSchema
204No Content—
400Bad Request—
403Forbidden—
404Not found—
409Could not delete invitation—

List all pending invitations for a project

GET /api/v4/projects/{id}/invitations

Lists all pending invitations for a specified project viewable by the authenticated user. Returns invitations to direct members only, and not through inherited ancestor groups. This function takes pagination parameters page and per_page to restrict the list of members.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
page
Query
IntegerPage number of results to retrieve
Default: 1
Example: 1
per_page
Query
IntegerNumber of items to list per page
Default: 20
Example: 20
query
Query
StringReturn only invitations sent to this email address. Must match exactly. If omitted, returns all invitations

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesInvitation
400Bad Request—
404Not Found—

Add a member to a project

POST /api/v4/projects/{id}/invitations

Adds a member to a project. You can specify a user ID or invite a user by email.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project

Request body (application/json)

PropertyTypeDescription
access_level
Required
IntegerAccess level to grant to the invited user. For a list of values, see roles
Allowed values: 10, 15, 20, 25, 30, 40, 50
emailArray of stringsEmail address of the member to invite, or multiple email addresses separated by commas. Required if user_id is not provided
expires_atString (date-time)Date when the invitation expires
invite_sourceStringSource of the invitation that starts the member creation process
Default: invitations-api
user_idArray of stringsID of the user to invite, or multiple IDs separated by commas. Required if email is not provided

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesInvitation
400Bad Request—
404Not Found—

Update an invitation to a project

PUT /api/v4/projects/{id}/invitations/{email}

Updates a pending invitation to a project.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
email
Path, required
StringEmail address the invitation was previously sent to

Request body (application/json)

PropertyTypeDescription
access_levelIntegerAccess level to grant to the invited user. For a list of values, see roles
Allowed values: 10, 15, 20, 25, 30, 40, 50
expires_atString (date-time)Date when the invitation expires

Responses

CodeDescriptionSchema
200OKAPIEntitiesInvitation
400Bad Request—
404Not Found—

Delete an invitation to a project

DELETE /api/v4/projects/{id}/invitations/{email}

Deletes a pending invitation to a specified email address for a project.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
email
Path, required
StringEmail address the invitation was previously sent to

Responses

CodeDescriptionSchema
204No Content—
400Bad Request—
403Forbidden—
404Not found—
409Could not delete invitation—

Schemas

Objects returned by the operations above and objects nested in their request bodies.

APIEntitiesInvitation

PropertyTypeDescription
access_levelString—
created_atString—
created_by_nameString—
expires_atString—
invite_emailString—
invite_tokenString—
user_nameString—