v50

latestOpenAPI 3.0.3MITraw.githubusercontent.com2024-03-2585861610.1 MB
users

Create a public SSH key for the authenticated user

Adds a public SSH key to the authenticated user's GitHub account.

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

post/user/keys

Request body

titlestring

A descriptive name for the new key.

keystring required

The public SSH key to add to your GitHub account.

Example request

{
  "title": "Personal MacBook Air"
}

Response

Response

keystring required
idinteger required
urlstring required
titlestring required
created_atstring date-time required
verifiedboolean required
read_onlyboolean required