Update User

Update a user's profile, role, or move them to a different tenant. All fields are optional - provide only the fields you want to update.

Path Parameters
  • user_id
    Type: string · User Id
    required

    User HashID

Body·AdminUpdateUserInput
required
application/json
  • first_name
    Type: string · First Name nullable

    User first name

  • last_name
    Type: string · Last Name nullable

    User last name

  • role_name
    Type: string · Role Name nullable

    New role name

  • tenant_id
    Type: string · Tenant Id Pattern: ^tenant_[a-zA-Z0-9]+$ nullable

    Move user to this tenant

Responses
  • application/json
  • application/json
Request Example for patch/admin/users/{user_id}
curl 'https://ai.hatz.ai/v1/admin/users/{user_id}' \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: YOUR_SECRET_TOKEN' \
  --data '{
  "first_name": "",
  "last_name": "",
  "role_name": "",
  "tenant_id": ""
}'
{
  "message": "string",
  "user_id": "string"
}