v5

latestSwagger 2.0MIT2026-08-03485217850.7 KB
repository

Add a key to a repository

post/repos/{owner}/{repo}/keys

Path parameters

ownerstring required

owner of the repo

repostring required

name of the repo

Request body

keystring required

An armored SSH key to add

read_onlyboolean

Describe if the key has only read access or read/write

titlestring required

Title of the key to add

Response

DeployKey

created_atstring date-time

Created is the time when the deploy key was added

fingerprintstring

Fingerprint is the key's fingerprint

idinteger

ID is the unique identifier for the deploy key

keystring

Key contains the actual SSH key content

key_idinteger

KeyID is the associated public key ID

read_onlyboolean

ReadOnly indicates if the key has read-only access

titlestring

Title is the human-readable name for the key

urlstring

URL is the API URL for this deploy key