---
title: "Trigger an Agent command"
method: POST
path: "/v1/agents/{agentId}/commands"
tags: ["Agents"]
---

# Trigger an Agent command

`POST /v1/agents/{agentId}/commands`

The command to be triggered.

Available commands are:
- RESTART - Restart the Agent.
- PAUSE - Set the Agent to 'Paused'.
- RESUME - Un-sets a 'Paused' agent.

## Path parameters

- `agentId` string, required

## Request body

- AgentCommandRequest
  - `command` 'RESTART' | 'PAUSE' | 'RESUME', required — The command being sent

## Response `202`

Agent command received successfully

## Other responses

- `400` — Wrong request parameters used
- `403` — Forbidden
- `404` — Agent not found
- `500` — Unexpected error occurred

---

[API](https://skmtc.net/maia/apis/maia-public-rest-api.md) · [All operations](https://skmtc.net/maia/apis/maia-public-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/maia/maia-public-rest-api/versions/6239825f68eb/schema)
