---
title: "Switch organization"
method: POST
path: "/api/v1/auth/switch-organization"
tags: ["Authentication"]
---

# Switch organization

`POST /api/v1/auth/switch-organization`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/auth/switch-organization`
- Auth: HTTP bearer

Re-issues an access token scoped to another organization the caller belongs to. The refresh token is untouched and no other session is affected; the new token's role comes from the membership in the target organization, not from the token being replaced.

## Cookies

- `refresh_token` string

## Request body

- SwitchOrganizationRequest
  - `organizationId` string, uuid, required

## Response `200`

Access token re-issued for the target organization

## Other responses

- `401`: Not authenticated, or no live session
- `403`: Caller is not a member of that organization

---

[API](https://skmtc.dev/railhook/apis/railhook-api.md) · [All operations](https://skmtc.dev/railhook/apis/railhook-api/llms.txt) · [OpenAPI document](https://skmtc.dev/railhook/apis/railhook-api/revisions/4e2c76dfc33d?raw)
