Auth API reference

Auth API · End-Users

patch/v1/apps/{app_id}/end-users/{user_id}/roleAuth

Assign an end-user a role.

Path parameters

app_id*string

Id of the app.

user_id*string

Id of the user.

Request body

role_name*string

Name of the role to assign

Example: "admin"

Response · 200 Membership updated.

user_id*string

Account UUID of the end-user whose role changed.

role_name*string

Role name now bound to the app membership.

Example: "admin"

Example

Request

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

{
  "role_name": "admin"
}

Response

{
  "user_id": "string",
  "role_name": "admin"
}