---
title: "POST /v1/robot/localize"
method: POST
path: "/v1/robot/localize"
tags: ["Localization & Navigation"]
---

# POST /v1/robot/localize

`POST /v1/robot/localize`

## Request

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

Localizes the robot to a known pose or destination.

 While the robot is localizing,
 any subsequent requests to localize the robot will return a
 FAILED_PRECONDITION error until the process is completed.

## Request body

- LocalizeRobotRequest: Request object for localizing a robot
  - `robotId` string, required: Unique identifier of the robot
  - `goal` union, required: Goal represents a target destination or pose for the robot to navigate to.
    - object
      - `destinationId` string, required
    - object
      - `pose` Pose, required: Represents the robot's pose on the map.
        - `xMeters` number, float: X-coordinate in meters within the map.
        - `yMeters` number, float: Y-coordinate in meters within the map.
        - `headingRadians` number, float: The heading of the robot in radians. Ranges from -π to π, where 0.0 points along the positive x-axis.

## Response `200`

OK

- LocalizeRobotResponse

## 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)
