---
title: "Create a new checkout key"
method: POST
path: "/project/{project-slug}/checkout-key"
tags: ["Project"]
---

# Create a new checkout key

`POST /project/{project-slug}/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

## Path parameters

- `project-slug` string, required

## Request body

- object
  - `type` 'user-key' | 'deploy-key', required — The type of checkout key to create. This may be either `deploy-key` or `user-key`.

## Response `201`

The checkout key.

- object — A checkout key
  - `public-key` string, 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`.
  - `fingerprint` string, required — An SSH key fingerprint.
  - `preferred` boolean, required — A boolean value that indicates if this key is preferred.
  - `created-at` string, date-time, required — The date and time the checkout key was created.

## Other responses

- `default` — Error response.

---

[API](https://skmtc.net/circleci/apis/api-v2.md) · [All operations](https://skmtc.net/circleci/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/circleci/api-v2/versions/b9c0e0c24058/schema)
