Skip to main content
POST
Trigger deployment

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token in the Authorization header.

Path Parameters

id
string<uuid>
required

Application identifier

Pattern: ^([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)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

Body

application/json
branch
string

Git branch to deploy. When omitted, the application default branch is used. Only applies to Git-based applications.

Example:

"main"

commit_sha
string

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.

Pattern: ^[0-9a-f]{40}$
Example:

"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2"

docker_image
string

Docker image reference to deploy, such as nginx:latest. Must be a valid image reference: no spaces, quotes or uppercase letters in the repository name. Only applies to applications with dockerImage source.

Maximum string length: 512
Example:

"nginx:latest"

is_restart
boolean
default:false

When true, redeploys using the existing build artifact from the last successful deployment, skipping the build step. Useful when you have updated runtime-level configuration and do not need to rebuild the application.

skip_build_cache
boolean
default:false

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

id
string<uuid>
required

Unique identifier for the deployment

Pattern: ^([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)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

app_id
string<uuid> | null
required

Identifier of the application this deployment belongs to

Pattern: ^([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)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

status
enum<string> | null
required

Current status of the deployment in its lifecycle

Available options:
waiting,
inProgress,
success,
failed,
cancelled,
skipped
Example:

"success"

type
enum<string> | null
required

How the deployment was initiated. manual - triggered by a user or API call. automatic - triggered automatically by a git push or webhook.

Available options:
manual,
automatic
Example:

"manual"

trigger
string | null
required

Specific action that initiated the deployment, such as MANUAL_DEPLOY, ROLLBACK_DEPLOYMENT, AUTO_DEPLOY_ON_PUSH, or RESTART

Example:

"MANUAL_DEPLOY"

initiator_type
enum<string>
required

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.

Available options:
USER,
STAFF,
SYSTEM,
AUTO_DEPLOY
Example:

"USER"

note
string | null
required

Why the Sevalla team started this deployment, for example Required security update. Only set when initiator_type is STAFF, otherwise null.

Example:

"Required security update"

steps
enum<string>[]
required

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.

Available options:
checkout,
build,
rollout,
syncConnections
Example:
docker_image_url
string | null
required

Full URL of the Docker image built or used for this deployment, including the registry path and tag

Example:

"us-central1-docker.pkg.dev/project/repo/image:abc123"

git_type
enum<string> | null
required

Git hosting provider for the source repository. github - GitHub. bitbucket - Bitbucket. gitlab - GitLab. Null for Docker image deployments.

Available options:
github,
bitbucket,
gitlab
Example:

"github"

repo_url
string | null
required

Full URL of the Git repository used for this deployment. Null for Docker image deployments.

Example:

"https://github.com/user/repo"

branch
string | null
required

Git branch that was deployed. Null for Docker image deployments.

Example:

"main"

commit_sha
string | null
required

Full SHA hash of the Git commit that was deployed

Example:

"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2"

commit_message
string | null
required

Commit message of the deployed Git commit, truncated to 1000 characters

Example:

"feat: add new feature"

author_login
string | null
required

Username of the Git commit author on the hosting provider

Example:

"octocat"

author_img
string | null
required

Avatar URL of the Git commit author on the hosting provider

Example:

"https://avatars.githubusercontent.com/u/583231"

started_at
string<date-time> | null
required

Timestamp when the deployment started executing, in ISO 8601 format. Null if still waiting.

Pattern: ^(?:(?:\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))$
Example:

"2025-01-30T00:00:00.000Z"

finished_at
string<date-time> | null
required

Timestamp when the deployment finished (succeeded, failed, or was cancelled), in ISO 8601 format. Null if still in progress.

Pattern: ^(?:(?:\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))$
Example:

"2025-01-30T00:05:00.000Z"

created_at
string<date-time>
required

Timestamp when the deployment was created, in ISO 8601 format

Pattern: ^(?:(?:\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))$
Example:

"2025-01-30T00:00:00.000Z"

updated_at
string<date-time>
required

Timestamp when the deployment was last modified, in ISO 8601 format

Pattern: ^(?:(?:\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))$
Example:

"2025-01-30T00:00:00.000Z"

dockerfile_id
string<uuid> | null
required

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.

Pattern: ^([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)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"