---
title: "Record an auth failure for a pooled key; bench it after 2 in a row"
method: POST
path: "/api/keys/report-auth-failure"
tags: ["API Keys"]
---

# Record an auth failure for a pooled key; bench it after 2 in a row

`POST /api/keys/report-auth-failure`

## Request

- Base URL: `http://localhost:3013`
- URL: `http://localhost:3013/api/keys/report-auth-failure`
- Auth: HTTP bearer

## Request body

- object
  - `keyType` string, required
  - `keySuffix` string, required
  - `keyIndex` integer, required
  - `taskId` string, uuid
  - `scope` string
  - `scopeId` string

## Response `200`

Failure recorded

- object
  - `success` true, required
  - `consecutiveAuthFailures` integer, required
  - `benched` boolean, required
  - `rateLimitedUntil` string, nullable, required

## Other responses

- `400`: Validation error
- `401`: Unauthorized

## Changes

- **2026-09-30** `f09e0d43f522`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/changes/api/keys/report-auth-failure/post.md)

---

[API](https://skmtc.dev/desplega-ai/apis/agent-swarm-api.md) - [All operations](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/llms.txt) - [OpenAPI document](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/revisions/7e4c7198192a?raw)
