Overview
- Endpoint:
POST https://app.periscope.sh/api/webhooks/deployments - Authentication: Bearer token (API key from Periscope settings)
- Format: JSON
- Idempotent: Duplicate
deploymentIdvalues update the existing record
Setup
Generate an API key
Go to Settings > Deployments in the Periscope dashboard and click Generate API Key. The key is scoped to your organization.
Store the key as a secret
Add the API key as a secret in your CI/CD system:
- GitHub Actions: Repository or organization secret
- Azure DevOps: Pipeline variable (secret)
- Jenkins: Credentials store
- GitLab CI: CI/CD variable (masked)
Add the webhook call to your pipeline
Add an HTTP POST after your deployment step completes. See the CI/CD examples below for platform-specific snippets.
Payload schema
Required fields
| Field | Type | Description |
|---|---|---|
deploymentId | string | Unique identifier from your CI/CD system (e.g., run ID). Used for idempotency. |
commitSha | string | The git commit SHA that was deployed. This is the key field — it links deployments to merged PRs for lead time calculation. Should be the full 40-character SHA. |
environment | string | Target environment: "production", "staging", "development", "preview", "test", or any custom value. |
status | string | Deployment status: "pending", "in_progress", "success", "failure", "cancelled", or "rolled_back". |
startedAt | string | ISO 8601 timestamp of when the deployment started. |
Optional fields
| Field | Type | Description |
|---|---|---|
organizationSlug | string | Your org slug. Optional — the org is resolved from the API key. If provided, it is validated as a safety check. |
completedAt | string | ISO 8601 timestamp. Required when status is "success", "failure", "cancelled", or "rolled_back". |
service | string | Name of the service being deployed. Periscope matches this to a repository by name. Used for per-service metrics and MTTR pairing. |
branch | string | The branch that was deployed. |
previousCommitSha | string | The commit SHA of the previous deployment to this environment. Enables Periscope to link all PRs merged between the two commits. |
triggeredBy | string | Who or what triggered the deployment (username, email, "automation", "schedule"). |
pipelineName | string | Name of the CI/CD pipeline or workflow. |
pipelineUrl | string | URL to view this deployment in your CI/CD system. Displayed in the dashboard for quick navigation. |
rawPayload | object | The original payload from your CI/CD system, stored for reference. |
metadata | object | Custom key-value pairs (string, number, or boolean values). Use for version numbers, feature flags, release notes, etc. |
The
commitSha field is the most important optional detail beyond the required fields. Without an accurate commit SHA, Periscope cannot link deployments to PRs, and lead time data will be empty.Example payloads
Minimal (required fields only)
Minimal (required fields only)
Complete (all fields)
Complete (all fields)
In-progress deployment
In-progress deployment
Failed deployment
Failed deployment
CI/CD examples
GitHub Actions
Azure DevOps
Generic curl
Validation rules
The webhook validates your payload before processing:deploymentId,commitSha,environment,status, andstartedAtare all required stringscommitShamust be 5-40 hexadecimal charactersstatusmust be one of:pending,in_progress,success,failure,cancelled,rolled_backstartedAtandcompletedAtmust be valid ISO 8601 datescompletedAtis required when status is a terminal state (success,failure,cancelled,rolled_back)
Idempotency
ThedeploymentId field is used for idempotency. If you send a payload with a deploymentId that already exists for your organization, Periscope updates the existing deployment record rather than creating a duplicate.
This is useful for:
- Sending an initial
in_progressevent, then updating withsuccessorfailurewhen the deployment completes - Safely retrying failed webhook calls without worrying about duplicates
PR linking
When a successful production deployment is processed, Periscope automatically links it to merged PRs using thecommitSha. If you also provide previousCommitSha, Periscope links all PRs merged between those two commits. This is what powers the lead time for changes metric.
Providing the service field improves PR matching accuracy by scoping the link to the correct repository.
Trial activation
If your organization is on the Free plan and sends its first deployment event, Periscope automatically starts a 14-day trial of Business features. This gives you access to all DORA metrics, the MCP server, and AI-powered risk signals during the trial period.Response format
Success (201 Created):API reference
See the full API reference for the deployment webhook endpoint.