Create a public SSH key for the authenticated user
POST {{baseUrl}}/user/keys
Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least write:public_key
scope.
Request Body
{"key"=>"<string>", "title"=>"<string>"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: Created
{"key_id":"012345678912345678","key":"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234","id":2,"url":"https://api.github.com/user/keys/2","title":"ssh-rsa AAAAB3NzaC1yc2EAAA","created_at":"2020-06-11T21:31:57Z","verified":false,"read_only":false}