---
title: "Switch to a specific site"
method: PUT
path: "/api/v1/site/switch/{id}"
tags: ["Site"]
---

# Switch to a specific site

`PUT /api/v1/site/switch/{id}`

Switches the current user's active site to the specified site. The 'id' path parameter represents the site identifier (also referred to as 'siteId' or 'hostId' in the API).

## Path parameters

- `id` string, required

## Response `200`

Site switched successfully

- ResponseEntitySiteSwitchView
  - `errors` ErrorEntity[]
    - `errorCode` string
    - `message` string
    - `fieldName` string
  - `entity` object
  - `messages` MessageEntity[]
    - `message` string
  - `i18nMessagesMap` object
  - `permissions` string[]
  - `pagination` Pagination
    - `currentPage` integer
    - `perPage` integer
    - `totalEntries` integer

## Other responses

- `403` — User does not have permission to access the specified site
- `404` — Site not found
- `500` — Internal server error

---

[API](https://skmtc.dev/jostens/apis/dotcms-rest-api.md) · [All operations](https://skmtc.dev/jostens/apis/dotcms-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jostens/dotcms-rest-api/revisions/a088fe9f515c/schema)
