Update an organization user
const url = 'https://apisandbox.puurk.com/organizations/example/user/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"status":"active","start_date":"2026-04-15T12:00:00Z","termination_date":"2026-04-15T12:00:00Z","commission_basis":"profit","commission_fixed":1,"commission_rate":1,"commission_trigger":"sale","role":"owner"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://apisandbox.puurk.com/organizations/example/user/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "status": "active", "start_date": "2026-04-15T12:00:00Z", "termination_date": "2026-04-15T12:00:00Z", "commission_basis": "profit", "commission_fixed": 1, "commission_rate": 1, "commission_trigger": "sale", "role": "owner" }'Update a user’s role or membership in an organization. Supplying role makes this a role modification. Setting a role requires one of: an organization role of owner or agencyadmin in this organization; a superadmin claim; or a service token holding the admin scope action on organizations (globally or for this organization). admin is a scope action, not an organization role, and is rejected as a role value with 400. A role modification fails with 403 for a self-update or 409 when it would remove the last owner.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization ID
User ID
Request Bodyrequired
Section titled “Request Bodyrequired”Fields to update. Every field is optional; send only what you are changing. Supplying role makes this a role modification.
Body for POST /organizations/{oid}/user/{uid} and PATCH /organizations/{oid}/user/{uid}. Every field is optional. On POST, role defaults to read; on PATCH, omitting role leaves it unchanged.
object
Membership status.
When the person started with this organization. ISO 8601, or null to clear.
When the person left. ISO 8601, or null to clear.
Fixed commission amount in cents
Commission rate
The role to grant. Setting a role requires one of: an organization role of owner or agencyadmin in this organization; a superadmin claim; or a service token holding the admin scope action on organizations (globally or for this organization). admin is a scope action, not an organization role, and is rejected as a role value with 400.
Responses
Section titled “Responses”User updated. The body is the updated organization user record. role is not included: read it from the organization’s roles map (GET /organizations/{oid}).
object
Organization user document ID
User ID
Organization ID
Fixed commission amount in cents
Commission rate
Example
{ "status": "active", "commission_basis": "profit", "commission_trigger": "sale"}bad_request — invalid body or date field, or role is not an OrganizationRole (Invalid role. Must be one of: owner, manager, read, write, provider, accountant, officeadmin, agencyadmin, agencyuser, none). admin is rejected here: it is a scope action, not a role.
The standard error body. error is a stable, machine-readable code — branch on it rather than on message, which is for humans and may change.
object
Machine-readable error code.
Human-readable detail.
Example
{ "error": "merchant_account_missing", "message": "The organization has no merchant account. Complete Stripe Connect onboarding for this organization before generating pricing."}Unauthorized
forbidden — the caller may not change this user’s role. Either the caller is the target user, or the caller holds none of: an organization role of owner or agencyadmin, a superadmin claim, or a service token with the admin scope action on organizations.
The standard error body. error is a stable, machine-readable code — branch on it rather than on message, which is for humans and may change.
object
Machine-readable error code.
Human-readable detail.
Example
{ "error": "merchant_account_missing", "message": "The organization has no merchant account. Complete Stripe Connect onboarding for this organization before generating pricing."}not_found — the organization or user does not exist.
The standard error body. error is a stable, machine-readable code — branch on it rather than on message, which is for humans and may change.
object
Machine-readable error code.
Human-readable detail.
Example
{ "error": "merchant_account_missing", "message": "The organization has no merchant account. Complete Stripe Connect onboarding for this organization before generating pricing."}conflict — this would remove the organization’s last owner.
The standard error body. error is a stable, machine-readable code — branch on it rather than on message, which is for humans and may change.
object
Machine-readable error code.
Human-readable detail.
Example
{ "error": "merchant_account_missing", "message": "The organization has no merchant account. Complete Stripe Connect onboarding for this organization before generating pricing."}