API Docs
Users & Roles
API ReferenceUsersUpdate Role

Update User Role

Changes an existing user's role. The change takes effect on the next sign-in (or on the user's next API call if they hold a long-lived session).

POST /user/user/update_role

Body Parameters

ParameterTypeRequiredDescription
emailstringYesThe user's email.
role_idstringYesThe new role. Must be invitable by the calling API key — see List invitable roles.

Request Example

curl -X POST 'https://api.v2.paychtec.com/user/user/update_role' \  -H "Content-Type: application/json" \  -H "api-key: snd_YOUR_API_KEY" \  -d '{  "email": "bob@acme.com",  "role_id": "merchant_admin"}'

Response

{
  "email": "bob@acme.com",
  "role_id": "merchant_admin",
  "updated_at": "2024-01-22T14:00:00Z"
}