Create a new organization. The caller becomes its owner.
POST
/_torii/organizations
const url = 'https://your-app.toriiauth.eu/_torii/organizations';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","roleSetId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
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://your-app.toriiauth.eu/_torii/organizations \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "roleSetId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
roleSetId
string | null format: uuid
Examplegenerated
{ "name": "example", "roleSetId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
id
required
string format: uuid
name
required
string
role
required
string
roleName
string | null
createdAt
required
string format: date-time
publicMetadata
required
Customer-defined application state on the organization. Readable by any member; writable only by the admin role.
object
key
additional properties
any
Examplegenerated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "role": "example", "roleName": "example", "createdAt": "2026-04-15T12:00:00Z", "publicMetadata": {}}