---
title: "Delete a GPG key for the authenticated user"
method: DELETE
path: "/user/gpg_keys/{gpg_key_id}"
tags: ["users"]
---

# Delete a GPG key for the authenticated user

`DELETE /user/gpg_keys/{gpg_key_id}`

Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/enterprise-server@3.7/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).

## Path parameters

- `gpg_key_id` integer, required

## Response `204`

Response

## Other responses

- `304` — Not modified
- `401` — Requires authentication
- `403` — Forbidden
- `404` — Resource not found
- `422` — Validation failed, or the endpoint has been spammed.

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-6.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-6/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-6/revisions/15db3fa0759b/schema)
