Skip to Content
SaaSFlow
DevelopersAPIReferenceusers

Role

Change a member's role, and optionally their explicit permissions. Leave permissions out to keep whatever they have, send an array to pin an exact…

Authentication

Checking whether you're signed in…
PUT
/companies/{companyId}/users/{userId}/role

Authorization

headerAuthorization<token>

A SaaSFlow API key (format sf_…) or an OAuth bearer token. Paste only the key — the proxy adds the Bearer prefix. Create an API key in Settings → Company settings → API keys — see API keys.

Path Parameters

companyId*string
Formatuuid
userId*string
Formatuuid

Request Body

application/json
  1. body
role*string

The role assigned to a user within the system. Owner = full access incl. company settings, billing, and user management; editor = read/write on data; viewer = read-only. The role is also used as the default permission preset and as a non-permission marker (e.g. notifications are sent to all owners). For granular API access control, see PermissionSchema.

Value in"owner""editor""viewer"
permissions?array<>|null

Response Body

User role updated

application/json
  1. response
success*boolean
Example Request
curl -X PUT 'https://api.saasflow.com/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/role' \  -H 'Content-Type: application/json' \  -d '{  "role": "owner"}'
Example Response
{  "success": true}