A GPG key in ASCII-armored format.
Create a GPG key for the authenticated user
Adds a GPG key to the authenticated user’s GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least write:gpg_key
scope.
Body
application/json
Body
Response
application/json
Response
Response
GPG Key
A unique encryption key
Example:3
Example:3262EFF25BA0D270
Example:xsBNBFayYZ...
Example:[{"email":"mastahyeti@users.noreply.github.com","verified":true}]
Show Child Parameters
Example:[{"id":4,"primary_key_id":3,"key_id":"4A595D4C72EE49C7","public_key":"zsBNBFayYZ...","emails":[],"subkeys":[],"can_sign":false,"can_encrypt_comms":true,"can_encrypt_storage":true,"can_certify":false,"created_at":"2016-03-24T11:31:04-06:00","expires_at":null}]
Show Child Parameters
Example:true
Example:true
Example:2016-03-24T11:31:04-06:00
Body
Get a GPG key for the authenticated user
View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least read:gpg_key
scope.
Path Parameters
gpg_key_id parameter
Response
application/json
Response
Response
GPG Key
A unique encryption key
Example:3
Example:3262EFF25BA0D270
Example:xsBNBFayYZ...
Example:[{"email":"mastahyeti@users.noreply.github.com","verified":true}]
Show Child Parameters
Example:[{"id":4,"primary_key_id":3,"key_id":"4A595D4C72EE49C7","public_key":"zsBNBFayYZ...","emails":[],"subkeys":[],"can_sign":false,"can_encrypt_comms":true,"can_encrypt_storage":true,"can_certify":false,"created_at":"2016-03-24T11:31:04-06:00","expires_at":null}]
Show Child Parameters
Example:true
Example:true
Example:2016-03-24T11:31:04-06:00
Path Parameters
Delete a GPG key for the authenticated user
Removes a GPG key from the authenticated user’s GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least admin:gpg_key
scope.
Path Parameters
gpg_key_id parameter
Response
Response
Response
Path Parameters
List public SSH keys for the authenticated user
Lists the public SSH keys for the authenticated user’s GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least read:public_key
scope.
Query Parameters
Results per page (max 100)
Default:30
Page number of the results to fetch.
Default:1
Response
application/json
Response
Response
Key
Query Parameters
Create a public SSH key for the authenticated user
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.
Body
application/json
Body
A descriptive name for the new key.
Example:Personal MacBook Air
The public SSH key to add to your GitHub account.
Match pattern:^ssh-(rsa|dss|ed25519) |^ecdsa-sha2-nistp(256|384|521)
Response
application/json
Response
Response
Key
Key