---
title: "Self-revoke the presented agent token"
method: DELETE
path: "/api/v1/token"
tags: ["Repository"]
---

# Self-revoke the presented agent token

`DELETE /api/v1/token`

## Request

- Base URL: `https://dungbeetle.dev`
- URL: `https://dungbeetle.dev/api/v1/token`
- Auth: HTTP bearer

A Bearer agent token may always revoke itself (used by `dungbeetle logout`); no particular scope is required. Basic credentials get `400` — push tokens are managed in repo Settings.

## Response `200`

Token revoked.

- object
  - `revoked` true, required

## Other responses

- `400`: Invalid body or parameter (`code: validation_error`), or — on screenshot upload — a body that does not hash to the digest (`code: digest_mismatch`).
- `401`: Missing/malformed Authorization header (`code: unauthorized`), bad Basic credentials (`code: invalid_credentials`), or an invalid, expired, or revoked agent token (`code: invalid_agent_token`).
- `429`: Too many failed attempts or uploads from this client (`code: rate_limited`). Honor the `Retry-After` header; successful authenticated requests never count toward the limit.

---

[API](https://skmtc.dev/dungbeetle/apis/dungbeetle-cloud-api.md) · [All operations](https://skmtc.dev/dungbeetle/apis/dungbeetle-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dungbeetle/apis/dungbeetle-cloud-api/revisions/74778b90420a?raw)
