Update an organization (rename and/or patch its public metadata). Requires the org's creator/admin role.
PATCH
/_torii/organizations/{organizationId}
const url = 'https://your-app.toriiauth.eu/_torii/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","publicMetadata":"example"}'};
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://your-app.toriiauth.eu/_torii/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "publicMetadata": "example" }'Partial update. name renames; public_metadata is deep-merged into the existing bag (a key sent as null is removed). Sending neither is a 400.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”organizationId
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
string | null
publicMetadata
object | null
Examplegenerated
{ "name": "example", "publicMetadata": "example"}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": {}}