Skip to content

Git

GitHub connection, builds and branch previews.

On this page

Concepts: Git and CI

Endpoint summaries come from the OpenAPI document.

GET/v1/projects/{project}/git

Git connection and settings: GitHub repository, production branch, automatic deploys and the direct push address

Operation (MCP tool)
getProjectGit
Authentication
API key (pfa_…)OAuth token (pfo_…)

Parameters

Parameters
NameInTypeDescription
projectRequiredpathstring

Responses

Responses
StatusDescriptionBody
200OKGitSettings
401ProblemProblem (RFC 9457)
403ProblemProblem (RFC 9457)
404ProblemProblem (RFC 9457)

Related error codes

Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.

PUT/v1/projects/{project}/git

Connect a GitHub repository (from the team's installations) or change branch settings. Turning on automatic production deploys needs versions.promote

Operation (MCP tool)
setProjectGit
Authentication
API key (pfa_…)OAuth token (pfo_…)

Parameters

Parameters
NameInTypeDescription
projectRequiredpathstring

Request body

application/jsonobjectRequired

Request body
NameTypeDescription
repositoryOptionalstring
installationOptionalinteger
productionBranchOptionalstring
autoDeployProductionOptionalboolean
autoDeployPreviewsOptionalboolean

Responses

Responses
StatusDescriptionBody
200OKGitSettings
400ProblemProblem (RFC 9457)
401ProblemProblem (RFC 9457)
403ProblemProblem (RFC 9457)
404ProblemProblem (RFC 9457)
503ProblemProblem (RFC 9457)

DELETE/v1/projects/{project}/git

Disconnect the GitHub repository; versions and branch previews stay

Operation (MCP tool)
disconnectProjectGit
Authentication
API key (pfa_…)OAuth token (pfo_…)

Parameters

Parameters
NameInTypeDescription
projectRequiredpathstring

Responses

Responses
StatusDescriptionBody
204DisconnectedNo content
401ProblemProblem (RFC 9457)
403ProblemProblem (RFC 9457)
404ProblemProblem (RFC 9457)

Related error codes

Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.

GET/v1/projects/{project}/git/builds

The last 50 Git builds

Operation (MCP tool)
listGitBuilds
Authentication
API key (pfa_…)OAuth token (pfo_…)

Parameters

Parameters
NameInTypeDescription
projectRequiredpathstring

Responses

Responses
StatusDescriptionBody
200OKobject
401ProblemProblem (RFC 9457)
403ProblemProblem (RFC 9457)
404ProblemProblem (RFC 9457)

Related error codes

Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.

POST/v1/projects/{project}/git/builds/{build}/approve

Approve a pull request build from a fork; it gets the project's environment variables

Operation (MCP tool)
approveGitBuild
Authentication
API key (pfa_…)OAuth token (pfo_…)

Parameters

Parameters
NameInTypeDescription
projectRequiredpathstring
buildRequiredpathstring

Responses

Responses
StatusDescriptionBody
200OKGitBuild
401ProblemProblem (RFC 9457)
403ProblemProblem (RFC 9457)
404ProblemProblem (RFC 9457)
409ProblemProblem (RFC 9457)

Related error codes

Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.

GET/v1/projects/{project}/branches

Branch preview addresses and the version each one serves

Operation (MCP tool)
listProjectBranches
Authentication
API key (pfa_…)OAuth token (pfo_…)

Parameters

Parameters
NameInTypeDescription
projectRequiredpathstring

Responses

Responses
StatusDescriptionBody
200OKobject
401ProblemProblem (RFC 9457)
403ProblemProblem (RFC 9457)
404ProblemProblem (RFC 9457)

Related error codes

Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.