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.
Response (200 OK)
url string
The payload URL to add to GitHub/GitLab.
secret string
The signing secret. Ngris verifies every delivery's signature against it.
provider string
github or gitlab.branch string
The branch that triggers a deploy.
auto_deploy boolean
Whether pushes are auto-deployed.
Provider setup
GitHub
Repo → Settings → Webhooks → Add webhook. Payload URL =
url, Content type = application/json, Secret = secret, trigger = “Just the push event”.GitLab
Settings → Webhooks. URL =
url, Secret token = secret, enable Push events.Errors
404 Not Found
Not a git application.
Request
curl "https://api.ngris.com/v1/applications/a1b2c3d4-…/webhook" \
-H "X-API-KEY: <your_api_key>"
Response — 200 OK
{
"url": "https://api.ngris.com/api/webhooks/git/a1b2c3d4-…",
"secret": "b7f3…",
"provider": "github",
"branch": "main",
"auto_deploy": true
}
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.
Response (200 OK)
url string
The (unchanged) payload URL.
secret string
The new signing secret.
How delivery is verified
Providers call the public endpoint POST /api/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.
Request
curl -X POST \
"https://api.ngris.com/v1/applications/a1b2c3d4-…/webhook/regenerate" \
-H "X-API-KEY: <your_api_key>"
Response — 200 OK
{
"url": "https://api.ngris.com/api/webhooks/git/a1b2c3d4-…",
"secret": "9d21…"
}