---
title: "Delete an API key"
method: DELETE
path: "/organizations/{orgId}/api-keys/{apiKeyId}"
tags: ["organizations"]
---

# Delete an API key

`DELETE /organizations/{orgId}/api-keys/{apiKeyId}`

Deletes an API key by its ID. 
- **Organization owner/admin**: Can delete any API key within their organization.
- **Organization user**: Can only delete the API keys they created.

## Path parameters

- `orgId` string, uuid, required
- `apiKeyId` string, uuid, required

## Response `200`

Successfully deleted an API key.

## Other responses

- `400` — - [group:**request**, code:**0**]: Invalid field in the request.
- `404` — - [group:**organization**, code:**2**]: Organization does not exist.
- `500` — - [group:**api-key**, code:**1201**]: Get API key encountered DB error. - [group:**api-key**, code:**1600**]: Delete API key encountered DB error. - [group:**organization**, code:**1201**]: Get organization encountered DB error.

---

[API](https://skmtc.net/gmicloud/apis/cluster-engine-api.md) · [All operations](https://skmtc.net/gmicloud/apis/cluster-engine-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gmicloud/cluster-engine-api/versions/bcbab016469f/schema)
