Invite someone to join the organization. Requires users.invite permission.
Request body
Required.
application/json
emailstring (email) · requiredroleIdsstring (uuid)[] · requiredsiteIdsstring (uuid)[]
{
"email": "jane.doe@example.com",
"roleIds": [
"01930a94-6a1a-7834-b6c2-4fb5efb0988a"
],
"siteIds": [
"019222d4-1d93-7d47-a3c4-b547e009a0f7"
]
}
Responses
| Status | Description |
|---|---|
| 201 | The invitation was created successfully |
| 403 | The requesting user lacks appropriate permissions |
| 422 | Validation errors |
Response 201 body
dataobject · required
{
"data": {
"id": "019222d4-1d93-7d47-a3c4-b547e009a0f7",
"acceptedAt": null,
"email": "jane.doe@example.com",
"expiresAt": "2024-07-30T19:00:00Z",
"invitedAt": "2024-06-30T19:00:00Z",
"invitedBy": {
"id": "019222d9-d87d-7724-bba6-ba91503ea311",
"firstName": "John",
"lastName": "Doe"
},
"isExpired": false,
"isPending": true,
"roles": [
{
"id": "01930a94-6a1a-7834-b6c2-4fb5efb0988a",
"name": "Admin"
}
],
"sites": [
{
"id": "019222d4-1d93-7d47-a3c4-b547e009a0f7",
"name": "Stockholm Office"
}
]
}
}