CircleCI REST API V2
The CircleCI REST API v2 provides programmatic access for managing pipelines, projects, workflows, jobs, contexts, and users.
The CircleCI REST API v2 provides programmatic access for managing pipelines, projects, workflows, jobs, contexts, and users.
openapi: 3.1.0
info:
title: CircleCI REST API V2
description: >-
The CircleCI REST API v2 provides programmatic access for managing
pipelines, projects, workflows, jobs, contexts, and users on the CircleCI
continuous integration and delivery platform.
version: 2.0.0
contact:
name: CircleCI Support
url: https://support.circleci.com/
license:
name: Proprietary
url: https://circleci.com/legal/terms-of-service/
x-generated-from: https://circleci.com/docs/api/v2/
x-generated-by: claude-crawl-2026-05-08
servers:
- url: https://circleci.com/api/v2
description: CircleCI API v2
security:
- apiTokenAuth: []
- basicAuth: []
tags:
- name: Context
description: Operations for organization contexts.
- name: Pipeline
description: Pipeline trigger and inspection.
- name: Project
description: Project-scoped operations.
- name: Job
description: Job inspection and cancellation.
- name: Workflow
description: Workflow inspection and cancellation.
- name: User
description: Current user information.
paths:
/context:
get:
operationId: listContexts
summary: List contexts
description: List all contexts for an owner.
tags:
- Context
parameters:
- name: owner-id
in: query
schema:
type: string
- name: page-token
in: query
schema:
type: string
responses:
'200':
description: List of contexts
content:
application/json:
schema:
$ref: '#/components/schemas/GenericResponse'
post:
operationId: createContext
summary: Create a context
description: Creates a new context in the specified organization.
tags:
- Context
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GenericRequest'
responses:
'200':
description: Created context
content:
application/json:
schema:
$ref: '#/components/schemas/GenericResponse'
/pipeline/continue:
post:
operationId: continuePipeline
summary: Continue a pipeline
description: Continue a pipeline from the setup phase.
tags:
- Pipeline
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GenericRequest'
responses:
'200':
description: Pipeline continued
content:
application/json:
schema:
$ref: '#/components/schemas/GenericResponse'
/pipeline/{pipeline-id}:
get:
operationId: getPipeline
summary: Get pipeline by ID
description: Retrieve pipeline details by unique identifier.
tags:
- Pipeline
parameters:
- name: pipeline-id
in: path
required: true
schema:
type: string
responses:
'200':
description: Pipeline details
content:
application/json:
schema:
$ref: '#/components/schemas/GenericResponse'
/project/{project-slug}/pipeline:
post:
operationId: triggerPipeline
summary: Trigger a new pipeline
description: Trigger a new pipeline on a project.
tags:
- Project
- Pipeline
parameters:
- name: project-slug
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GenericRequest'
responses:
'201':
description: Pipeline triggered
content:
application/json:
schema:
$ref: '#/components/schemas/GenericResponse'
/project/{project-slug}/job/{job-number}:
get:
operationId: getJob
summary: Get job by number
description: Retrieve job details and metadata.
tags:
- Job
parameters:
- name: project-slug
in: path
required: true
schema:
type: string
- name: job-number
in: path
required: true
schema:
type: string
responses:
'200':
description: Job details
content:
application/json:
schema:
$ref: '#/components/schemas/GenericResponse'
/jobs/{job-id}/cancel:
post:
operationId: cancelJob
summary: Cancel a job
description: Cancel a job by its unique ID.
tags:
- Job
parameters:
- name: job-id
in: path
required: true
schema:
type: string
responses:
'200':
description: Job cancelled
content:
application/json:
schema:
$ref: '#/components/schemas/GenericResponse'
/workflow/{id}/cancel:
post:
operationId: cancelWorkflow
summary: Cancel a workflow
description: Cancels a running workflow.
tags:
- Workflow
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'202':
description: Workflow cancellation accepted
content:
application/json:
schema:
$ref: '#/components/schemas/GenericResponse'
/me:
get:
operationId: getCurrentUser
summary: Get current user
description: Provides information about the user that is currently signed in.
tags:
- User
responses:
'200':
description: Current user
content:
application/json:
schema:
$ref: '#/components/schemas/GenericResponse'
components:
securitySchemes:
apiTokenAuth:
type: apiKey
in: header
name: Circle-Token
description: CircleCI personal API token.
basicAuth:
type: http
scheme: basic
description: HTTP Basic with API token as username.
schemas:
GenericRequest:
type: object
additionalProperties: true
GenericResponse:
type: object
additionalProperties: true