Switches the active organisation on the authenticated session. Called in-process via auth.api.setActiveOrganization so server-to-server requests are not subject to Better Auth’s Origin-header CSRF check. Better Auth rotates the active-org cookie; the rotated Set-Cookie headers are forwarded on the response so the browser’s cookie jar is updated atomically with the 201 reply.
Documentation Index
Fetch the complete documentation index at: https://docs.avidoai.com/llms.txt
Use this file to discover all available pages before exploring further.
Id of the organization to set as the active organisation on the authenticated session.
1 - 256Successfully switched active organization
The organisation that was set as the active organisation on the authenticated session.
A Better Auth organisation the authenticated user belongs to, normalised to the public Avido shape (Prisma-nullable slug/domain surfaced as absent rather than null).