API endpoint reference
This reference is generated from the versioned OpenAPI contract maintained with the platform. It covers the declared CLI integration surface, not every internal route. Check your deployment's version and enabled features before using an operation. A source contract does not establish that a release channel or hosted Actions executor has completed qualification.
Use your deployment's HTTPS origin with the paths below. Replace path placeholders with URL-encoded values. Credentials and current repository permissions both constrain access. See API and authentication, GBB CLI, and Actions.
Authentication and retries
Operations marked Bearer require an Authorization: Bearer <credential> header. Credential-flow operations carry their own device or refresh credentials in the body; start with gbb auth login rather than implementing a new token flow without the full contract. Never include credentials in URLs or retained logs.
A listed Idempotency-Key header must meet that operation's requirement and format. Reuse it only for the same logical request. After a lost response, reconcile the result or use the operation's documented retry identity; inventing a new key can duplicate a mutation. Refresh uses its body request_id for an exact attempt.
List operations below declare page and per_page where supported. They are different from cursor pagination on other API routes. Do not assume nextCursor exists on every list response. The response table includes the codes explicitly declared by each operation; the default error envelope covers other failures.
Operations
| Operation | Method and path | Authentication |
|---|---|---|
getAuthenticatedUser | GET /api/v1/user | Bearer |
beginDeviceAuthorization | POST /api/auth/device/code | Credential flow |
pollDeviceAuthorization | POST /api/v1/auth/device/token | Credential flow |
cancelDeviceAuthorization | POST /api/v1/auth/device/cancel | Credential flow |
refreshCredential | POST /api/v1/auth/refresh | Credential flow |
revokeCredential | POST /api/v1/auth/revoke | Credential flow |
mintRepositoryGitCredential | POST /api/v1/repos/{owner}/{repo}/git/credentials | Bearer |
getRepository | GET /api/v1/repos/{owner}/{repo} | Bearer |
createUserRepository | POST /api/v1/user/repos | Bearer |
createOrganizationRepository | POST /api/v1/orgs/{owner}/repos | Bearer |
listRepositoryIssues | GET /api/v1/repos/{owner}/{repo}/issues | Bearer |
createRepositoryIssue | POST /api/v1/repos/{owner}/{repo}/issues | Bearer |
getRepositoryIssue | GET /api/v1/repos/{owner}/{repo}/issues/{number} | Bearer |
updateRepositoryIssue | PATCH /api/v1/repos/{owner}/{repo}/issues/{number} | Bearer |
addIssueLabel | PUT /api/v1/repos/{owner}/{repo}/issues/{number}/labels/{labelId} | Bearer |
removeIssueLabel | DELETE /api/v1/repos/{owner}/{repo}/issues/{number}/labels/{labelId} | Bearer |
listRepositoryLabels | GET /api/v1/repos/{owner}/{repo}/labels | Bearer |
createRepositoryLabel | POST /api/v1/repos/{owner}/{repo}/labels | Bearer |
updateRepositoryLabel | PATCH /api/v1/repos/{owner}/{repo}/labels/{labelId} | Bearer |
deleteRepositoryLabel | DELETE /api/v1/repos/{owner}/{repo}/labels/{labelId} | Bearer |
listRepositoryPullRequests | GET /api/v1/repos/{owner}/{repo}/pulls | Bearer |
createRepositoryPullRequest | POST /api/v1/repos/{owner}/{repo}/pulls | Bearer |
getRepositoryPullRequest | GET /api/v1/repos/{owner}/{repo}/pulls/{number} | Bearer |
updateRepositoryPullRequest | PATCH /api/v1/repos/{owner}/{repo}/pulls/{number} | Bearer |
listPullRequestReviews | GET /api/v1/repos/{owner}/{repo}/pulls/{number}/reviews | Bearer |
createPullRequestReview | POST /api/v1/repos/{owner}/{repo}/pulls/{number}/reviews | Bearer |
updatePullRequestBranch | POST /api/v1/repos/{owner}/{repo}/pulls/{number}/update-branch | Bearer |
mergePullRequest | PUT /api/v1/repos/{owner}/{repo}/pulls/{number}/merge | Bearer |
addPullRequestLabel | PUT /api/v1/repos/{owner}/{repo}/pulls/{number}/labels/{labelId} | Bearer |
removePullRequestLabel | DELETE /api/v1/repos/{owner}/{repo}/pulls/{number}/labels/{labelId} | Bearer |
listRepositoryChecks | GET /api/v1/repos/{owner}/{repo}/checks | Bearer |
getRepositoryCheckRun | GET /api/v1/repos/{owner}/{repo}/check-runs/{runId} | Bearer |
listRepositoryWorkflows | GET /api/v1/repos/{owner}/{repo}/actions/workflows | Bearer |
getRepositoryWorkflow | GET /api/v1/repos/{owner}/{repo}/actions/workflows/{workflowId} | Bearer |
dispatchRepositoryWorkflow | POST /api/v1/repos/{owner}/{repo}/actions/workflows/{workflowId}/dispatches | Bearer |
listRepositoryWorkflowRuns | GET /api/v1/repos/{owner}/{repo}/actions/runs | Bearer |
getRepositoryWorkflowRun | GET /api/v1/repos/{owner}/{repo}/actions/runs/{runId} | Bearer |
cancelRepositoryWorkflowRun | POST /api/v1/repos/{owner}/{repo}/actions/runs/{runId}/cancel | Bearer |
rerunRepositoryWorkflowRun | POST /api/v1/repos/{owner}/{repo}/actions/runs/{runId}/rerun | Bearer |
importRepositoryEnvironmentSecrets | POST /api/v1/repos/{owner}/{repo}/actions/environments/{environmentId}/secrets/imports | Bearer |
getAuthenticatedUser
GET /api/v1/user
Authentication: Bearer.
| Response | Meaning | Schema |
|---|---|---|
| 200 | Authenticated account identity | UserEnvelope |
| default | Stable API error | ApiError |
beginDeviceAuthorization
POST /api/auth/device/code
Authentication: Credential flow.
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
client_id | Yes | gbb-cli | |
scope | Yes | string | Space-delimited exact CLI scopes shown during Better Auth approval. Minimum length: 1. Maximum length: 2048. Pattern: ^\S+(?: \S+)*$. |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 200 | Device authorization created | DeviceCodeResponse |
| 400 | Better Auth rejected the device authorization request | OAuthError |
| default | Stable API error | ApiError |
pollDeviceAuthorization
POST /api/v1/auth/device/token
Authentication: Credential flow.
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
grant_type | Yes | urn:ietf:params:oauth:grant-type:device_code | |
device_code | Yes | string | Minimum length: 32. |
client_id | Yes | gbb-cli |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 200 | Poll state or issued credential | DevicePoll |
| 400 | The device-token request or grant is invalid | OAuthError |
| default | Stable API error | ApiError |
cancelDeviceAuthorization
POST /api/v1/auth/device/cancel
Authentication: Credential flow.
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
device_code | Yes | string | Minimum length: 32. |
client_id | Yes | gbb-cli |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 204 | Request completed with no response body | No body |
| default | Stable API error | ApiError |
refreshCredential
POST /api/v1/auth/refresh
Authentication: Credential flow.
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
refresh_token | Yes | string | Pattern: ^gbb_rt_. |
request_id | Yes | string | High-entropy nonce reused only when retrying this exact refresh attempt after an ambiguous response. Pattern: ^gbb_refresh_[a-f0-9]{64}$. |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 200 | Rotated credential pair | CredentialEnvelope |
| 401 | The refresh credential is invalid, expired, or already rotated | ApiError |
| default | Stable API error | ApiError |
revokeCredential
POST /api/v1/auth/revoke
Authentication: Credential flow.
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
access_token | No | string | Pattern: ^gbb_at_. |
refresh_token | No | string | Preferred family credential so revoke still works after access expiry. Pattern: ^gbb_rt_. |
Body alternatives (at least one must match):
- Required fields:
access_token. - Required fields:
refresh_token.
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 204 | Request completed with no response body | No body |
| default | Stable API error | ApiError |
mintRepositoryGitCredential
POST /api/v1/repos/{owner}/{repo}/git/credentials
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | |
repo | path | Yes | string |
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
operation | Yes | clone / fetch / push |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 200 | Repository- and operation-bound Git credential with a five-minute and 16-use ceiling | GitCredentialEnvelope |
| 429 | The parent credential already has the maximum number of live Git grants. | ApiError |
| default | Stable API error | ApiError |
getRepository
GET /api/v1/repos/{owner}/{repo}
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
| Response | Meaning | Schema |
|---|---|---|
| 200 | Repository detail | RepositoryEnvelope |
| default | Stable API error | ApiError |
createUserRepository
POST /api/v1/user/repos
Authentication: Bearer.
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
name | Yes | string | Minimum length: 1. Maximum length: 100. |
description | No | string | Maximum length: 350. |
visibility | No | private / internal / public | |
private | No | boolean | |
defaultBranch | No | string | Optional safe Git branch name, limited to 128 UTF-8 bytes, used as the default for a newly created non-template repository. Minimum length: 1. Maximum length: 128. |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 201 | Repository created | RepositoryEnvelope |
| default | Stable API error | ApiError |
createOrganizationRepository
POST /api/v1/orgs/{owner}/repos
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
name | Yes | string | Minimum length: 1. Maximum length: 100. |
description | No | string | Maximum length: 350. |
visibility | No | private / internal / public | |
private | No | boolean | |
defaultBranch | No | string | Optional safe Git branch name, limited to 128 UTF-8 bytes, used as the default for a newly created non-template repository. Minimum length: 1. Maximum length: 128. |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 201 | Repository created | RepositoryEnvelope |
| default | Stable API error | ApiError |
listRepositoryIssues
GET /api/v1/repos/{owner}/{repo}/issues
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
state | query | No | open / closed | |
page | query | No | integer | Minimum: 1. Maximum: 10000. Default: 1. |
per_page | query | No | integer | Minimum: 1. Maximum: 100. |
| Response | Meaning | Schema |
|---|---|---|
| 200 | Issue list | IssueList |
| default | Stable API error | ApiError |
createRepositoryIssue
POST /api/v1/repos/{owner}/{repo}/issues
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
title | Yes | string | Minimum length: 1. Maximum length: 256. |
body | Yes | string | Maximum length: 65536. |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 201 | Issue created | IssueEnvelope |
| default | Stable API error | ApiError |
getRepositoryIssue
GET /api/v1/repos/{owner}/{repo}/issues/{number}
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
number | path | Yes | integer | Minimum: 1. |
| Response | Meaning | Schema |
|---|---|---|
| 200 | Issue detail | IssueEnvelope |
| default | Stable API error | ApiError |
updateRepositoryIssue
PATCH /api/v1/repos/{owner}/{repo}/issues/{number}
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
number | path | Yes | integer | Minimum: 1. |
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
state | No | open / closed | |
state_reason | No | completed / not_planned / duplicate | |
title | No | string | Minimum length: 1. Maximum length: 256. |
body | No | string | Maximum length: 65536. |
issue_type_id | No | string / null |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 200 | Issue updated | IssueEnvelope |
| default | Stable API error | ApiError |
addIssueLabel
PUT /api/v1/repos/{owner}/{repo}/issues/{number}/labels/{labelId}
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
number | path | Yes | integer | Minimum: 1. |
labelId | path | Yes | string | Minimum length: 1. Maximum length: 256. |
| Response | Meaning | Schema |
|---|---|---|
| 200 | Label attached | LabelEnvelope |
| default | Stable API error | ApiError |
removeIssueLabel
DELETE /api/v1/repos/{owner}/{repo}/issues/{number}/labels/{labelId}
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
number | path | Yes | integer | Minimum: 1. |
labelId | path | Yes | string | Minimum length: 1. Maximum length: 256. |
| Response | Meaning | Schema |
|---|---|---|
| 200 | Label removed | LabelEnvelope |
| default | Stable API error | ApiError |
listRepositoryLabels
GET /api/v1/repos/{owner}/{repo}/labels
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
page | query | No | integer | Minimum: 1. Maximum: 10000. Default: 1. |
per_page | query | No | integer | Minimum: 1. Maximum: 100. |
| Response | Meaning | Schema |
|---|---|---|
| 200 | Label list | LabelList |
| default | Stable API error | ApiError |
createRepositoryLabel
POST /api/v1/repos/{owner}/{repo}/labels
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
name | Yes | string | Minimum length: 1. Maximum length: 100. |
color | Yes | string | Pattern: ^[0-9A-Fa-f]{6}$. |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 201 | Label created | LabelEnvelope |
| default | Stable API error | ApiError |
updateRepositoryLabel
PATCH /api/v1/repos/{owner}/{repo}/labels/{labelId}
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
labelId | path | Yes | string | Minimum length: 1. Maximum length: 256. |
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
name | No | string | Minimum length: 1. Maximum length: 100. |
color | No | string | Pattern: ^[0-9A-Fa-f]{6}$. |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 200 | Label updated | LabelEnvelope |
| default | Stable API error | ApiError |
deleteRepositoryLabel
DELETE /api/v1/repos/{owner}/{repo}/labels/{labelId}
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
labelId | path | Yes | string | Minimum length: 1. Maximum length: 256. |
| Response | Meaning | Schema |
|---|---|---|
| 200 | Deleted label | LabelEnvelope |
| default | Stable API error | ApiError |
listRepositoryPullRequests
GET /api/v1/repos/{owner}/{repo}/pulls
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
state | query | No | open / closed / merged / all | |
page | query | No | integer | Minimum: 1. Maximum: 10000. Default: 1. |
per_page | query | No | integer | Minimum: 1. Maximum: 100. |
| Response | Meaning | Schema |
|---|---|---|
| 200 | Pull request list | PullRequestList |
| default | Stable API error | ApiError |
createRepositoryPullRequest
POST /api/v1/repos/{owner}/{repo}/pulls
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
Idempotency-Key | header | Yes | string | Pattern: ^[A-Za-z0-9._:-]{8,128}$. |
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
title | Yes | string | Minimum length: 1. Maximum length: 256. |
body | Yes | string | Maximum length: 65536. |
base | Yes | string | Minimum length: 1. Maximum length: 1024. |
head | Yes | string | Minimum length: 1. Maximum length: 1024. |
draft | Yes | boolean |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 201 | Pull request created | PullRequestSummaryEnvelope |
| default | Stable API error | ApiError |
getRepositoryPullRequest
GET /api/v1/repos/{owner}/{repo}/pulls/{number}
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
number | path | Yes | integer | Minimum: 1. |
| Response | Meaning | Schema |
|---|---|---|
| 200 | Pull request detail | PullRequestEnvelope |
| default | Stable API error | ApiError |
updateRepositoryPullRequest
PATCH /api/v1/repos/{owner}/{repo}/pulls/{number}
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
number | path | Yes | integer | Minimum: 1. |
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
state | No | open / closed |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 200 | Pull request updated | PullRequestEnvelope |
| default | Stable API error | ApiError |
listPullRequestReviews
GET /api/v1/repos/{owner}/{repo}/pulls/{number}/reviews
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
number | path | Yes | integer | Minimum: 1. |
| Response | Meaning | Schema |
|---|---|---|
| 200 | Review list | ReviewList |
| default | Stable API error | ApiError |
createPullRequestReview
POST /api/v1/repos/{owner}/{repo}/pulls/{number}/reviews
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
number | path | Yes | integer | Minimum: 1. |
Idempotency-Key | header | Yes | string | Pattern: ^[A-Za-z0-9._:-]{8,128}$. |
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
state | Yes | approved / changes_requested / commented | |
body | Yes | string | Maximum length: 65536. |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 200 | Idempotent review replay | ReviewEnvelope |
| 201 | Review created | ReviewEnvelope |
| default | Stable API error | ApiError |
updatePullRequestBranch
POST /api/v1/repos/{owner}/{repo}/pulls/{number}/update-branch
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
number | path | Yes | integer | Minimum: 1. |
Idempotency-Key | header | No | string | Pattern: ^[A-Za-z0-9._:-]{8,128}$. |
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
expectedHeadSha | Yes | string | Pattern: ^(?:[0-9A-Fa-f]{40}|[0-9A-Fa-f]{64})$. |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 200 | Branch updated, or the prior completed update replayed for the same optional idempotency key. | PullRequestBranchUpdateEnvelope |
| 409 | The pull request changed, the idempotency key was reused with different input, or the same-key request is still being reconciled. | ApiError |
| 503 | The same-key request is still running and its distributed idempotency lock could not be acquired before the retry deadline. | ApiError |
| default | Stable API error | ApiError |
mergePullRequest
PUT /api/v1/repos/{owner}/{repo}/pulls/{number}/merge
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
number | path | Yes | integer | Minimum: 1. |
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
method | Yes | merge / squash / rebase | |
expectedHeadSha | Yes | string | Pattern: ^(?:[0-9A-Fa-f]{40}|[0-9A-Fa-f]{64})$. |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 200 | Merge result | PullRequestEnvelope |
| default | Stable API error | ApiError |
addPullRequestLabel
PUT /api/v1/repos/{owner}/{repo}/pulls/{number}/labels/{labelId}
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
number | path | Yes | integer | Minimum: 1. |
labelId | path | Yes | string | Minimum length: 1. Maximum length: 256. |
| Response | Meaning | Schema |
|---|---|---|
| 200 | Label attached | LabelEnvelope |
| default | Stable API error | ApiError |
removePullRequestLabel
DELETE /api/v1/repos/{owner}/{repo}/pulls/{number}/labels/{labelId}
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
number | path | Yes | integer | Minimum: 1. |
labelId | path | Yes | string | Minimum length: 1. Maximum length: 256. |
| Response | Meaning | Schema |
|---|---|---|
| 200 | Label removed | LabelEnvelope |
| default | Stable API error | ApiError |
listRepositoryChecks
GET /api/v1/repos/{owner}/{repo}/checks
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
ref | query | Yes | string | Minimum length: 1. Maximum length: 1024. |
| Response | Meaning | Schema |
|---|---|---|
| 200 | Check summary | CheckSummary |
| default | Stable API error | ApiError |
getRepositoryCheckRun
GET /api/v1/repos/{owner}/{repo}/check-runs/{runId}
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
runId | path | Yes | string | Minimum length: 1. Maximum length: 256. |
| Response | Meaning | Schema |
|---|---|---|
| 200 | Check-run detail | CheckRunEnvelope |
| default | Stable API error | ApiError |
listRepositoryWorkflows
GET /api/v1/repos/{owner}/{repo}/actions/workflows
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
page | query | No | integer | Minimum: 1. Maximum: 10000. Default: 1. |
per_page | query | No | integer | Minimum: 1. Maximum: 100. |
| Response | Meaning | Schema |
|---|---|---|
| 200 | Workflow list | WorkflowList |
| default | Stable API error | ApiError |
getRepositoryWorkflow
GET /api/v1/repos/{owner}/{repo}/actions/workflows/{workflowId}
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
workflowId | path | Yes | string | Minimum length: 1. Maximum length: 4096. |
| Response | Meaning | Schema |
|---|---|---|
| 200 | Workflow detail | Workflow |
| default | Stable API error | ApiError |
dispatchRepositoryWorkflow
POST /api/v1/repos/{owner}/{repo}/actions/workflows/{workflowId}/dispatches
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
workflowId | path | Yes | string | Minimum length: 1. Maximum length: 4096. |
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
ref | Yes | string | Minimum length: 1. Maximum length: 1024. |
inputs | Yes | object | |
request_id | Yes | string | Minimum length: 1. Maximum length: 256. |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 200 | Workflow dispatched | WorkflowRunMutationEnvelope |
| default | Stable API error | ApiError |
listRepositoryWorkflowRuns
GET /api/v1/repos/{owner}/{repo}/actions/runs
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
page | query | No | integer | Minimum: 1. Maximum: 10000. Default: 1. |
per_page | query | No | integer | Minimum: 1. Maximum: 100. |
status | query | No | completed / action_required / cancelled / failure / neutral / skipped / stale / success / timed_out / in_progress / queued / requested / waiting / pending | |
branch | query | No | string | Minimum length: 1. Maximum length: 1024. |
event | query | No | string | Minimum length: 1. Maximum length: 64. |
head_sha | query | No | string | Pattern: ^(?:[0-9a-fA-F]{40}|[0-9a-fA-F]{64})$. |
| Response | Meaning | Schema |
|---|---|---|
| 200 | Workflow run list | WorkflowRunList |
| default | Stable API error | ApiError |
getRepositoryWorkflowRun
GET /api/v1/repos/{owner}/{repo}/actions/runs/{runId}
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
runId | path | Yes | string | Minimum length: 1. Maximum length: 256. |
| Response | Meaning | Schema |
|---|---|---|
| 200 | Workflow run detail | WorkflowRun |
| default | Stable API error | ApiError |
cancelRepositoryWorkflowRun
POST /api/v1/repos/{owner}/{repo}/actions/runs/{runId}/cancel
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
runId | path | Yes | string | Minimum length: 1. Maximum length: 256. |
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
idempotency_key | Yes | string | Minimum length: 1. Maximum length: 256. |
expected_version | No | integer | Minimum: 0. Maximum: 9007199254740991. |
grace_period_ms | No | integer | Minimum: 0. Maximum: 300000. |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 200 | Cancellation accepted | WorkflowRunEnvelope |
| default | Stable API error | ApiError |
rerunRepositoryWorkflowRun
POST /api/v1/repos/{owner}/{repo}/actions/runs/{runId}/rerun
Authentication: Bearer.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
runId | path | Yes | string | Minimum length: 1. Maximum length: 256. |
Request body: required.
Content type: application/json.
| JSON field | Required | Type or allowed values | Constraints |
|---|---|---|---|
idempotency_key | Yes | string | Minimum length: 1. Maximum length: 256. |
expected_version | No | integer | Minimum: 0. Maximum: 9007199254740991. |
grace_period_ms | No | integer | Minimum: 0. Maximum: 300000. |
Unknown fields are rejected.
| Response | Meaning | Schema |
|---|---|---|
| 200 | Rerun accepted | WorkflowRunMutationEnvelope |
| default | Stable API error | ApiError |
importRepositoryEnvironmentSecrets
POST /api/v1/repos/{owner}/{repo}/actions/environments/{environmentId}/secrets/imports
Authentication: Bearer.
Required credential scope: repo.admin. Resource permissions are still checked.
| Parameter | Location | Required | Type or allowed values | Constraints |
|---|---|---|---|---|
owner | path | Yes | string | Minimum length: 1. Maximum length: 100. |
repo | path | Yes | string | Minimum length: 1. Maximum length: 100. |
environmentId | path | Yes | string | Minimum length: 68. Maximum length: 68. Pattern: ^env_[0-9a-f]{64}$. |
request_id | query | Yes | string | Minimum length: 1. Maximum length: 256. Pattern: ^[\x21-\x7E]{1,256}$. |
reason_code | query | Yes | string | Minimum length: 1. Maximum length: 128. Pattern: ^[a-z0-9_.-]+$. |
rotation_policy | query | Yes | create_only / upsert |
Request body: required.
Content type: text/plain.
UTF-8 .env-like write-only secret bundle, limited to 262,144 encoded bytes (not Unicode code points). Plaintext values are never returned by this operation. Minimum length: 1.
| Response | Meaning | Schema |
|---|---|---|
| 201 | Secret bundle imported atomically | EnvironmentSecretImport |
| 409 | The request ID was already used with a different bundle, or create_only encountered a secret name that already exists | ApiError |
| default | Stable API error | ApiError |
Full machine-readable contract
Download the OpenAPI contract for full response schemas, nested request shapes, examples, and compatibility extensions. Its server paths are relative: supply your deployment's HTTPS origin in your client. This reference and the downloadable contract are generated together from the maintained source. See Troubleshooting for common access and request failures.