Skip to main content

Organizations

Tools for listing the organizations available to the current user and, for OAuth connections (e.g. the Claude custom connector), switching which one is active without reconnecting.

note

switch-organization only applies to OAuth-authenticated connections. Scripts and API keys are already bound to a single organization; send the X-heycreo-Org header instead. See Organization context.

list-organizations​

Lists every heycreo organization the current user belongs to, and which one is currently active for this connection.

Parameters​

None.

Response​

FieldTypeDescription
organizations[].idstringOrganization id
organizations[].namestringOrganization name
organizations[].slugstringOrganization UUID (slug still accepted, deprecated), usable as switch-organization input
organizations[].rolestringThe current user's role in this organization
organizations[].activebooleanWhether this is the organization currently active for this connection

Example​

Request:

{
"tool": "list-organizations",
"arguments": {}
}

Response:

{
"organizations": [
{ "id": "…", "name": "My Company", "slug": "my-company", "role": "ADMIN", "active": true },
{ "id": "…", "name": "Side Project", "slug": "side-project", "role": "MEMBER", "active": false }
]
}

switch-organization​

Switches the organization an OAuth connection acts on, without requiring the user to reconnect or re-authenticate.

Parameters​

ParameterTypeRequiredDescription
organizationIdstringYesThe organization id or slug to switch to (see list-organizations)

Response​

FieldTypeDescription
successbooleanWhether the switch succeeded
organization.idstringThe new active organization's id (on success)
organization.namestringThe new active organization's name (on success)
organization.slugstringThe new active organization's slug (on success)
errorstringFailure reason (e.g. not a member, connection not OAuth-based)

Example​

Request:

{
"tool": "switch-organization",
"arguments": { "organizationId": "side-project" }
}

Response:

{
"success": true,
"organization": { "id": "…", "name": "Side Project", "slug": "side-project" }
}