Auth API reference

Auth API · End-User-Invites

post/v1/apps/{app_id}/end-users/invitesAuth

Pre-allocate an EndUser invite. Dispatches an invitation email via the workspace's Mail sender.

Path parameters

app_id*string

Id of the app.

Headers

Idempotency-Keystring

Stripe-style idempotency key. Mint dispatches an email + writes an `invite` row; a retry without an idempotency key would double-send.

Request body

email*string

Invitee email. Locks the invite to this address.

Example: "alice@example.com"

namestring

Optional human-readable name shown in the email.

Example: "Alice Wong"

role_namestring

Role slug to grant on accept. Defaults to `member`.

Example: "member"

max_usesnumber

Maximum number of accepts. Defaults to 1.

expires_in_hoursnumber

Hours until the invite expires. Defaults to 72 (3 days).

Response · 201

id*string

Unique identifier of the invite.

code*string

Invite code the recipient submits to accept.

email*string

Email address.

role_name*string

Name of the role.

role_id*string

Id of the role.

max_uses*number

How many times the invite can be used, or `null` for no limit.

use_count*number

How many times the invite has been used.

expires_at*string · date-time

When the invite expires (ISO 8601), or `null` if it never does.

revoked_at*string · date-time

When the invite was revoked (ISO 8601), or `null` while it is active.

created_at*string · date-time

When the invite was created (ISO 8601).

Example

Request

POST https://api.auth.productcraft.co/v1/apps/{app_id}/end-users/invites
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "email": "alice@example.com",
  "name": "Alice Wong",
  "role_name": "member",
  "max_uses": 0,
  "expires_in_hours": 0
}

Response

{
  "id": "string",
  "code": "string",
  "email": "string",
  "role_name": "string",
  "role_id": "string",
  "max_uses": 0,
  "use_count": 0,
  "expires_at": "2026-01-01T00:00:00.000Z",
  "revoked_at": "2026-01-01T00:00:00.000Z",
  "created_at": "2026-01-01T00:00:00.000Z"
}