---
title: "delete api key"
method: DELETE
path: "/api/v0/auth/apikeys/{id}/"
tags: ["Accounts"]
---

# delete api key

`DELETE /api/v0/auth/apikeys/{id}/`

Deletes an existing API key belonging to the authenticated user.
The API key is soft-deleted by setting a deleted_at timestamp.

CLI Usage: `vastai delete api-key <id>`

## Path parameters

- `id` integer, required

## Response `200`

API key successfully deleted

- string

## Other responses

- `400` — Bad Request - API key ID not provided
- `401` — Unauthorized - Invalid or missing authentication
- `403` — Forbidden - API key belongs to a different user
- `404` — Not Found - API key does not exist
- `429` — Too Many Requests

---

[API](https://skmtc.net/vast/apis/vast-ai-api.md) · [All operations](https://skmtc.net/vast/apis/vast-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vast/vast-ai-api/revisions/4ed14f79f796/schema)
