POST
/
invitations
curl --request POST \
  --url https://app.getcensus.com/api/v1/invitations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "newuser@example.com",
  "role": "admin",
  "workspaces": [
    {
      "id": 1234,
      "role": "Viewer"
    },
    {
      "id": 4567,
      "role": "Editor"
    }
  ]
}'
{
  "status": "success",
  "data": {
    "id": 90967,
    "email": "newuser@example.com",
    "created_at": "2023-09-22T20:25:45.185Z",
    "created_by_id": 13,
    "claimed_at": "2023-09-22T20:25:45.185Z",
    "claimed_by_id": 11,
    "role": "admin",
    "associated_workspace_invitations": [
      {
        "id": 90967,
        "workspace_id": 1234,
        "role": "Viewer"
      }
    ]
  }
}

Authorizations

Authorization
string
headerrequired

Bearer authorization using your Personal Access Token. Generate a new PAT on your user settings page.

Body

application/json
email
string

Email address of the invitee.

role
enum<string>

Role assigned to the invitee.

Available options:
admin,
member
workspaces
object[]

List of workspace to which the invitee will be added to once they accept their invitation and the role they'll be assigned for each one. Each workspace must exist as part of the current organization. If the user is already a member of the organization they'll be automatically added to each workspace listed.

Response

200 - application/json
status
enum<string>
required

The outcome of the creation request

Available options:
success
data
object
required