Skip to main content
Invites let you onboard new users to your tenant. When you create an invite, Knowledge Stack sends the recipient an email containing an invite link. The recipient must already have (or create) a Knowledge Stack account before they can accept.

Create invite

Sends an email invitation to the specified address and creates a pending invite record.
POST https://api-staging.knowledgestack.ai/v1/invites
tenant_id
string
required
UUID of the tenant to invite the user to.
email
string
required
Email address of the person to invite.
role
string
Role to assign when the invite is accepted. One of USER, ADMIN, OWNER. Defaults to USER.
Invitations expire after a set period. If a user hasn’t accepted by the expiry date, you’ll need to create a new invite.
Example
curl -X POST https://api-staging.knowledgestack.ai/v1/invites \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "tenant_id": "a1b2c3d4-...",
    "email": "ada@example.com",
    "role": "USER"
  }'
ResponseInviteResponse
id
string
UUID of the invite.
tenant_id
string
UUID of the tenant.
email
string
Email address the invite was sent to.
role
string
Role the user will receive on acceptance. One of USER, ADMIN, OWNER.
The URL included in the invitation email. You can share this directly if needed.
expires_at
string
ISO 8601 timestamp when the invite expires.
accepted_at
string | null
ISO 8601 timestamp when the invite was accepted. null if still pending.
created_at
string
ISO 8601 timestamp when the invite was created.
updated_at
string
ISO 8601 timestamp of the last status change.

List invites

Returns all invites for the current tenant.
GET https://api-staging.knowledgestack.ai/v1/invites
page
integer
Page number (1-indexed).
page_size
integer
Number of results per page.
Example
curl https://api-staging.knowledgestack.ai/v1/invites \
  -H "Authorization: Bearer <your-api-key>"
ResponsePaginatedResponse[InviteResponse] InviteStatus values
ValueDescription
pendingThe invite has been sent but not yet accepted.
acceptedThe user accepted the invite and joined the tenant.
expiredThe invite passed its expiry date without being accepted.

Accept invite

Accepts a pending invite, adding the authenticated user to the tenant with the role specified in the invite.
POST https://api-staging.knowledgestack.ai/v1/invites/{invite_id}/accept
invite_id
string
required
UUID of the invite to accept.
The authenticated user must be the same person the invite was sent to. You cannot accept an invite on behalf of another user.
Example
curl -X POST https://api-staging.knowledgestack.ai/v1/invites/i1i2i3i4-.../accept \
  -H "Authorization: Bearer <your-api-key>"
ResponseAcceptInviteResponse
tenant_id
string
UUID of the tenant the user has now joined.
role
string
The role assigned to the user. One of USER, ADMIN, OWNER.

Delete invite

Revokes a pending invite. The invite link in the email immediately becomes invalid.
DELETE https://api-staging.knowledgestack.ai/v1/invites/{invite_id}
invite_id
string
required
UUID of the invite to revoke.
Once deleted, the invite cannot be recovered. The recipient will need a new invite to join the tenant.
Example
curl -X DELETE https://api-staging.knowledgestack.ai/v1/invites/i1i2i3i4-... \
  -H "Authorization: Bearer <your-api-key>"