List undeployed commits for a project
Returns the commits between the most recently deployed revision in the default branch and the current HEAD of the configured branch. Use this to surface "what's about to deploy" in dashboards, scripts, or CI gates.
The commit list is capped at 100 entries. When the cap is hit, the response sets truncated: true. The count field always reflects the number of stored undeployed commits (which may be larger than the returned list when truncated).
Tip: You can explore and test this endpoint interactively using our OpenAPI documentation.
URL
/projects/:id/undeployed_changes
:id accepts either the project permalink or the project identifier.
HTTP Method
GET
Example cURL Request
curl -H "Content-type: application/json" \
-H "Accept: application/json" \
--user your-email@example.com:your-api-key \
https://www.deployhq.com/projects/my-app/undeployed_changes
Example Response
{
"count": 3,
"truncated": false,
"latest_deployed_revision": "96ab49d6b001e81dce763c9927e3ae4c23d2e902",
"current_revision": "9520494f24c62f1f01a8497540bdf49bfafac992",
"last_checked_at": "2026-05-27T07:41:15Z",
"check_in_progress": false,
"check_fail_message": null,
"commits": [
{
"ref": "9520494f24c62f1f01a8497540bdf49bfafac992",
"author": "Jane Doe",
"email": "jane@example.com",
"timestamp": "2026-05-27T07:40:00Z",
"message": "Update project title in README",
"short_message": "Update project title in README",
"url": "https://github.com/owner/repo/commit/9520494f24c62f1f01a8497540bdf49bfafac992"
}
]
}
Response Fields
- count - The number of undeployed commits between the last deployed revision and the current HEAD. May exceed
commits.lengthwhentruncatedis true. - truncated - True when the commit list was capped at 100 entries.
- latestdeployedrevision - The SHA of the last completed deployment to the default branch, or null when no deployment has completed yet.
- current_revision - The current HEAD of the configured branch in the remote repository, or null when the branch cannot be resolved.
- lastcheckedat - ISO 8601 timestamp of the last successful undeployed-changes check.
- checkinprogress - True when a check is currently running.
- checkfailmessage - The message from the last failed check, or null on success.
- commits - Array of commit objects (see below). Empty when there are no undeployed changes, when the project has no completed deployments yet, or when the local repository clone is stale (in which case the
countfield may still be accurate).
Commit object fields
- ref - Full commit SHA.
- author - Commit author display name.
- email - Commit author email.
- timestamp - ISO 8601 timestamp of when the commit was authored.
- message - Full commit message.
- short_message - First line of the commit message, suitable for inline display.
- url - Direct link to the commit on the upstream hosting service (GitHub, GitLab, Bitbucket, etc.), or null when the URL cannot be derived from the repository URL.
Error Responses
- 404 Not Found - The project does not exist or is not accessible to the authenticated user.
- 422 Unprocessable Entity - The project has no repository configured.
Notes
- This endpoint reads pre-computed state populated by the periodic undeployed-changes check. To force an immediate refresh, POST to
/projects/:id/check_for_undeployed_changesfirst and then poll this endpoint. - The endpoint considers only the default branch declared on the repository. Deployments to other branches are not reflected in the count.