CircleCI APIs overview
The CircleCI API enables you to interact with your pipelines, projects, and organizations programmatically. Use the API to retrieve detailed information about users, jobs, workflows, and pipelines. You can also trigger pipelines and manage resources. CircleCI currently supports three API versions, plus a separate API for self-hosted runners:
-
API v3 Reference (Current)
-
API v2 Reference (Legacy)
-
API v1.1 Reference (Legacy)
-
Runner API Reference (Self-hosted runners)
API overview
| Version | Status | Key features | When to use |
|---|---|---|---|
API v3 |
Current |
|
|
API v2 |
Legacy (supported) |
|
|
API v1.1 |
Legacy (EOL planned) |
Basic pipeline, job, and project endpoints. |
|
Specialized (separate API) |
|
|
| CircleCI recommends migrating to API v3 for all new work. API v1.1 is planned for End-Of-Life (EOL); CircleCI will communicate the discontinuation date in the future. |
To get started, see the API V3 Developers Guide, the API V2 Developers Guide, or the Runner API Reference.
Authentication
All CircleCI API versions use token-based authentication. You need a personal API token to authenticate your requests.
| API version | Bearer Authentication | Circle-Token header | Basic Authentication |
|---|---|---|---|
API v3 |
Yes |
No |
No |
API v2 |
Yes |
Yes |
Yes |
API v1.1 |
Yes |
Yes |
Yes |
Runner API |
No |
Yes |
Yes |
- Bearer Authentication
-
Pass the token as a Bearer token in the
Authorizationheader. - Circle-Token header
-
Pass the token in the
Circle-Tokenheader. - Basic Authentication
-
Use the token as the username (Base64-encoded).
See the Managing API Tokens guide for information on creating and managing tokens.
| The Runner API accepts these same personal token methods, plus a resource class token used exclusively by self-hosted runner agents. See the Runner API reference for details. |
Next steps
-
Review the API V3 Developers Guide for a detailed walkthrough on using the current API version.
-
Review the API V2 Developers Guide for information on the legacy v2 API.
-
Explore the API V3 Reference for complete endpoint documentation.
-
See the Runner API Reference for self-hosted runner endpoints.