- Docs
- Api%2Freference%2Forganizations%2FSwitchOrganization
Switch organization
Move the signed-in person to another of their organizations. You get back a new access token and the organization in full. Use the new token from then on: everything else you call reads and writes inside the organization it names. The refresh token they already hold keeps working and carries the new organization too, so there is nothing else to store. They have to already be an accepted member of the organization they are moving to. If they are not — or it does not exist — the answer is the same either way, so this cannot be used to discover organizations. This needs a signed-in person. An API key belongs to one organization and cannot move. Requires the `organizations.update` permission.
Authorization
bearer-auth The access token returned after a successful sign-in, sent as
Authorization: Bearer <access_token>.
It identifies the person and the organization they are working in, and
it lasts about fifteen minutes. When it runs out, use their refresh
token at POST /auth/refresh-token instead of asking them to sign in
again.
In: header
Request Body
application/json
The organization to move to.
TypeScript Definitions
Use the request body type in TypeScript.
The organization to move to. The signed-in person has to be an accepted member of it.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.dual.network/organizations/switch" \ -H "Content-Type: application/json" \ -d '{ "id": "665f1c2d4b1a2c3d4e5f6ab9" }'{
"access_token": "<access token>",
"organization": {
"id": "665f1c2d4b1a2c3d4e5f6ab9",
"name": "Harbour Museum",
"fqdn": "passes.harbour.example",
"owner_id": "665f1c2d4b1a2c3d4e5f6a02",
"when_created": "2026-01-11T11:00:00Z",
"when_modified": "2026-03-01T10:00:00Z"
}
}{
"code": 3,
"message": "Key: 'limit' Error:Field validation for 'limit' failed on the 'lte' tag"
}{
"code": 16,
"message": "no auth provided"
}{
"code": 13,
"message": "internal error"
}