---
title: "Switch Tenant Endpoint"
method: POST
path: "/user/switch-tenant"
tags: ["user"]
---

# Switch Tenant Endpoint

`POST /user/switch-tenant`

## Request body

- SwitchTenantRequest
  - `id_token` string, required
  - `tenant_id` string, required

## Response `200`

Successful Response

- SwitchTenantResponse
  - `user_key` string, required

## Other responses

- `403` — `{"detail": "Invalid API Key"}` `{"detail": "Not permitted to access this tenant"}`
- `404` — `{"detail": "User not found"}` `{"detail": "Tenant not found"}`
- `422` — Validation Error

---

[API](https://skmtc.dev/tenzir/apis/tenzir-platform-api.md) · [All operations](https://skmtc.dev/tenzir/apis/tenzir-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tenzir/tenzir-platform-api/revisions/1c6c33bb8ba3/schema)
