Auth API reference

Auth API · Consumer-Tenants

get/{app_slug}/v1/tenants/{tenant_id}/invitesAuth

List a tenant's invites, newest first. Optional `?status=pending|revoked|expired|used`. PAK must hold auth.tenant.read.

Codes are never returned here — only the digest is stored. Use `status=pending` to show outstanding invitations.

Path parameters

app_slug*string

Slug of the app.

tenant_id*string

Id of the tenant.

Query parameters

limitinteger

Page size. Defaults to 20, clamped to 100. Values that do not parse as a positive integer fall back to the default.

cursorstring

Opaque `next_cursor` from the previous page. Keyed to the `created_at DESC, id DESC` ordering.

statusenum (4)

Derived lifecycle state. Precedence revoked > expired > used > pending, matching what the accept endpoint enforces.

Response · 200 List page.

data*array

The tenant invite items on this page.

pagination*object
next_cursor*string

Opaque cursor for the next page. `null` when no more pages are available.

Example: "eyJjcmVhdGVkX2F0IjoiMjAyNi0wNS0wMVQwMDowMDowMFoifQ"

has_more*boolean

True iff another page exists; if true, pass `next_cursor` on the next request.

Example: false

Example

Request

GET https://api.auth.productcraft.co/{app_slug}/v1/tenants/{tenant_id}/invites
Authorization: Bearer YOUR_TOKEN

Response

{
  "data": [
    {
      "id": "string",
      "tenant_id": "string",
      "email": "alice@example.com",
      "role_id": "string",
      "role_name": "member",
      "status": {},
      "max_uses": 1,
      "use_count": 0,
      "expires_at": "2026-01-01T00:00:00.000Z",
      "revoked_at": "2026-01-01T00:00:00.000Z",
      "invited_by": "string",
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "pagination": {
    "next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wNS0wMVQwMDowMDowMFoifQ",
    "has_more": false
  }
}