Deployments
Report deployments from CI/CD and see which deploy came before an incident.
Deployment tracking records when your application is deployed, what changed, and which incidents followed. This helps you find the deploy that introduced a bug.
Plans
Reporting deployments needs the Pro plan or higher. On Free the webhook answers 403, for a new deployment (POST) and for an update (PATCH) alike:
{
"error": {
"code": "PlanLimitExceeded",
"message": "Deployments need the Pro plan or higher.",
"status_code": 403,
"plan_limit": {"code": "feature", "limit": null, "current": null, "feature": "deployments", "upgrade_required": "pro", "upgrade_url": "https://incidion.dev/billing/?organization=<organization id>"}
}
}
Deployments reported before a downgrade stay visible on every plan.
Send deployment data
Your CI reports a deployment with the project’s secret key (sk_..., see API keys); the public pk_ key is refused with 401. The key needs the deployments:write scope; without it the answer is 403 with the error code insufficient_scope:
POST https://api.incidion.dev/api/v1/projects/{project_id}/deployments/webhook/
X-API-Key: sk_your_secret_key
Content-Type: application/json
Start a deployment
curl -X POST https://api.incidion.dev/api/v1/projects/$PROJECT_ID/deployments/webhook/ \
-H "X-API-Key: $INCIDION_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"version": "v1.2.3",
"status": "in_progress",
"environment_slug": "production",
"commit_hash": "4f9c2e1b7a3d5e6f8091a2b3c4d5e6f708192a3b",
"commit_message": "fix: retry payment webhooks",
"branch": "main",
"deployed_by_name": "octocat",
"run_url": "https://github.com/acme/api/actions/runs/123456789",
"repository_url": "https://github.com/acme/api"
}'
The answer is 201 with the deployment; keep its id for the update:
{
"id": "8d0f6a52-3c1e-4b7a-9f2d-1e5c7b9a0d34",
"version": "v1.2.3",
"status": "in_progress",
"environment_name": "Production",
"commit_url": "https://github.com/acme/api/commit/4f9c2e1b7a3d5e6f8091a2b3c4d5e6f708192a3b",
"compare_url": "https://github.com/acme/api/compare/0b1c2d3...4f9c2e1b7a3d5e6f8091a2b3c4d5e6f708192a3b",
"previous_deployment": {"id": "...", "version": "v1.2.2", "commit_hash": "0b1c2d3..."},
"incidents_after_count": 0,
"duration_seconds": null,
"started_at": "2026-10-05T12:00:00Z",
"finished_at": null
}
(Shortened; the full object is the same as in the deployment list below.)
Finish a deployment
curl -X PATCH https://api.incidion.dev/api/v1/projects/$PROJECT_ID/deployments/webhook/$DEPLOYMENT_ID/ \
-H "X-API-Key: $INCIDION_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"status": "success"}'
A PATCH may set status, error_message, build_steps, changes, run_url and finished_at. When the status becomes success, failed or rolled_back, finished_at is set to now unless you send it.
Unknown environment
An environment_slug that is not one of your organization’s environments is refused with 400, and no deployment is recorded:
{
"error": {
"code": "unknown_environment",
"message": "No environment with the slug 'prodd' exists in this organization. Create it under Environments or send one of its slugs.",
"status_code": 400
}
}
Leave environment_slug out to record a deployment without an environment.
Or use an SDK: see SDKs.
Deployment statuses
- in_progress: Deployment in progress
- success: Deployment completed successfully
- failed: Deployment failed (also use it for a cancelled run, with an
error_messagethat says so) - rolled_back: Deployment rolled back
Fields
| Field | Type | Description |
|---|---|---|
version |
string | Version tag or git SHA, up to 100 characters (required). A full commit SHA is shown shortened to 7 characters |
status |
string | in_progress (default), success, failed, rolled_back |
environment_slug |
string | Slug of one of your environments, e.g. production (or environment: the environment’s id). An unknown slug answers 400 unknown_environment; without one the deployment has no environment |
commit_hash |
string | Git commit SHA (up to 40 characters) |
commit_message |
string | Commit message |
branch |
string | Git branch name |
trigger |
string | ci (default), manual or rollback |
deployed_by_name |
string | Who deployed, e.g. the GitHub user |
error_message |
string | Why it failed |
build_steps |
array | Build steps or CI jobs: {name, status, started_at, finished_at, duration_seconds, url} |
changes |
array | Commits in the deployment: {hash, message, author, url} (or {type, message}) |
run_url |
string | Link to the CI run that deployed (http or https) |
repository_url |
string | Web URL of the repository; Incidion builds commit and compare links from it |
The webhook allows 3600 requests per hour per address, so shared CI runners are not throttled.
What Incidion shows
For every deployment Incidion works out:
- the previous deployment (
previous_deployment): the last successful one of the same project and environment that started before it; - a commit link (
commit_url) and a compare link (compare_url) from the previous commit to this one, for GitHub and GitLab style repositories and full or short hex commit hashes; - the incidents after it (
incidents_after_count): incidents of the project that opened in the 2 hours after the deploy started. The deployment’s detail also lists them (incidents_after, up to 20, each withminutes_after), withimpact_window_minutes(120); - the duration (
duration_seconds) once it finished, and the CI run (run_url).
GitHub Actions example
This is what Incidion’s own CI does: report the start, deploy, then report the result, also when the run fails or is cancelled. A rejected report (for example 403 on Free) shows as a warning and never fails the deploy.
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
env:
INCIDION_API_URL: https://api.incidion.dev
INCIDION_PROJECT_ID: ${{ secrets.INCIDION_PROJECT_ID }}
INCIDION_API_KEY: ${{ secrets.INCIDION_SECRET_KEY }}
steps:
- uses: actions/checkout@v4
- name: Track deployment start
id: track
continue-on-error: true
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
REPOSITORY_URL: ${{ github.server_url }}/${{ github.repository }}
run: |
PAYLOAD=$(jq -n \
--arg version "${GITHUB_SHA::7}" \
--arg commit_hash "$GITHUB_SHA" \
--arg commit_message "$COMMIT_MESSAGE" \
--arg branch "$GITHUB_REF_NAME" \
--arg deployed_by_name "$GITHUB_ACTOR" \
--arg run_url "$RUN_URL" \
--arg repository_url "$REPOSITORY_URL" \
'{version: $version, environment_slug: "production", status: "in_progress",
trigger: "ci", commit_hash: $commit_hash, commit_message: $commit_message,
branch: $branch, deployed_by_name: $deployed_by_name,
run_url: $run_url, repository_url: $repository_url}')
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
"$INCIDION_API_URL/api/v1/projects/$INCIDION_PROJECT_ID/deployments/webhook/" \
-H "X-API-Key: $INCIDION_API_KEY" \
-H "Content-Type: application/json" \
-d "$PAYLOAD")
HTTP_CODE=$(echo "$RESPONSE" | tail -1)
BODY=$(echo "$RESPONSE" | head -n -1)
if [ "$HTTP_CODE" = "201" ]; then
echo "deployment_id=$(echo "$BODY" | jq -r '.id')" >> "$GITHUB_OUTPUT"
else
REASON=$(echo "$BODY" | jq -r '.error.message // .error // empty' 2>/dev/null || true)
echo "::warning title=Deployment not tracked in Incidion::HTTP $HTTP_CODE: ${REASON:-no details}"
fi
- name: Deploy
run: ./deploy.sh
- name: Track deployment result
if: always() && steps.track.outputs.deployment_id != ''
continue-on-error: true
env:
DEPLOYMENT_ID: ${{ steps.track.outputs.deployment_id }}
JOB_STATUS: ${{ job.status }}
run: |
case "$JOB_STATUS" in
success) STATUS=success; ERROR="" ;;
cancelled) STATUS=failed; ERROR="Deploy was cancelled" ;;
*) STATUS=failed; ERROR="Deploy failed" ;;
esac
curl -s -X PATCH \
"$INCIDION_API_URL/api/v1/projects/$INCIDION_PROJECT_ID/deployments/webhook/$DEPLOYMENT_ID/" \
-H "X-API-Key: $INCIDION_API_KEY" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg s "$STATUS" --arg e "$ERROR" '{status: $s, error_message: $e}')"
The web dashboard has the same snippets for your project and environment (Observe > Deployments, set up CI).
View deployments
Open Deployments (app: Settings > Deployments; web dashboard: Observe > Deployments). The list shows each deployment with status, version, environment, duration and the incidents after it, plus the overall success rate and average duration. Open one to see the commit and compare links, the CI run, build steps, changes and the incidents that followed.
With the API (any project member):
curl "https://api.incidion.dev/api/v1/projects/$PROJECT_ID/deployments/?environment=production&status=failed&from=2026-10-01" \
-H "Authorization: Bearer $ACCESS_TOKEN"
Filters: status, environment (slug), from and to (ISO 8601, on the start time, both inclusive). GET .../deployments/{id}/ is the detail with incidents_after; GET .../deployments/stats/ returns total, success, failed, success_rate and avg_duration_seconds.
Activity
Each project’s Activity lists deployment.started when a deployment is reported, and deployment.succeeded, deployment.failed or deployment.rolled_back when it is reported with that status or changes to it (once per change, so a later PATCH that only adds details logs nothing new).
Correlating with incidents
An incident’s Context lists the deployments shortly before it started, and each deployment lists the incidents in the 2 hours after it. A deployment with incidents after it is the first place to look.
Tracking changes
Include the commits to see what changed:
{
"changes": [
{"hash": "4f9c2e1", "message": "feat: add ssl monitoring", "author": "octocat", "url": "https://github.com/acme/api/commit/4f9c2e1"},
{"type": "fix", "message": "resolve memory leak"}
]
}
Rollbacks
When you roll back, report the rollback as its own deployment with "trigger": "rollback", or set the broken deployment’s status to rolled_back. The timeline then shows deploy, incident and rollback in order.
API security
Deployment reports need the secret key (sk_...). Never expose it in logs or public configs; store it in your CI system’s secret manager (GitHub Actions secrets, GitLab CI variables, etc.). Regenerating the key (in API keys) stops the old one at once.