---
title: "Restart a running machine"
method: POST
path: "/v1/machines/{machine_id}/restart"
tags: ["machines"]
---

# Restart a running machine

`POST /v1/machines/{machine_id}/restart`

## Request

- Base URL: `https://coasty.ai`
- URL: `https://coasty.ai/v1/machines/{machine_id}/restart`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/coasty/apis/coasty-public-api/docs/v1/machines/:machine_id/restart/post.ts> (a function with typed inputs; its response is checked against the schema)

Managed: requests a reboot. External: logical dispatch restart only — increments the fencing generation, cancels pending commands, and marks the driver stale until it reconnects; Coasty does not reboot the caller-owned host.

## Response `200`

Restart requested.

- LifecycleResponse
  - `machine_id` string, required
  - `status` string, required
  - `message` string, required
  - `request_id` string, required

## Other responses

- `400`: Invalid request body or parameters.
- `401`: Missing, invalid, or revoked API key. Pass `X-API-Key: sk-coasty-live-...` (or test).
- `403`: API key lacks the required scope or tier-feature is unavailable on the caller's plan.
- `404`: Resource not found in this key's namespace.
- `409`: The resource state conflicts with this operation.
- `413`: The request body exceeds the endpoint limit.
- `422`: The JSON shape is valid but one or more values violate the endpoint contract.
- `429`: Rate or concurrency limit exceeded.
- `500`: Unexpected server error. Retry with exponential backoff.
- `502`: An upstream dependency returned an invalid response.
- `503`: A required service is temporarily unavailable.
- `504`: An upstream dependency timed out.

---

[API](https://skmtc.dev/coasty/apis/coasty-public-api.md) - [All operations](https://skmtc.dev/coasty/apis/coasty-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/coasty/apis/coasty-public-api/revisions/f50d93b0d8a1?raw)
