---
title: "POST /v1/map/switch"
method: POST
path: "/v1/map/switch"
tags: ["Locations & Maps"]
---

# POST /v1/map/switch

`POST /v1/map/switch`

## Request

- Base URL: `https://api.bearrobotics.ai`
- URL: `https://api.bearrobotics.ai/v1/map/switch`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bearrobotics/apis/bear-cloud-api/docs/v1/map/switch/post.ts> (a function with typed inputs; its response is checked against the schema)

Switch the robot's current map to a specified map.

 The request must specify the floor level and section index of the desired
 map.
 Returns an INVALID_ARGUMENT error if there is no matching map.
 Returns the map_id of the new map if successful.

## Request body

- SwitchMapRequest: Request object for switching robot maps
  - `robotId` string, required
  - `mapSelector` object, required
    - `floorLevel` integer, required: Positive integer floor_level begins at 1.
    - `sectionIndex` integer, required: Non-negative integer section_index begins at 0.

## Response `200`

OK

- SwitchMapResponse
  - `mapId` string

## Other responses

- `400`: Bad Request, usually caused by malfored request body.
- `401`: Unauthorized credentials, ensure the JWT is correct and up to date.
- `500`: Internal Server Error
- `503`: Service is temporarily unavailable, which can usually be resolved by backoff retries.
- `504`: Server-side timeout, usually caused by the failure to send/receive commands/responses to the designated robot.

---

[API](https://skmtc.dev/bearrobotics/apis/bear-cloud-api.md) - [All operations](https://skmtc.dev/bearrobotics/apis/bear-cloud-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bearrobotics/apis/bear-cloud-api/revisions/b90843b624b5?raw)
