# CircleCI API

> Automate the software development process using continuous integration and continuous delivery.

CircleCI is a continuous integration API from circleci.com. Requests are authenticated with an API key. It is served over HTTPS. Its OpenAPI description documents 22 endpoints.

## At a glance

- Category: [Continuous Integration](https://www.openparable.com/apis/category/continuous-integration)
- Provider: circleci.com
- Authentication: API key
- HTTPS: Yes
- CORS: Not stated
- Base URL: https://circleci.com/api/v1
- Documentation: https://circleci.com/docs/api/
- OpenAPI description: https://api.apis.guru/v2/specs/circleci.com/v1/openapi.json
- Version: v1
- Specification updated: 2021-06-21

## Example request

```bash
curl -X GET "https://circleci.com/api/v1/me" \
  -H "Accept: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
```

## Endpoints

- `GET /me` — Provides information about the signed in user.
- `GET /project/{username}/{project}` — Build summary for each of the last 30 builds for a single git repo.
- `POST /project/{username}/{project}` — Triggers a new build, returns a summary of the build.
- `DELETE /project/{username}/{project}/build-cache` — Clears the cache for a project.
- `GET /project/{username}/{project}/checkout-key` — Lists checkout keys.
- `POST /project/{username}/{project}/checkout-key` — Creates a new checkout key.
- `GET /project/{username}/{project}/checkout-key/{fingerprint}` — Get a checkout key.
- `DELETE /project/{username}/{project}/checkout-key/{fingerprint}` — Delete a checkout key.
- `GET /project/{username}/{project}/envvar` — Lists the environment variables for :project
- `POST /project/{username}/{project}/envvar` — Creates a new environment variable
- `GET /project/{username}/{project}/envvar/{name}` — Gets the hidden value of environment variable :name
- `DELETE /project/{username}/{project}/envvar/{name}` — Deletes the environment variable named ':name'
- `POST /project/{username}/{project}/ssh-key` — Create an ssh key used to access external systems that require SSH key-based authentication
- `POST /project/{username}/{project}/tree/{branch}` — Triggers a new build, returns a summary of the build.
- `GET /project/{username}/{project}/{build_num}` — Full details for a single build. The response includes all of the fields from the build summary.
- `GET /project/{username}/{project}/{build_num}/artifacts` — List the artifacts produced by a given build.
- `POST /project/{username}/{project}/{build_num}/cancel` — Cancels the build, returns a summary of the build.
- `POST /project/{username}/{project}/{build_num}/retry` — Retries the build, returns a summary of the new build.
- `GET /project/{username}/{project}/{build_num}/tests` — Provides test metadata for a build
- `GET /projects` — List of all the projects you're following on CircleCI, with build information organized by branch.
- `GET /recent-builds` — Build summary for each of the last 30 recent builds, ordered by build_num.
- `POST /user/heroku-key` — Adds your Heroku API key to CircleCI, takes apikey as form param name.

## Questions

### Does the CircleCI API need an API key?

Yes. The CircleCI API uses API key authentication; the documentation explains how to get credentials.

### Does the CircleCI API support HTTPS?

Yes, the CircleCI API is served over HTTPS.

### How many endpoints does the CircleCI API have?

Its OpenAPI description lists 22 endpoints in version v1. All of them are shown on this page.

### What are alternatives to the CircleCI API?

Other Continuous Integration APIs include Azure DevOps Health, Travis CI, Bitrise, Buddy, EC2.shop API.

## Similar continuous integration APIs

- [Azure DevOps Health](https://www.openparable.com/apis/azure-devops-health): Resource health helps you diagnose and get support when an Azure issue impacts your resources
- [Travis CI](https://www.openparable.com/apis/travis-ci): Sync your GitHub projects with Travis CI to test your code in minutes
- [Bitrise](https://www.openparable.com/apis/bitrise): Build tool and processes integrations to create efficient development pipelines
- [Buddy](https://www.openparable.com/apis/buddy): The fastest continuous integration and continuous delivery platform
- [EC2.shop API](https://www.openparable.com/apis/ec2-shop): Get AWS service price right from your terminal

Listed from: public-apis (MIT), public-apis database (MIT), APIs.guru (CC0). Check the provider's terms before use.

---

Source: https://www.openparable.com/apis/circleci (OpenParable). Cite the canonical URL above.
