Update an organization
const url = 'https://apisandbox.puurk.com/organizations/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"id":"example","eid":"example","name":"example","ein":"example","logo_path":"example","type":"client","roles":{"additionalProperty":"owner"},"settings":{"additionalProperty":true},"features":{"additionalProperty":true}}'};
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 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "id": "example", "eid": "example", "name": "example", "ein": "example", "logo_path": "example", "type": "client", "roles": { "additionalProperty": "owner" }, "settings": { "additionalProperty": true }, "features": { "additionalProperty": true } }'Update an existing organization
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization ID
Request Bodyrequired
Section titled “Request Bodyrequired”Request body
object
Unique identifier for the organization
External identifier for the organization
Name of the organization
Employer Identification Number
Path to the organization’s logo
Type of organization. Validated on create and update; any other value is rejected with 400 Invalid type. Must be one of: client, test.
User roles in the organization
object
Role of a user in an organization, as stored in the organization’s roles map. admin is not a role: it is a service-token scope action, and a request that sends it as a role gets 400. Of the organization roles, only owner and agencyadmin may change other members’ roles.
Organization settings
object
Puurk features enabled for the organization
object
Responses
Section titled “Responses”Organization updated
object
Unique identifier for the organization
External identifier for the organization
Name of the organization
Employer Identification Number
Path to the organization’s logo
Type of organization. Validated on create and update; any other value is rejected with 400 Invalid type. Must be one of: client, test.
User roles in the organization
object
Role of a user in an organization, as stored in the organization’s roles map. admin is not a role: it is a service-token scope action, and a request that sends it as a role gets 400. Of the organization roles, only owner and agencyadmin may change other members’ roles.
Organization settings
object
Puurk features enabled for the organization
object
Example
{ "type": "client", "roles": { "additionalProperty": "owner" }}bad_request — invalid body; type is not client or test (Invalid type. Must be one of: client, test); name is blank; or subscription_level is not a supported value.
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
Not found