v56

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,4581,08113.3 MB
repos

Create a deploy key

You can create a read-only deploy key.

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

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

Request body

titlestring

A name for the key.

keystring required

The contents of the key.

read_onlyboolean

If true, the key will only be able to read repository contents. Otherwise, the key will be able to read and write.

Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "Repository permission levels for an organization" and "Permission levels for a user account repository."

Response

Response

idinteger required
keystring required
urlstring required
titlestring required
verifiedboolean required
created_atstring required
read_onlyboolean required
added_bystring nullable
last_usedstring date-time nullable
enabledboolean