POST
/
v1
/
api
/
workspaces
/
{workspaceId}
/
invite
curl --request POST \
  --url https://api.trillet.ai/v1/api/workspaces/{workspaceId}/invite \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '{
  "email": "<string>",
  "role": "<string>"
}'
{
  "success": true,
  "message": "<string>"
}

Path Parameters

workspaceId
string
required

The unique identifier of the workspace where the invitation is being sent.

Headers

x-workspace-id
string
required

The unique identifier of the workspace being accessed (should match the path parameter :workspaceId).

Request Body

email
string
required

The email address of the person to invite.

role
string
required

The role to assign to the invited user (“admin”, “editor”, “viewer”).

Description

This endpoint allows a workspace owner to invite a new team member to their workspace by email.

  • The system checks for any existing pending invitation for the same email to prevent duplicates.
  • A new invitation record is created and stored with a 7-day expiration.
  • An invitation email is sent to the invitee with a secure link to accept the invitation.

If the workspace is configured in agency mode with white-label settings, the invitation email will be sent using the workspace’s verified custom email (if available).

Invitation Email Behavior

  • The email contains the inviter’s email, the workspace name, and a secure invitation acceptance link.
  • If the workspace has a white-label custom domain, the invitation link will use that domain.
  • If no custom domain is available, the link will use the default frontend URL.

The invitation expires automatically after 7 days if not accepted.

Response Fields

success
boolean

Indicates whether the invitation was successfully sent.

message
string

A message confirming the outcome of the invitation process.

POST
/
v1
/
api
/
workspaces
/
{workspaceId}
/
invite
curl --request POST \
  --url https://api.trillet.ai/v1/api/workspaces/{workspaceId}/invite \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '{
  "email": "<string>",
  "role": "<string>"
}'
{
  "success": true,
  "message": "<string>"
}

Path Parameters

workspaceId
string
required

The unique identifier of the workspace where the invitation is being sent.

Headers

x-workspace-id
string
required

The unique identifier of the workspace being accessed (should match the path parameter :workspaceId).

Request Body

email
string
required

The email address of the person to invite.

role
string
required

The role to assign to the invited user (“admin”, “editor”, “viewer”).

Description

This endpoint allows a workspace owner to invite a new team member to their workspace by email.

  • The system checks for any existing pending invitation for the same email to prevent duplicates.
  • A new invitation record is created and stored with a 7-day expiration.
  • An invitation email is sent to the invitee with a secure link to accept the invitation.

If the workspace is configured in agency mode with white-label settings, the invitation email will be sent using the workspace’s verified custom email (if available).

Invitation Email Behavior

  • The email contains the inviter’s email, the workspace name, and a secure invitation acceptance link.
  • If the workspace has a white-label custom domain, the invitation link will use that domain.
  • If no custom domain is available, the link will use the default frontend URL.

The invitation expires automatically after 7 days if not accepted.

Response Fields

success
boolean

Indicates whether the invitation was successfully sent.

message
string

A message confirming the outcome of the invitation process.