# CircleCI API v2

Call the CircleCI REST API v2 to read and manage pipelines, workflows, jobs, projects, and insights programmatically.

## When to use this

- Fetching pipeline, workflow, or job status outside the CircleCI UI
- Triggering a new pipeline run
- Pulling insights or usage data for a project or org
- Building an integration or automation on top of CircleCI

## Authentication

Send a personal API token in the `Circle-Token` header:

    curl --header "Circle-Token: $CIRCLE_TOKEN" https://circleci.com/api/v2/me

HTTP Basic Auth is also supported: use the token as the username and leave the password blank. Generate a personal API token at https://app.circleci.com/settings/user/tokens. Project API tokens exist but are not supported on API v2.

## Base URL

    https://circleci.com/api/v2

## Reference

- OpenAPI specification: https://circleci.com/docs/api/v2/openapi.json
- Human-readable reference: https://circleci.com/docs/api/v2/index.html
- LLM-friendly per-operation index: https://circleci.com/docs/api/v2/llms.txt
