users
Create a GPG key for the authenticated user
Adds a GPG 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/gpg_keys
Request body
Response
Response
Example response
{
"id": 3,
"name": "Octocat's GPG Key",
"key_id": "3262EFF25BA0D270",
"public_key": "xsBNBFayYZ...",
"emails": [
{
"email": "octocat@users.noreply.github.com",
"verified": true
}
],
"subkeys": [
{
"id": 4,
"primary_key_id": 3,
"key_id": "4A595D4C72EE49C7",
"public_key": "zsBNBFayYZ...",
"emails": [],
"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,
"revoked": false
}
],
"can_sign": true,
"can_certify": true,
"created_at": "2016-03-24T11:31:04-06:00",
"revoked": true
}