---
title: "Remove an api-key associated to a user"
method: DELETE
path: "/users/{id}/tokens/{keyID}"
tags: ["users"]
---

# Remove an api-key associated to a user

`DELETE /users/{id}/tokens/{keyID}`

Remove an api-key associated to a user..
Only the calling user or admin can remove api-key.
**Access policy**: authenticated

## Path parameters

- `id` integer, required
- `keyID` integer, required

## Response `204`

Success

## Other responses

- `400` — Invalid request
- `403` — Permission denied
- `404` — Not found
- `500` — Server error

---

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