Skip to main content
PUT
Update Git repository

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

organization
string
required

The organization slug

server
integer
required

The server ID

site
integer
required

The site ID

Body

application/json
source_control_provider
enum<string>
required

The source control provider the site should deploy from.

Available options:
github,
gitlab,
bitbucket,
gitlab-custom,
custom
Example:

"github"

repository
string
required

The repository to deploy, e.g. "organization/repository" (or an SSH URL for custom Git).

Example:

"laravel/forge"

branch
string
required

The branch to deploy.

Example:

"main"

source_control_provider_id
integer

The ID of the source control connection to deploy through. Required when the organization has more than one connection for the selected provider; otherwise optional (a single connection is resolved automatically, and custom Git needs none).

per_account_public_key
string

An existing, provider-verified deploy public key to pin to the site instead of generating a new one. Must be sent together with per_account_private_key.

per_account_private_key
string

The private key matching per_account_public_key. Must be sent together with it.

Response

SiteResource

data
SiteResource · object
required
included
(ServerResource · object | TagResource · object | DeploymentResource · object | SecurityRuleResource · object | RedirectRuleResource · object)[]