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.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
title
A descriptive name for the new key.
string
key
required
The public SSH key to add to your GitHub account. For more information, see “Checking for existing SSH keys.”
string
Examples
Exampledefault
{ "key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234", "title": "ssh-rsa AAAAB3NzaC1yc2EAAA"}Responses
Section titled “Responses”Response
Media typeapplication/json
SSH Signing Key
A public SSH key used to sign Git commits
object
key
required
string
id
required
integer
title
required
string
created_at
required
string format: date-time
Examples
Exampledefault
{ "id": 2, "key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234", "title": "ssh-rsa AAAAB3NzaC1yc2EAAA", "created_at": "2020-06-11T21:31:57Z"}Not modified
Requires authentication
Media typeapplication/json
Basic Error
Basic Error
object
message
string
documentation_url
string
url
string
status
string
Examplegenerated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Forbidden
Media typeapplication/json
Basic Error
Basic Error
object
message
string
documentation_url
string
url
string
status
string
Examplegenerated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Resource not found
Media typeapplication/json
Basic Error
Basic Error
object
message
string
documentation_url
string
url
string
status
string
Examplegenerated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Validation failed, or the endpoint has been spammed.
Media typeapplication/json
Validation Error
Validation Error
object
message
required
string
documentation_url
required
string
errors
Array<object>
object
resource
string
field
string
message
string
code
required
string
index
integer
value
One of:
string
integer
Array<string>
Examplegenerated
{ "message": "example", "documentation_url": "example", "errors": [ { "resource": "example", "field": "example", "message": "example", "code": "example", "index": 1, "value": [ "example" ] } ]}