# Apply a pending agent suggestion

**POST** `/v1/agent-suggestions/{id}/apply`

**Operation ID**: `apply`
**Summary**: Apply a pending agent suggestion
Re-verifies the suggestion's template-inputs patch against the pipeline's current version and applies it as a new job version, marking the suggestion APPLIED. The resolution is compare-and-set on the pending status: a reviewer who loses a race to another gets 409 rather than overwriting it. Findings mean the pipeline changed since the suggestion was recorded; nothing is applied and the suggestion stays PENDING. Applying restarts the pipeline from a savepoint.

## Tags
- Agent Suggestions
## Parameters

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

## Responses

### 200

Suggestion applied, or rejected by verification with findings

- **Content-Type**: `application/json` / `AgentSuggestionApplyResult`
### 401

Unauthorized

### 404

Suggestion not found

### 409

Suggestion is no longer pending
