Auth API reference

Auth API · Consumer-Admin

patch/{app_slug}/v1/admin/users/{user_id}Auth

Update an end-user's display name or primary email

Email update promotes an existing contact to primary (not for creating new contacts — that goes through the per-contact flow).

Path parameters

app_slug*string

Slug of the app.

user_id*string

Id of the user.

Request body

display_namestring

New display name. Empty string clears.

Example: "Ada Lovelace"

emailstring

New primary email address. Replaces the current primary email contact (still unverified after the change).

Response · 200

id*string

Unique identifier of the end user.

username*string

The end user's username, unique within the app.

display_name*string

Human-readable name of the end user.

status*string

Account status: `active`, `suspended` or `deactivated`.

role*string

App-level role name of the user, or `null` for none.

joined_at*string · date-time

When the member joined the tenant (ISO 8601).

created_at*string · date-time

When the end user was created (ISO 8601).

email*string

Email address.

email_verified_at*string · date-time

When the primary email was verified, or `null` until it is.

active_session_count*number

Sessions of the user that are currently active.

last_used_at*string · date-time

When the end user was last used (ISO 8601), or `null` if never.

Example

Request

PATCH https://api.auth.productcraft.co/{app_slug}/v1/admin/users/{user_id}
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "display_name": "Ada Lovelace",
  "email": "string"
}

Response

{
  "id": "string",
  "username": "string",
  "display_name": "string",
  "status": "string",
  "role": "string",
  "joined_at": "2026-01-01T00:00:00.000Z",
  "created_at": "2026-01-01T00:00:00.000Z",
  "email": "string",
  "email_verified_at": "2026-01-01T00:00:00.000Z",
  "active_session_count": 0,
  "last_used_at": "2026-01-01T00:00:00.000Z"
}