v1

latestOpenAPI 3.0.3MIT2026-07-1411163326.7 KB
Project

Create a new checkout key

Not available to projects that use GitLab or GitHub App. Creates a new checkout key. This API request is only usable with a user API token. Please ensure that you have authorized your account with GitHub before creating user keys. This is necessary to give CircleCI the permission to create a user key associated with your GitHub user account. You can find this page by visiting Project Settings > Checkout SSH Keys

post/project/{project-slug}/checkout-key

Path parameters

project-slugstring required

Project slug in the form vcs-slug/org-name/repo-name. The / characters may be URL-escaped. For projects that use GitLab or GitHub App, use circleci as the vcs-slug, replace org-name with the organization ID (found in Organization Settings), and replace repo-name with the project ID (found in Project Settings).

Request body

type'user-key' | 'deploy-key' required

The type of checkout key to create. This may be either deploy-key or user-key.

Example request

{
  "type": "deploy-key"
}

Response

The checkout key.

public-keystring required

A public SSH key.

type'deploy-key' | 'github-user-key' required

The type of checkout key. This may be either deploy-key or github-user-key.

fingerprintstring required

An SSH key fingerprint.

preferredboolean required

A boolean value that indicates if this key is preferred.

created-atstring date-time required

The date and time the checkout key was created.

Example response

{
  "public-key": "ssh-rsa ...",
  "type": "deploy-key",
  "fingerprint": "c9:0b:1c:4f:d5:65:56:b9:ad:88:f9:81:2b:37:74:2f",
  "preferred": true,
  "created-at": "2015-09-21T17:29:21.042Z"
}