List organizations the current user belongs to
GET
/_torii/organizations
const url = 'https://your-app.torii.so/_torii/organizations';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://your-app.torii.so/_torii/organizationsResponses
Section titled “ Responses ”OK
Media type application/json
Array<object>
object
id
required
string format: uuid
name
required
string
role
required
Caller’s role key in this org (e.g. admin | member).
string
roleName
Human-readable display name of the caller’s role, from the org’s bound role set.
string | null
Example generated
[ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "role": "example", "roleName": "example" }]