Create an organization
const url = 'https://apisandbox.puurk.com/organizations';const options = { method: 'POST', 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 POST \ --url https://apisandbox.puurk.com/organizations \ --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 } }'Create a new organization
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Organization to create
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 created
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" }}Invalid input
Unauthorized