---
title: "Send a vehicle command to the robot"
method: POST
path: "/v1/vehicles/{vehicleId}/vehicle-command"
tags: ["Vehicle Operations"]
---

# Send a vehicle command to the robot

`POST /v1/vehicles/{vehicleId}/vehicle-command`

## Request

- Base URL: `https://api.polymathrobotics.dev`
- URL: `https://api.polymathrobotics.dev/v1/vehicles/{vehicleId}/vehicle-command`
- Auth: HTTP bearer

Sends a vehicle command to the robot.

## Path parameters

- `vehicleId` string, required

## Request body

- VehicleCommandAction: Base for request bodies: unknown fields are rejected instead of silently dropped.
  - `vehicle_command` CortexOption: Base for request bodies: unknown fields are rejected instead of silently dropped.
    - `name` string, required
    - `params` KeyValuePair[], required
      - `key` string, required
      - `value` string, required
  - `mode` unknown

## Response `200`

Sent vehicle command and upstream service response.

- VehicleCommandResponse
  - `status` string, required
  - `message` string, required
  - `data` VehicleCommandData, required
    - `sent` VehicleCommandAction, required: Base for request bodies: unknown fields are rejected instead of silently dropped.
      - `vehicle_command` CortexOption: Base for request bodies: unknown fields are rejected instead of silently dropped.
        - `name` string, required
        - `params` KeyValuePair[], required
          - `key` string, required
          - `value` string, required
      - `mode` unknown
    - `received` object, required
    - `command_ids` string[]: Cortex-assigned ids for the accepted commands, aligned 1:1 with the commands sent and in the same order. Each is the goal id for its command; pass one to GET /command-history as command_id to look that command up once it finishes. Empty when cortex handled the request without queueing commands, as a RESUME motion command does.

## Other responses

- `422`: Validation Error
- `500`: Internal server error

## Changes

- **2026-09-09** `7bb062ddb622`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/polymathrobotics/apis/polymath-api/changes/v1/vehicles/:vehicleId/vehicle-command/post.md)

---

[API](https://skmtc.dev/polymathrobotics/apis/polymath-api.md) - [All operations](https://skmtc.dev/polymathrobotics/apis/polymath-api/llms.txt) - [OpenAPI document](https://skmtc.dev/polymathrobotics/apis/polymath-api/revisions/3b5ff2f21338?raw)
