Skip to main content

Invite API

Create and verify invite tokens for gating access to the Agentbot platform.
Invite tokens are 64-character hex strings generated from crypto.randomBytes(32). The older 12-character code format is deprecated — see legacy format below.

Authentication

Create invite

Creates an invite token linked to your account. Requires an authenticated session.

Request body

Response

Errors

Verify invite

Verifies an invite token and returns invite details. No authentication required. Tokens must be in the 64-character hex format.

Request body

Response (valid)

The email field was removed from the verify response. The invite codes table does not store an email column. If you previously relied on this field, use a separate user lookup after verification.

Errors

List invites (admin)

Returns all invites with summary counts. Requires an authenticated session with an admin email address.

Response

Errors

Create invite (admin)

Creates an invite for a specific email address. Requires an authenticated session with an admin email address.

Request body

Response

Errors


Legacy invite format

The previous invite system used 12-character hex codes with POST /api/invite/generate and POST /api/invite/validate. These endpoints are deprecated. Migrate to the new endpoints above.

Deprecated: generate invite code

Previously generated a 12-character hex invite code. Replaced by POST /api/invite (session auth) and POST /api/admin/invites (admin session auth).

Deprecated: validate invite code

Previously validated and consumed a 12-character invite code. Replaced by POST /api/invites/verify, which accepts 64-character hex tokens and returns valid and plan fields.