Switch Organization
Multi-Organization
Switch Organization
Switch to a different organization that the user belongs to. This endpoint revokes the current token and generates a new access token for the target organization.
Requirements:
- User must be authenticated
- Target user must belong to the same email as current user
- Target organization must be active
Note: After switching, the previous access token is revoked. You must use the new token returned in the response.
POST
Switch Organization
Authorizations
Use a valid Bearer token to authenticate.
Body
application/json
The user ID to switch to. This can be obtained from the organizations array returned by Get User Organizations endpoint.
Response
Switch successful - returns new access token and user data