Connect git auto-deploy (any provider)
Connects a push webhook so every commit to the watched branch auto-redeploys (re-clone at the new HEAD → rebuild → restart in place). Works with any provider against one per-deployment secret. Two modes, chosen by whether you send a github_pat:
GitHub (one-click) — send github_pat: we validate the token, mint a fresh per-deployment secret, install the webhook on the repo via the GitHub API, then discard the PAT. The token needs Repository → Webhooks: Read and write scope (and nothing else): https://github.com/settings/personal-access-tokens/new
Any other provider (manual) — omit github_pat: we mint the secret and return payload_url + webhook_token (shown once, in the response). Add a push webhook in your repo to payload_url and send the token as the GitLab "Secret token", or as the X-Impreza-Token header / ?token=… query param (Bitbucket / Gitea / self-hosted / CI). No provider API is touched in this mode.
On push the receiver authenticates the payload against the secret — GitHub X-Hub-Signature-256 HMAC, GitLab X-Gitlab-Token, or the generic shared token. Returns 409 if a webhook is already connected — disconnect first to reconnect with a fresh secret.
Request
- Base URL: https://api.imprezahost.com/v1
- URL: https://api.imprezahost.com/v1/platform/deployments/custom/{id}/git-webhook/connect
- Auth: API key in header X-API-Key and API key in header X-API-Secret
Path parameters
Request body
Example request
{
"github_pat": "github_pat_11AAAA..."
}Response
Connected. GitHub mode installs the hook and returns its id; manual mode returns payload_url + webhook_token (shown once) to add in your provider.
Changes
No recorded changes to this operation across all 1 revision of this API.