Auth API reference

Auth API · Roles

post/v1/apps/{app_id}/roles/assignAuth

Assign a role to a user

Path parameters

app_id*string

Id of the app.

Request body

account_id*string

Account ID of the user

Example: "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f"

role*string

Role name to assign

Example: "admin"

Response · 200 Membership updated.

id*string

Unique identifier of the app membership.

app_id*string

App UUID.

account_id*string

Account UUID.

role_id*string

Role UUID.

joined_at*string · date-time

When the member joined the tenant (ISO 8601).

Example

Request

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

{
  "account_id": "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f",
  "role": "admin"
}

Response

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