Create a new invite for the workspace.
Request Body
Email address of the person to invite
Role to assign to the invitee. Options: admin, member
Whether to create a URL-based invite (true) or send an email invitation
(false)
Array of group IDs to assign to the invitee
Response
Invite details
Unique identifier for the invite
Email address of the invitee
Role assigned to the invitee
ISO8601 timestamp when the invite expires
ISO8601 timestamp when the invite was created
Whether this is a URL-based invite
Example Request
curl -X POST 'https://api.caret.so/v1/workspace/invites' \
-H 'Authorization: Bearer {api_key}' \
-H 'Content-Type: application/json' \
-d '{
"email": "[email protected]",
"role": "member",
"isUrlInvite": false,
"groupIds": ["01887270-56cd-7da0-c95d-9a9e9ebc6f90"]
}'
Example Response
{
"invite": {
"id": "01887270-45ab-7da0-c95d-9a9e9ebc5e89",
"email": "[email protected]",
"code": "ab3d5f8g",
"role": "member",
"expiresAt": "2023-09-15T00:00:00Z",
"createdAt": "2023-08-15T08:30:00Z",
"isUrlInvite": false
}
}