---
title: "Set Agent Status"
method: PATCH
path: "/api/agents/{instance_id}/status"
tags: ["agents"]
---

# Set Agent Status

`PATCH /api/agents/{instance_id}/status`

## Request

- Base URL: `https://api.advisorppc.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.advisorppc.com/api/agents/{instance_id}/status`
- Auth: HTTP bearer

Pause/resume an enabled manager and its scheduler eligibility.

The scheduler enumerates active AgentInstance rows, so this is the single
durable switch used by web/iOS and unattended execution.

## Path parameters

- `instance_id` integer, required

## Headers

- `X-Tenant-Id` integer, nullable

## Request body

- InstanceStatusIn: Pause/resume the real manager instance used by the daily scheduler.
  - `status` 'active' | 'paused', required

## Response `200`

Successful Response

- AgentInstanceOut: This tenant's enabled instance of a definition (present only once the tenant has hit /enable).
  - `id` integer, required
  - `display_name` string, required
  - `status` string, required
  - `health` string
  - `last_health_detail` string, nullable
  - `accounts` object
  - `anomaly_hold` boolean
  - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/advisorppc/apis/advisorppc-api.md) · [All operations](https://skmtc.dev/advisorppc/apis/advisorppc-api/llms.txt) · [OpenAPI document](https://skmtc.dev/advisorppc/apis/advisorppc-api/revisions/3441bd729e0c?raw)
