Skip to content

Switch current organization

POST
/v1/users/me/switch-org
curl --request POST \
--url https://app.everruns.com/api/v1/users/me/switch-org \
--header 'Content-Type: application/json' \
--data '{ "org_id": "org_2f3c1b3e6a9d4c6f8a1d4e9c9b7f21a0" }'

Sets a cookie with the selected organization. This org will be used for all subsequent requests (including SSE connections via EventSource). The user must be a member of the requested organization.

Media type application/json

Request to switch organization

object
org_id
required

Organization public ID to switch to

string
Example
org_2f3c1b3e6a9d4c6f8a1d4e9c9b7f21a0

Organization switched successfully

Media type application/json

Response from switch org endpoint

object
org_id
required

The organization ID that was switched to

string
success
required

Whether the switch was successful

boolean
Example generated
{
"org_id": "example",
"success": true
}

Invalid organization ID format

Unauthorized

Organization not found or user is not a member