Invitations

List of invitations

GET /api/v0/invitations

Required permissions for API key

  • Read

Response

Success

{
  "invitations": [<invitation>, <invitation>, ...]
}

<invitation> is an object that contains the following keys.

KEY TYPE DESCRIPTION
email string the email address that sent the invitation
authority string the authority when joining from invitation (manager,collaborator,viewer)
expiresAt number the expiration date of the invitation (in epoch seconds)

Creating an invitation

Specify an email address and permission and invite a user to the organization.

POST /api/v0/invitations

Required permissions for API key

  • Read
  • Write

Input

KEY TYPE DESCRIPTION
email string the email address to send the invitation
authority string the default permission when joining from an invitation (manager,collaborator,viewer)

Example input

{
  "email": "example@example.com",
  "authority": "viewer"
}

Response

Success

The expiresAt field (in epoch seconds) is given and returned with the input. Invitations can not be used after the moment of expiresAt.

{
  "email": "example@example.com",
  "authority": "viewer",
  "expiresAt": 1492393387
}

Error

STATUS CODE DESCRIPTION
400 when JSON format is incorrect, when an email address that has already been invited or an organization member’s email address is specified
403 when the API doesn't have the required permissions / when accessing from outside the permitted IP address range

Cancelling an invitation

Specify the email address and cancel an invitation to the organization.

POST /api/v0/invitations/revoke

Required permissions for API key

  • Read
  • Write

Input

KEY TYPE DESCRIPTION
email string email address to cancel invitation

Example input

{
  "email": "example@example.com"
}

Response

Success

{
  "success": true
}

Error

STATUS CODE DESCRIPTION
400 when JSON format is incorrect
403 when the API doesn't have the required permissions / when accessing from outside the permitted IP address range
404 when the specified email has not be sent an invitation