Get Push-to-Deploy Webhook
For a git-sourced application, fetch the webhook URL and secret to register with your provider so every push to the configured branch auto-deploys. Available only for source: "git" apps.
Apps imported through the ngris GitHub App need no webhook: GitHub delivers their pushes to the app. For them via_app is true, secret is empty, and a push sent to the per-app url is acknowledged and ignored, so a hook added by hand never builds a commit twice.
Response (200 OK)
https://api.ngris.com/v1/webhooks/git/{uuid}.github or gitlab.branch are auto-deployed.true when the repo is connected through the ngris GitHub App — nothing to register; secret is empty.via_app is true and pushes are not deploying: the GitHub App was uninstalled, suspended, or removed from your account. Says how to fix it.Provider setup
url, Content type = application/json, Secret = secret, trigger = “Just the push event”.url, Secret token = secret, enable Push events.Errors
Regenerate Webhook Secret
Rotate the webhook signing secret. The old secret stops working immediately, so update it in your provider afterward or pushes will fail signature verification. Git applications only (source: "git"): any other app answers 404. Returns 409 for an app connected through the ngris GitHub App, which has no webhook secret.
Response (200 OK)
Errors
not a git application — the app is an upload app (or unknown).How delivery is verified
Providers call the public endpoint POST /v1/webhooks/git/{uuid} (no API key). Ngris verifies the signature — GitHub's X-Hub-Signature-256 (HMAC-SHA256 of the body) or GitLab's X-Gitlab-Token — against the app's secret, then deploys the pushed commit. That HMAC is the authentication; there is nothing for you to call there directly.
Update Git Settings
Change a git app's production branch, its push-to-deploy switch and its access token, or remove the token. Send only the fields you change: only those are written, and the others keep their stored values. The response is the settings as stored. The repository and the webhook stay as connected. To build the branch now, call redeploy.
Request body (application/json)
.., no leading -, none of ~ ^ : ? * [ \, …), at most 255 bytes, as on create.false: pushes deploy nothing until you turn it back on (redeploy still works).true removes the saved token (builds then fetch the repository without one). Not together with a new git_token.Response (200 OK)
Errors
branch is required (empty), branch name is too long, “That isn't a valid branch name. Enter it as it appears in your repository, like main or feature/login.” (not a valid git branch name), “Send a new git_token or git_token_remove, not both.”, or an invalid body.not a git application.git_token or git_token_remove for an app connected through the ngris GitHub App (it has no token), or the app is paused over a plan limit.