sites

Connect Repository

Attach a GitHub repository to the site and trigger an initial deploy. The site's account must already have a bearer token stored — call POST /sites/{site_id}/git/token first if it does not.

post/sites/{site_id}/git

Request

Path parameters

site_idinteger required

Request body

repositorystring
branchstring
destination_pathstring
repository_subdirectorystring

Response

Successful Response

messagestring
dataobject

Example response

{
  "message": "Created",
  "data": {
    "repository": "https://github.com/example/site.git",
    "branch": "main",
    "destinationPath": "wp-content",
    "repositorySubdirectory": "wp-content",
    "connected": true,
    "hasToken": true
  }
}

Changes

No recorded changes to this operation across all 2 revisions of this API.