v2

latestOpenAPI 3.0.02026-08-013312111.4 MB
GPG

Add a new GPG key

Adds a new GPG public key to the specified user account and returns the resulting key.

Example:

$ curl -X POST -H "Content-Type: application/json" -d
'{"key": "<insert GPG Key>"}'
https://api.bitbucket.org/2.0/users/{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}/gpg-keys
post/users/{selected_user}/gpg-keys

Request body

typestring required
keystring

The GPG key value in X format.

key_idstring

The unique identifier for the GPG key

fingerprintstring

The GPG key fingerprint.

parent_fingerprintstring

The fingerprint of the parent key. This value is null unless the current key is a subkey.

namestring

The user-defined label for the GPG key

expires_onstring date-time
created_onstring date-time
added_onstring date-time
last_usedstring date-time

Response

The newly created GPG key.

typestring required
keystring

The GPG key value in X format.

key_idstring

The unique identifier for the GPG key

fingerprintstring

The GPG key fingerprint.

parent_fingerprintstring

The fingerprint of the parent key. This value is null unless the current key is a subkey.

namestring

The user-defined label for the GPG key

expires_onstring date-time
created_onstring date-time
added_onstring date-time
last_usedstring date-time