Auth API reference

Auth API · Consumer-Tenants

patch/{app_slug}/v1/tenants/{tenant_id}/members/{account_id}Auth

Change a member's role. PAK must hold auth.tenant.members.update-role.

Path parameters

app_slug*string

Slug of the app.

tenant_id*string

Id of the tenant.

account_id*string

Id of the account.

Request body

role_name*string

New role name from the app's `role` table.

Example: "admin"

Response · 200 Updated membership.

id*string

Unique identifier of the tenant membership.

tenant_id*string

The tenant the tenant membership belongs to.

account_id*string

The end user (account) the tenant membership belongs to.

role_id*string

Id of the role.

role_name*string

Name of the role.

joined_at*string · date-time

When the member joined the tenant (ISO 8601).

invited_by*string

The account that created the invite, or `null` when an API key did.

Example

Request

PATCH https://api.auth.productcraft.co/{app_slug}/v1/tenants/{tenant_id}/members/{account_id}
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "role_name": "admin"
}

Response

{
  "id": "string",
  "tenant_id": "string",
  "account_id": "string",
  "role_id": "string",
  "role_name": "string",
  "joined_at": "2026-01-01T00:00:00.000Z",
  "invited_by": "string"
}