Deployments
Deployments represent the process of building and deploying your projects to servers. Each deployment contains information about the build status, logs, and timing. On this page, we will dive into the different deployment endpoints you can use to manage deployments programmatically.
Create deployment
This endpoint allows you to trigger deployments for multiple projects at once. This is useful for deploying related projects simultaneously. You can also trigger a deployment for a single project.
Attributes for creating a deployment
- Name
project_ids- Type
- array
- Description
- An array of project IDs to deploy. Example: [1, 2, 3].
Request
curl https://app.depfloy.com/api/v1/deployments \
-H "Authorization: Bearer {API_KEY}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"project_ids": [1, 2, 3]
}'
Response
{
"message": "Deployment queued successfully.",
"status": "success"
}
List project deployments
This endpoint allows you to retrieve a paginated list of all deployments for a specific project.
Optional attributes
- Name
per_page- Type
- integer
- Description
Limit the number of deployments returned per page. Default is 15.
- Name
page- Type
- integer
- Description
The page number to retrieve.
Request
curl -G https://app.depfloy.com/api/v1/projects/1/deployments \
-H "Authorization: Bearer {API_KEY}" \
-H "Accept: application/json"
Response
{
"current_page": 1,
"data": [
{
"id": 5,
"tenant_id": 1,
"project_id": 1,
"initiated_by": 1,
"git_branch": "master",
"commit_id": null,
"commit_url": null,
"description": "Deployment started from API",
"status": 0,
"duration": 0,
"created_at": "2026-01-17T13:55:31.000000Z",
"updated_at": "2026-01-17T13:55:31.000000Z"
},
{
"id": 1,
"tenant_id": 1,
"project_id": 1,
"initiated_by": 1,
"git_branch": "master",
"commit_id": null,
"commit_url": null,
"description": "Deployment started by Maggy",
"status": 1,
"duration": 100,
"created_at": "2025-05-26T06:59:26.000000Z",
"updated_at": "2025-05-26T10:29:20.000000Z"
}
],
"per_page": 10,
"total_items": 2,
"total_pages": 1
}
Retrieve a deployment
This endpoint allows you to retrieve a specific deployment by its ID. This includes the full build log.
Request
curl https://app.depfloy.com/api/v1/deployments/5334 \
-H "Authorization: Bearer {API_KEY}" \
-H "Accept: application/json"
Response
{
"id": 1,
"project_id": 1,
"initiated_by": 1,
"git_branch": "master",
"commit_id": null,
"commit_url": null,
"description": "Deployment started by Maggy",
"status": 1,
"duration": 100,
"created_at": "2025-05-26T06:59:26.000000Z",
"updated_at": "2025-05-26T10:29:20.000000Z",
"output": {
"process_type": "build",
"client_payload": [
// ... client payload
"✓ 1 asset moved from React Router server build to client assets.",
"✓ built in 23.73s\n",
"07:01:09 - ✓ Deployment completed."
],
"system_payload": [
// ... system payload
]
}
}
Rerun a deployment
Queue a new deployment that targets the same commit as a previous one. Useful when a deployment failed because of a transient cause (a flaky test, a registry timeout, a one-off environment glitch) and you want to retry the exact same code.
Only failed deployments can be rerun. The new deployment is a separate record — your history grows by one entry rather than overwriting the failed deployment.
Request
curl -X POST https://app.depfloy.com/api/v1/deployments/5334/rerun \
-H "Authorization: Bearer {API_KEY}" \
-H "Accept: application/json"
Response
{
"status": "success",
"message": "Rerun queued.",
"deployment_id": 5340
}
List rollback candidates
Return the previous successful deployments you can roll back to. Each entry has a commit ID and is not the currently active deployment.
Request
curl https://app.depfloy.com/api/v1/projects/14532/rollback-candidates \
-H "Authorization: Bearer {API_KEY}" \
-H "Accept: application/json"
Response
[
{
"id": 5212,
"commit_id": "abc1234",
"git_branch": "main",
"description": "Deployment started by Maggy",
"created_at": "2026-05-08T08:14:00.000000Z"
}
]
Rollback to a deployment
Roll back to a previous successful deployment. Depfloy queues a new deployment that targets the same commit as the chosen deployment — your history is preserved; the rollback appears as a new deployment.
The target deployment must be in Success status, have a recorded commit ID, and not be the currently active deployment. Use List rollback candidates to find eligible deployments.
Request
curl -X POST https://app.depfloy.com/api/v1/deployments/5212/rollback \
-H "Authorization: Bearer {API_KEY}" \
-H "Accept: application/json"
Response
{
"status": "success",
"message": "Rollback queued.",
"deployment_id": 5341
}