---
title: "Delete a public SSH key for the authenticated user"
method: DELETE
path: "/user/keys/{key_id}"
tags: ["users"]
---

# Delete a public SSH key for the authenticated user

`DELETE /user/keys/{key_id}`

Removes a public SSH key from the authenticated user's GitHub account.

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

## Path parameters

- `key_id` integer, required

## Response `204`

Response

## Other responses

- `304` — Not modified
- `401` — Requires authentication
- `403` — Forbidden
- `404` — Resource not found

---

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