CircleCI SSH Key API

Endpoints for managing SSH keys and checkout keys for projects.

GitHub OpenAPI

Operations 5

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /project/{vcs-type}/{username}/{project}/ssh-key Add an SSH key to a project · Add an SSH key #
Ask an LLM
“How do I let builds clone from a private repo over SSH?”
“Can I add a private key to a project for checkout?”
Tell an agent
Add SSH key {private_key} to {vcs_type} project {username}/{project} for {hostname}.
Add a new SSH key to {vcs_type} project {username}/{project}.
GET /project/{vcs-type}/{username}/{project}/checkout-key List a project's checkout keys · List checkout keys #
Ask an LLM
“Which SSH keys are checked out on my project?”
“What checkout keys exist for a repo?”
Tell an agent
List the checkout keys for {vcs_type} project {username}/{project}.
Show every SSH key checked out on {username}/{project}.
POST /project/{vcs-type}/{username}/{project}/checkout-key Create a checkout key · Create a checkout key #
Ask an LLM
“Can CircleCI generate a new checkout key for a project?”
“What types of checkout keys can I create?”
Tell an agent
Create a {type} checkout key for {vcs_type} project {username}/{project}.
Generate a new checkout key of type {type} on {username}/{project}.
GET /project/{vcs-type}/{username}/{project}/checkout-key/{fingerprint} Get a checkout key by fingerprint · Get a checkout key #
Ask an LLM
“How do I look up one checkout key by its fingerprint?”
“What does a specific checkout key contain?”
Tell an agent
Get checkout key {fingerprint} on {vcs_type} project {username}/{project}.
Show the checkout key with fingerprint {fingerprint} for {username}/{project}.
DELETE /project/{vcs-type}/{username}/{project}/checkout-key/{fingerprint} Delete a checkout key · Delete a checkout key #
Ask an LLM
“How do I remove an old checkout key?”
“Can I delete a checkout key by fingerprint?”
Tell an agent destructive · confirm first
Delete checkout key {fingerprint} from {vcs_type} project {username}/{project}.
Remove the checkout key {fingerprint} on {username}/{project}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/circleci:circleci-ssh-key-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

circleci-ssh-key-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: CircleCI REST API v1 SSH Key API
  description: The CircleCI REST API v1 is the legacy API that provides access to build information, project details, and user data. While still available, CircleCI recommends migrating to the v2 API for newer features and improved functionality. The v1 API supports operations for retrieving build details, triggering builds, managing SSH keys, and accessing test metadata. Authentication is handled through API tokens passed as query parameters or HTTP headers.
  version: '1.1'
  contact:
    name: CircleCI Support
    url: https://support.circleci.com
  termsOfService: https://circleci.com/terms-of-service/
servers:
- url: https://circleci.com/api/v1.1
  description: CircleCI Production API v1.1
security:
- apiToken: []
tags:
- name: SSH Key
  description: Endpoints for managing SSH keys and checkout keys for projects.
paths:
  /project/{vcs-type}/{username}/{project}/ssh-key:
    post:
      operationId: addSSHKey
      summary: Add an SSH key
      description: Adds an SSH key to the specified project for use in builds.
      tags:
      - SSH Key
      parameters:
      - $ref: '#/components/parameters/VcsTypeParam'
      - $ref: '#/components/parameters/UsernameParam'
      - $ref: '#/components/parameters/ProjectParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - hostname
              - private_key
              properties:
                hostname:
                  type: string
                  description: The hostname the key is associated with
                private_key:
                  type: string
                  description: The private key in PEM format
      responses:
        '200':
          description: SSH key added successfully
        '401':
          description: Unauthorized
  /project/{vcs-type}/{username}/{project}/checkout-key:
    get:
      operationId: listCheckoutKeys
      summary: List checkout keys
      description: Returns a list of checkout keys for the specified project.
      tags:
      - SSH Key
      parameters:
      - $ref: '#/components/parameters/VcsTypeParam'
      - $ref: '#/components/parameters/UsernameParam'
      - $ref: '#/components/parameters/ProjectParam'
      responses:
        '200':
          description: Successfully retrieved checkout keys
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CheckoutKey'
        '401':
          description: Unauthorized
    post:
      operationId: createCheckoutKey
      summary: Create a checkout key
      description: Creates a new checkout key for the specified project.
      tags:
      - SSH Key
      parameters:
      - $ref: '#/components/parameters/VcsTypeParam'
      - $ref: '#/components/parameters/UsernameParam'
      - $ref: '#/components/parameters/ProjectParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - type
              properties:
                type:
                  type: string
                  enum:
                  - deploy-key
                  - github-user-key
                  description: The type of checkout key to create
      responses:
        '201':
          description: Checkout key created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutKey'
        '401':
          description: Unauthorized
  /project/{vcs-type}/{username}/{project}/checkout-key/{fingerprint}:
    get:
      operationId: getCheckoutKey
      summary: Get a checkout key
      description: Returns a checkout key by its fingerprint.
      tags:
      - SSH Key
      parameters:
      - $ref: '#/components/parameters/VcsTypeParam'
      - $ref: '#/components/parameters/UsernameParam'
      - $ref: '#/components/parameters/ProjectParam'
      - name: fingerprint
        in: path
        required: true
        description: The fingerprint of the checkout key
        schema:
          type: string
      responses:
        '200':
          description: Successfully retrieved checkout key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutKey'
        '401':
          description: Unauthorized
        '404':
          description: Checkout key not found
    delete:
      operationId: deleteCheckoutKey
      summary: Delete a checkout key
      description: Deletes a checkout key by its fingerprint.
      tags:
      - SSH Key
      parameters:
      - $ref: '#/components/parameters/VcsTypeParam'
      - $ref: '#/components/parameters/UsernameParam'
      - $ref: '#/components/parameters/ProjectParam'
      - name: fingerprint
        in: path
        required: true
        description: The fingerprint of the checkout key
        schema:
          type: string
      responses:
        '200':
          description: Checkout key deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Confirmation message
        '401':
          description: Unauthorized
components:
  parameters:
    UsernameParam:
      name: username
      in: path
      required: true
      description: The organization or user name
      schema:
        type: string
    VcsTypeParam:
      name: vcs-type
      in: path
      required: true
      description: The version control system type
      schema:
        type: string
        enum:
        - github
        - bitbucket
    ProjectParam:
      name: project
      in: path
      required: true
      description: The repository name
      schema:
        type: string
  schemas:
    CheckoutKey:
      type: object
      properties:
        public_key:
          type: string
          description: The public SSH key
        type:
          type: string
          enum:
          - deploy-key
          - github-user-key
          description: The type of checkout key
        fingerprint:
          type: string
          description: The MD5 fingerprint of the key
        preferred:
          type: boolean
          description: Whether this is the preferred key
        login:
          type: string
          description: The login associated with the key
        time:
          type: string
          format: date-time
          description: When the key was created
  securitySchemes:
    apiToken:
      type: apiKey
      in: header
      name: Circle-Token
      description: Personal API token for authenticating with the CircleCI API. Can also be passed as a query parameter.
externalDocs:
  description: CircleCI API v1 Reference
  url: https://circleci.com/docs/api/v1/