Create a new invite for the workspace.

Request Body

email
string
required

Email address of the person to invite

role
string
default:"member"

Role to assign to the invitee. Options: admin, member

isUrlInvite
boolean
default:"false"

Whether to create a URL-based invite (true) or send an email invitation (false)

groupIds
array

Array of group IDs to assign to the invitee

Response

invite
object

Invite details

Example Request

curl -X POST 'https://api.caret.so/v1/workspace/invites' \
  -H 'Authorization: Bearer {api_key}' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "jane@acme.com",
    "role": "member",
    "isUrlInvite": false,
    "groupIds": ["01887270-56cd-7da0-c95d-9a9e9ebc6f90"]
  }'

Example Response

{
  "invite": {
    "id": "01887270-45ab-7da0-c95d-9a9e9ebc5e89",
    "email": "jane@acme.com",
    "code": "ab3d5f8g",
    "role": "member",
    "expiresAt": "2023-09-15T00:00:00Z",
    "createdAt": "2023-08-15T08:30:00Z",
    "isUrlInvite": false
  }
}