Skip to main content
POST
/
static-sites
/
{id}
/
deployments
Deploy static site
curl --request POST \
  --url https://api.sevalla.com/v3/static-sites/{id}/deployments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "branch": "<string>",
  "deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "id": "fb5e5168-4281-4bec-94c5-0d1584e9e657",
  "static_site_id": "fb5e5168-4281-4bec-94c5-0d1584e9e657",
  "status": "success",
  "type": "manual",
  "repo_url": "https://github.com/user/static-site",
  "branch": "main",
  "is_preview": false,
  "author_login": "octocat",
  "author_img": "https://avatars.githubusercontent.com/u/1234",
  "commit_sha": "abc123def456",
  "commit_message": "Update landing page",
  "cloud_build_id": "fb5e5168-4281-4bec-94c5-0d1584e9e657",
  "build_error": "Build failed: exit code 1",
  "created_at": "2025-01-30T00:00:00.000Z",
  "updated_at": "2025-01-30T00:00:00.000Z",
  "finished_at": "2025-01-30T00:00:00.000Z",
  "started_at": "2025-01-30T00:00:00.000Z"
}

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

Static site 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 static site default branch is used.

deployment_id
string<uuid>

Identifier of a previous deployment to roll back to. When provided, the branch field is ignored.

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)$

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"

static_site_id
string<uuid>
required

Identifier of the static site 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. waiting - queued for processing. inProgress - build or publish is running. success - deployed successfully. failed - deployment failed. cancelled - cancelled before completion.

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

"success"

type
enum<string> | null
required

How the deployment was triggered. manual - triggered via API or dashboard. autoDeploy - triggered by a Git push. rollback - redeployment of a previous build. preview - preview deployment for a pull request.

Available options:
manual,
autoDeploy,
rollback,
preview
Example:

"manual"

repo_url
string | null
required

Full URL of the Git repository used for this deployment

Example:

"https://github.com/user/static-site"

branch
string | null
required

Git branch deployed

Example:

"main"

is_preview
boolean | null
required

Whether this is a preview deployment for a pull request

Example:

false

author_login
string | null
required

Git username of the commit author

Example:

"octocat"

author_img
string | null
required

Avatar URL of the commit author

Example:

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

commit_sha
string | null
required

Full SHA of the deployed commit

Example:

"abc123def456"

commit_message
string | null
required

Commit message of the deployed commit

Example:

"Update landing page"

cloud_build_id
string | null
required

Identifier of the cloud build job for this deployment

Example:

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

build_error
string | null
required

Error message from the build step if the deployment failed

Example:

"Build failed: exit code 1"

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"

finished_at
string<date-time> | null
required

Timestamp when the deployment finished, 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"

started_at
string<date-time> | null
required

Timestamp when the deployment started building, 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"