Skip to content
DocumentationBuild with the platform

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

OperationMethod and pathAuthentication
getAuthenticatedUserGET /api/v1/userBearer
beginDeviceAuthorizationPOST /api/auth/device/codeCredential flow
pollDeviceAuthorizationPOST /api/v1/auth/device/tokenCredential flow
cancelDeviceAuthorizationPOST /api/v1/auth/device/cancelCredential flow
refreshCredentialPOST /api/v1/auth/refreshCredential flow
revokeCredentialPOST /api/v1/auth/revokeCredential flow
mintRepositoryGitCredentialPOST /api/v1/repos/{owner}/{repo}/git/credentialsBearer
getRepositoryGET /api/v1/repos/{owner}/{repo}Bearer
createUserRepositoryPOST /api/v1/user/reposBearer
createOrganizationRepositoryPOST /api/v1/orgs/{owner}/reposBearer
listRepositoryIssuesGET /api/v1/repos/{owner}/{repo}/issuesBearer
createRepositoryIssuePOST /api/v1/repos/{owner}/{repo}/issuesBearer
getRepositoryIssueGET /api/v1/repos/{owner}/{repo}/issues/{number}Bearer
updateRepositoryIssuePATCH /api/v1/repos/{owner}/{repo}/issues/{number}Bearer
addIssueLabelPUT /api/v1/repos/{owner}/{repo}/issues/{number}/labels/{labelId}Bearer
removeIssueLabelDELETE /api/v1/repos/{owner}/{repo}/issues/{number}/labels/{labelId}Bearer
listRepositoryLabelsGET /api/v1/repos/{owner}/{repo}/labelsBearer
createRepositoryLabelPOST /api/v1/repos/{owner}/{repo}/labelsBearer
updateRepositoryLabelPATCH /api/v1/repos/{owner}/{repo}/labels/{labelId}Bearer
deleteRepositoryLabelDELETE /api/v1/repos/{owner}/{repo}/labels/{labelId}Bearer
listRepositoryPullRequestsGET /api/v1/repos/{owner}/{repo}/pullsBearer
createRepositoryPullRequestPOST /api/v1/repos/{owner}/{repo}/pullsBearer
getRepositoryPullRequestGET /api/v1/repos/{owner}/{repo}/pulls/{number}Bearer
updateRepositoryPullRequestPATCH /api/v1/repos/{owner}/{repo}/pulls/{number}Bearer
listPullRequestReviewsGET /api/v1/repos/{owner}/{repo}/pulls/{number}/reviewsBearer
createPullRequestReviewPOST /api/v1/repos/{owner}/{repo}/pulls/{number}/reviewsBearer
updatePullRequestBranchPOST /api/v1/repos/{owner}/{repo}/pulls/{number}/update-branchBearer
mergePullRequestPUT /api/v1/repos/{owner}/{repo}/pulls/{number}/mergeBearer
addPullRequestLabelPUT /api/v1/repos/{owner}/{repo}/pulls/{number}/labels/{labelId}Bearer
removePullRequestLabelDELETE /api/v1/repos/{owner}/{repo}/pulls/{number}/labels/{labelId}Bearer
listRepositoryChecksGET /api/v1/repos/{owner}/{repo}/checksBearer
getRepositoryCheckRunGET /api/v1/repos/{owner}/{repo}/check-runs/{runId}Bearer
listRepositoryWorkflowsGET /api/v1/repos/{owner}/{repo}/actions/workflowsBearer
getRepositoryWorkflowGET /api/v1/repos/{owner}/{repo}/actions/workflows/{workflowId}Bearer
dispatchRepositoryWorkflowPOST /api/v1/repos/{owner}/{repo}/actions/workflows/{workflowId}/dispatchesBearer
listRepositoryWorkflowRunsGET /api/v1/repos/{owner}/{repo}/actions/runsBearer
getRepositoryWorkflowRunGET /api/v1/repos/{owner}/{repo}/actions/runs/{runId}Bearer
cancelRepositoryWorkflowRunPOST /api/v1/repos/{owner}/{repo}/actions/runs/{runId}/cancelBearer
rerunRepositoryWorkflowRunPOST /api/v1/repos/{owner}/{repo}/actions/runs/{runId}/rerunBearer
importRepositoryEnvironmentSecretsPOST /api/v1/repos/{owner}/{repo}/actions/environments/{environmentId}/secrets/importsBearer

getAuthenticatedUser

GET /api/v1/user

Authentication: Bearer.

ResponseMeaningSchema
200Authenticated account identityUserEnvelope
defaultStable API errorApiError

beginDeviceAuthorization

POST /api/auth/device/code

Authentication: Credential flow.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
client_idYesgbb-cli
scopeYesstringSpace-delimited exact CLI scopes shown during Better Auth approval. Minimum length: 1. Maximum length: 2048. Pattern: ^\S+(?: \S+)*$.

Unknown fields are rejected.

ResponseMeaningSchema
200Device authorization createdDeviceCodeResponse
400Better Auth rejected the device authorization requestOAuthError
defaultStable API errorApiError

pollDeviceAuthorization

POST /api/v1/auth/device/token

Authentication: Credential flow.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
grant_typeYesurn:ietf:params:oauth:grant-type:device_code
device_codeYesstringMinimum length: 32.
client_idYesgbb-cli

Unknown fields are rejected.

ResponseMeaningSchema
200Poll state or issued credentialDevicePoll
400The device-token request or grant is invalidOAuthError
defaultStable API errorApiError

cancelDeviceAuthorization

POST /api/v1/auth/device/cancel

Authentication: Credential flow.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
device_codeYesstringMinimum length: 32.
client_idYesgbb-cli

Unknown fields are rejected.

ResponseMeaningSchema
204Request completed with no response bodyNo body
defaultStable API errorApiError

refreshCredential

POST /api/v1/auth/refresh

Authentication: Credential flow.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
refresh_tokenYesstringPattern: ^gbb_rt_.
request_idYesstringHigh-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.

ResponseMeaningSchema
200Rotated credential pairCredentialEnvelope
401The refresh credential is invalid, expired, or already rotatedApiError
defaultStable API errorApiError

revokeCredential

POST /api/v1/auth/revoke

Authentication: Credential flow.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
access_tokenNostringPattern: ^gbb_at_.
refresh_tokenNostringPreferred 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.

ResponseMeaningSchema
204Request completed with no response bodyNo body
defaultStable API errorApiError

mintRepositoryGitCredential

POST /api/v1/repos/{owner}/{repo}/git/credentials

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstring
repopathYesstring

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
operationYesclone / fetch / push

Unknown fields are rejected.

ResponseMeaningSchema
200Repository- and operation-bound Git credential with a five-minute and 16-use ceilingGitCredentialEnvelope
429The parent credential already has the maximum number of live Git grants.ApiError
defaultStable API errorApiError

getRepository

GET /api/v1/repos/{owner}/{repo}

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
ResponseMeaningSchema
200Repository detailRepositoryEnvelope
defaultStable API errorApiError

createUserRepository

POST /api/v1/user/repos

Authentication: Bearer.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
nameYesstringMinimum length: 1. Maximum length: 100.
descriptionNostringMaximum length: 350.
visibilityNoprivate / internal / public
privateNoboolean
defaultBranchNostringOptional 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.

ResponseMeaningSchema
201Repository createdRepositoryEnvelope
defaultStable API errorApiError

createOrganizationRepository

POST /api/v1/orgs/{owner}/repos

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
nameYesstringMinimum length: 1. Maximum length: 100.
descriptionNostringMaximum length: 350.
visibilityNoprivate / internal / public
privateNoboolean
defaultBranchNostringOptional 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.

ResponseMeaningSchema
201Repository createdRepositoryEnvelope
defaultStable API errorApiError

listRepositoryIssues

GET /api/v1/repos/{owner}/{repo}/issues

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
statequeryNoopen / closed
pagequeryNointegerMinimum: 1. Maximum: 10000. Default: 1.
per_pagequeryNointegerMinimum: 1. Maximum: 100.
ResponseMeaningSchema
200Issue listIssueList
defaultStable API errorApiError

createRepositoryIssue

POST /api/v1/repos/{owner}/{repo}/issues

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
titleYesstringMinimum length: 1. Maximum length: 256.
bodyYesstringMaximum length: 65536.

Unknown fields are rejected.

ResponseMeaningSchema
201Issue createdIssueEnvelope
defaultStable API errorApiError

getRepositoryIssue

GET /api/v1/repos/{owner}/{repo}/issues/{number}

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
numberpathYesintegerMinimum: 1.
ResponseMeaningSchema
200Issue detailIssueEnvelope
defaultStable API errorApiError

updateRepositoryIssue

PATCH /api/v1/repos/{owner}/{repo}/issues/{number}

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
numberpathYesintegerMinimum: 1.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
stateNoopen / closed
state_reasonNocompleted / not_planned / duplicate
titleNostringMinimum length: 1. Maximum length: 256.
bodyNostringMaximum length: 65536.
issue_type_idNostring / null

Unknown fields are rejected.

ResponseMeaningSchema
200Issue updatedIssueEnvelope
defaultStable API errorApiError

addIssueLabel

PUT /api/v1/repos/{owner}/{repo}/issues/{number}/labels/{labelId}

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
numberpathYesintegerMinimum: 1.
labelIdpathYesstringMinimum length: 1. Maximum length: 256.
ResponseMeaningSchema
200Label attachedLabelEnvelope
defaultStable API errorApiError

removeIssueLabel

DELETE /api/v1/repos/{owner}/{repo}/issues/{number}/labels/{labelId}

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
numberpathYesintegerMinimum: 1.
labelIdpathYesstringMinimum length: 1. Maximum length: 256.
ResponseMeaningSchema
200Label removedLabelEnvelope
defaultStable API errorApiError

listRepositoryLabels

GET /api/v1/repos/{owner}/{repo}/labels

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
pagequeryNointegerMinimum: 1. Maximum: 10000. Default: 1.
per_pagequeryNointegerMinimum: 1. Maximum: 100.
ResponseMeaningSchema
200Label listLabelList
defaultStable API errorApiError

createRepositoryLabel

POST /api/v1/repos/{owner}/{repo}/labels

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
nameYesstringMinimum length: 1. Maximum length: 100.
colorYesstringPattern: ^[0-9A-Fa-f]{6}$.

Unknown fields are rejected.

ResponseMeaningSchema
201Label createdLabelEnvelope
defaultStable API errorApiError

updateRepositoryLabel

PATCH /api/v1/repos/{owner}/{repo}/labels/{labelId}

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
labelIdpathYesstringMinimum length: 1. Maximum length: 256.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
nameNostringMinimum length: 1. Maximum length: 100.
colorNostringPattern: ^[0-9A-Fa-f]{6}$.

Unknown fields are rejected.

ResponseMeaningSchema
200Label updatedLabelEnvelope
defaultStable API errorApiError

deleteRepositoryLabel

DELETE /api/v1/repos/{owner}/{repo}/labels/{labelId}

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
labelIdpathYesstringMinimum length: 1. Maximum length: 256.
ResponseMeaningSchema
200Deleted labelLabelEnvelope
defaultStable API errorApiError

listRepositoryPullRequests

GET /api/v1/repos/{owner}/{repo}/pulls

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
statequeryNoopen / closed / merged / all
pagequeryNointegerMinimum: 1. Maximum: 10000. Default: 1.
per_pagequeryNointegerMinimum: 1. Maximum: 100.
ResponseMeaningSchema
200Pull request listPullRequestList
defaultStable API errorApiError

createRepositoryPullRequest

POST /api/v1/repos/{owner}/{repo}/pulls

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
Idempotency-KeyheaderYesstringPattern: ^[A-Za-z0-9._:-]{8,128}$.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
titleYesstringMinimum length: 1. Maximum length: 256.
bodyYesstringMaximum length: 65536.
baseYesstringMinimum length: 1. Maximum length: 1024.
headYesstringMinimum length: 1. Maximum length: 1024.
draftYesboolean

Unknown fields are rejected.

ResponseMeaningSchema
201Pull request createdPullRequestSummaryEnvelope
defaultStable API errorApiError

getRepositoryPullRequest

GET /api/v1/repos/{owner}/{repo}/pulls/{number}

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
numberpathYesintegerMinimum: 1.
ResponseMeaningSchema
200Pull request detailPullRequestEnvelope
defaultStable API errorApiError

updateRepositoryPullRequest

PATCH /api/v1/repos/{owner}/{repo}/pulls/{number}

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
numberpathYesintegerMinimum: 1.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
stateNoopen / closed

Unknown fields are rejected.

ResponseMeaningSchema
200Pull request updatedPullRequestEnvelope
defaultStable API errorApiError

listPullRequestReviews

GET /api/v1/repos/{owner}/{repo}/pulls/{number}/reviews

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
numberpathYesintegerMinimum: 1.
ResponseMeaningSchema
200Review listReviewList
defaultStable API errorApiError

createPullRequestReview

POST /api/v1/repos/{owner}/{repo}/pulls/{number}/reviews

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
numberpathYesintegerMinimum: 1.
Idempotency-KeyheaderYesstringPattern: ^[A-Za-z0-9._:-]{8,128}$.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
stateYesapproved / changes_requested / commented
bodyYesstringMaximum length: 65536.

Unknown fields are rejected.

ResponseMeaningSchema
200Idempotent review replayReviewEnvelope
201Review createdReviewEnvelope
defaultStable API errorApiError

updatePullRequestBranch

POST /api/v1/repos/{owner}/{repo}/pulls/{number}/update-branch

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
numberpathYesintegerMinimum: 1.
Idempotency-KeyheaderNostringPattern: ^[A-Za-z0-9._:-]{8,128}$.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
expectedHeadShaYesstringPattern: ^(?:[0-9A-Fa-f]{40}|[0-9A-Fa-f]{64})$.

Unknown fields are rejected.

ResponseMeaningSchema
200Branch updated, or the prior completed update replayed for the same optional idempotency key.PullRequestBranchUpdateEnvelope
409The pull request changed, the idempotency key was reused with different input, or the same-key request is still being reconciled.ApiError
503The same-key request is still running and its distributed idempotency lock could not be acquired before the retry deadline.ApiError
defaultStable API errorApiError

mergePullRequest

PUT /api/v1/repos/{owner}/{repo}/pulls/{number}/merge

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
numberpathYesintegerMinimum: 1.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
methodYesmerge / squash / rebase
expectedHeadShaYesstringPattern: ^(?:[0-9A-Fa-f]{40}|[0-9A-Fa-f]{64})$.

Unknown fields are rejected.

ResponseMeaningSchema
200Merge resultPullRequestEnvelope
defaultStable API errorApiError

addPullRequestLabel

PUT /api/v1/repos/{owner}/{repo}/pulls/{number}/labels/{labelId}

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
numberpathYesintegerMinimum: 1.
labelIdpathYesstringMinimum length: 1. Maximum length: 256.
ResponseMeaningSchema
200Label attachedLabelEnvelope
defaultStable API errorApiError

removePullRequestLabel

DELETE /api/v1/repos/{owner}/{repo}/pulls/{number}/labels/{labelId}

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
numberpathYesintegerMinimum: 1.
labelIdpathYesstringMinimum length: 1. Maximum length: 256.
ResponseMeaningSchema
200Label removedLabelEnvelope
defaultStable API errorApiError

listRepositoryChecks

GET /api/v1/repos/{owner}/{repo}/checks

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
refqueryYesstringMinimum length: 1. Maximum length: 1024.
ResponseMeaningSchema
200Check summaryCheckSummary
defaultStable API errorApiError

getRepositoryCheckRun

GET /api/v1/repos/{owner}/{repo}/check-runs/{runId}

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
runIdpathYesstringMinimum length: 1. Maximum length: 256.
ResponseMeaningSchema
200Check-run detailCheckRunEnvelope
defaultStable API errorApiError

listRepositoryWorkflows

GET /api/v1/repos/{owner}/{repo}/actions/workflows

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
pagequeryNointegerMinimum: 1. Maximum: 10000. Default: 1.
per_pagequeryNointegerMinimum: 1. Maximum: 100.
ResponseMeaningSchema
200Workflow listWorkflowList
defaultStable API errorApiError

getRepositoryWorkflow

GET /api/v1/repos/{owner}/{repo}/actions/workflows/{workflowId}

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
workflowIdpathYesstringMinimum length: 1. Maximum length: 4096.
ResponseMeaningSchema
200Workflow detailWorkflow
defaultStable API errorApiError

dispatchRepositoryWorkflow

POST /api/v1/repos/{owner}/{repo}/actions/workflows/{workflowId}/dispatches

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
workflowIdpathYesstringMinimum length: 1. Maximum length: 4096.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
refYesstringMinimum length: 1. Maximum length: 1024.
inputsYesobject
request_idYesstringMinimum length: 1. Maximum length: 256.

Unknown fields are rejected.

ResponseMeaningSchema
200Workflow dispatchedWorkflowRunMutationEnvelope
defaultStable API errorApiError

listRepositoryWorkflowRuns

GET /api/v1/repos/{owner}/{repo}/actions/runs

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
pagequeryNointegerMinimum: 1. Maximum: 10000. Default: 1.
per_pagequeryNointegerMinimum: 1. Maximum: 100.
statusqueryNocompleted / action_required / cancelled / failure / neutral / skipped / stale / success / timed_out / in_progress / queued / requested / waiting / pending
branchqueryNostringMinimum length: 1. Maximum length: 1024.
eventqueryNostringMinimum length: 1. Maximum length: 64.
head_shaqueryNostringPattern: ^(?:[0-9a-fA-F]{40}|[0-9a-fA-F]{64})$.
ResponseMeaningSchema
200Workflow run listWorkflowRunList
defaultStable API errorApiError

getRepositoryWorkflowRun

GET /api/v1/repos/{owner}/{repo}/actions/runs/{runId}

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
runIdpathYesstringMinimum length: 1. Maximum length: 256.
ResponseMeaningSchema
200Workflow run detailWorkflowRun
defaultStable API errorApiError

cancelRepositoryWorkflowRun

POST /api/v1/repos/{owner}/{repo}/actions/runs/{runId}/cancel

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
runIdpathYesstringMinimum length: 1. Maximum length: 256.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
idempotency_keyYesstringMinimum length: 1. Maximum length: 256.
expected_versionNointegerMinimum: 0. Maximum: 9007199254740991.
grace_period_msNointegerMinimum: 0. Maximum: 300000.

Unknown fields are rejected.

ResponseMeaningSchema
200Cancellation acceptedWorkflowRunEnvelope
defaultStable API errorApiError

rerunRepositoryWorkflowRun

POST /api/v1/repos/{owner}/{repo}/actions/runs/{runId}/rerun

Authentication: Bearer.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
runIdpathYesstringMinimum length: 1. Maximum length: 256.

Request body: required.

Content type: application/json.

JSON fieldRequiredType or allowed valuesConstraints
idempotency_keyYesstringMinimum length: 1. Maximum length: 256.
expected_versionNointegerMinimum: 0. Maximum: 9007199254740991.
grace_period_msNointegerMinimum: 0. Maximum: 300000.

Unknown fields are rejected.

ResponseMeaningSchema
200Rerun acceptedWorkflowRunMutationEnvelope
defaultStable API errorApiError

importRepositoryEnvironmentSecrets

POST /api/v1/repos/{owner}/{repo}/actions/environments/{environmentId}/secrets/imports

Authentication: Bearer.

Required credential scope: repo.admin. Resource permissions are still checked.

ParameterLocationRequiredType or allowed valuesConstraints
ownerpathYesstringMinimum length: 1. Maximum length: 100.
repopathYesstringMinimum length: 1. Maximum length: 100.
environmentIdpathYesstringMinimum length: 68. Maximum length: 68. Pattern: ^env_[0-9a-f]{64}$.
request_idqueryYesstringMinimum length: 1. Maximum length: 256. Pattern: ^[\x21-\x7E]{1,256}$.
reason_codequeryYesstringMinimum length: 1. Maximum length: 128. Pattern: ^[a-z0-9_.-]+$.
rotation_policyqueryYescreate_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.

ResponseMeaningSchema
201Secret bundle imported atomicallyEnvironmentSecretImport
409The request ID was already used with a different bundle, or create_only encountered a secret name that already existsApiError
defaultStable API errorApiError

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.

Next guideWebhooks →