Trigger deployment
Trigger a new deployment for an application. By default, deploys the latest commit on the default branch. You can optionally specify a different branch, a specific commit, a Docker image, or restart from the last successful deployment. You can also rebuild without the build cache. The deployment runs asynchronously - use the get deployment endpoint to track its progress. Can return 400 with the reason when the repository or the branch of the application cannot be read.
Authorizations
Path Parameters
Body
Full 40 character SHA of the commit to deploy. When omitted, the latest commit on the branch is deployed. The commit must be reachable from branch (or the default branch when branch is omitted), otherwise the build fails at checkout. Its message and author are read from the repository; when they cannot be, the deployment records the SHA alone. Only applies to Git-based applications and cannot be combined with is_restart.
^[0-9a-f]{40}$"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2"
When true, every layer is rebuilt from scratch instead of being reused from the build cache. Use it to pick up updated system packages or dependencies that a cached build would keep. If the application has build cache enabled, the cache is refreshed with the new layers, so later builds do not fall back to the old ones. Only applies to Git-based applications and cannot be combined with is_restart.
Response
Default Response
Identifier of the application this deployment belongs to
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"fb5e5168-4281-4bec-94c5-0d1584e9e657"
Who started the deployment. USER - a member of your company, from the dashboard or the API. STAFF - the Sevalla team, for example to roll out a required security update. The reason is in note. AUTO_DEPLOY - started automatically by a Git push, a deploy hook, or a new preview app. SYSTEM - started by Sevalla itself.
USER, STAFF, SYSTEM, AUTO_DEPLOY "USER"
Ordered list of pipeline steps this deployment will execute. checkout - clone the repository. build - build the application image. rollout - deploy the image to the cluster. syncConnections - synchronize database and service connections.
checkout, build, rollout, syncConnections Timestamp when the deployment started executing, in ISO 8601 format. Null if still waiting.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$"2025-01-30T00:00:00.000Z"
Timestamp when the deployment finished (succeeded, failed, or was cancelled), in ISO 8601 format. Null if still in progress.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$"2025-01-30T00:05:00.000Z"
Timestamp when the deployment was created, in ISO 8601 format
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$"2025-01-30T00:00:00.000Z"
Timestamp when the deployment was last modified, in ISO 8601 format
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$"2025-01-30T00:00:00.000Z"
Identifier of the Dockerfile the deployment's image was built from. Set for applications built with ingot or dockerfile once the deployment finishes, so a deployment that is still building returns null. Rollbacks, restarts and promotions point at the Dockerfile of the image they reuse from the start. Null for other build types, for Docker image applications, and for a build that failed before its Dockerfile could be read.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"fb5e5168-4281-4bec-94c5-0d1584e9e657"