---
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.

OAuth app tokens and personal access tokens (classic) need the `admin:gpg_key` scope to use this endpoint.

## 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-3.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-3/versions/dc0584ac4e13/schema)
