REST API endpoints for SSH signing keys

Use the REST API to manage SSH signing keys of authenticated users.

About SSH signing key administration

If a request URL does not include a {username} parameter then the response will be for the signed-in user (and you must pass authentication information with your request). Additional private information, such as whether a user has two-factor authentication enabled, is included when authenticated through OAuth with the user scope.

Note

Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.

List SSH signing keys for the authenticated user

GET /user/ssh_signing_keys

Lists the SSH signing keys for the authenticated user's GitHub account.
OAuth app tokens and personal access tokens (classic) need the read:ssh_signing_key scope to use this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/user/ssh_signing_keys

Response schema (Status: 200):

Array of SSH Signing Key:

Create a SSH signing key for the authenticated user

POST /user/ssh_signing_keys

Creates an SSH signing key for the authenticated user's GitHub account.
OAuth app tokens and personal access tokens (classic) need the write:ssh_signing_key scope to use this endpoint.

Parameters

Headers

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X POST \
  https://api.github.com/user/ssh_signing_keys \
  -d '{
  "key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234",
  "title": "ssh-rsa AAAAB3NzaC1yc2EAAA"
}'

Response schema (Status: 201):

Get an SSH signing key for the authenticated user

GET /user/ssh_signing_keys/{ssh_signing_key_id}

Gets extended details for an SSH signing key.
OAuth app tokens and personal access tokens (classic) need the read:ssh_signing_key scope to use this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/user/ssh_signing_keys/SSH_SIGNING_KEY_ID

Response schema (Status: 200):

Same response schema as Create a SSH signing key for the authenticated user.

Delete an SSH signing key for the authenticated user

DELETE /user/ssh_signing_keys/{ssh_signing_key_id}

Deletes an SSH signing key from the authenticated user's GitHub account.
OAuth app tokens and personal access tokens (classic) need the admin:ssh_signing_key scope to use this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X DELETE \
  https://api.github.com/user/ssh_signing_keys/SSH_SIGNING_KEY_ID

Response schema (Status: 204):

List SSH signing keys for a user

GET /users/{username}/ssh_signing_keys

Lists the SSH signing keys for a user. This operation is accessible by anyone.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/users/USERNAME/ssh_signing_keys

Response schema (Status: 200):

Same response schema as List SSH signing keys for the authenticated user.