---
title: "Save command to history"
method: POST
path: "/terminal/command_history"
tags: ["Terminal"]
---

# Save command to history

`POST /terminal/command_history`

Saves a command to the command history for a specific host.

## Request body

- object
  - `hostId` integer
  - `command` string

## Response `201`

Command saved successfully.

## Other responses

- `400` — Missing required parameters.
- `500` — Failed to save command.

---

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