API & Developers
Record deployments from CI/CD
Prepare a project token
In DeployMonitor, open Settings > API Tokens. Create a token for the target project and copy it immediately. Store the value as a masked secret in your CI/CD system, such as DEPLOYMONITOR_TOKEN.
If your workflow does not already know the project ID, retrieve it from GET /api/v1/project using the token.
Treat the token like a password. Do not commit it, print it in build logs, or include it in a deployment artifact.
Send a log after deployment
Create the project log only after the deployment completes and the deployed site passes its health check. This keeps the history focused on code that actually reached the monitored environment.
curl --fail-with-body \
--request POST \
"https://deploymonitor.com/api/v1/projects/${DEPLOYMONITOR_PROJECT_ID}/logs" \
--header "Authorization: Bearer ${DEPLOYMONITOR_TOKEN}" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data "{
\"change_type\": \"changed\",
\"title\": \"Production deployment completed\",
\"description\": \"Deployed the latest tested release to production.\",
\"metadata\": {
\"environment\": \"production\",
\"repository\": \"example/project\",
\"commit_sha\": \"${DEPLOYED_SHA}\"
},
\"fingerprint\": \"deploy:production:${DEPLOYED_SHA}\",
\"occurred_at\": \"${DEPLOYED_AT}\"
}"Set DEPLOYED_AT to an ISO 8601 timestamp, such as 2026-08-19T18:30:00Z.
Make retries safe
Use a stable fingerprint based on the environment and immutable release identifier. A fingerprint must be unique within a project, so retrying the same deployment request returns a validation error instead of creating a duplicate log.
Fingerprints can be reused in another project. This is useful when the same release is deployed to staging and production projects.
Keep logs readable
Use a short title and summarize the change for people who were not involved in the deployment. Put structured identifiers in metadata, and keep detailed diffs and file lists in the source-control system.
For all request fields and responses, see Create project logs with the API.