# Pause or resume an agent

**PUT** `/v1/agents/{id}/state`

**Operation ID**: `setState`
**Summary**: Pause or resume an agent
Sets the agent to PAUSED or ACTIVE. A paused agent runs no investigations: signals from every source are dropped, manual starts and resumes are refused, and queued investigations wait until the agent is resumed, except those on an issue, which are discarded so other agents can take the issue. Pipelines keep marking new patterns as sent, so after resuming, the agent usually reacts only to patterns that are new since then.

## Tags
- Agents
## Parameters

- **id** (required) - path
  - Type: string

## Request Body

**Content-Type**: `application/json`

**Schema**: `StateChangeRequest`

## Responses

### 204

State set (or already set)

### 400

The state is not ACTIVE or PAUSED

### 401

Unauthorized

### 404

Agent not found
