Deployments

Builds and publishes the site to production. Asynchronous: responds 202 with a pending deployment; poll GET /sites/{id}/deployments for the outcome (live or failed).

Without a body it ships the site's working copy as Crevio's agent left it. After writing a commit yourself with POST /sites/{id}/source/commits, pass its sha as commit_sha: that exact commit is fetched and built, and the deploy fails rather than ship anything else.

If a deploy is already in flight, that one is returned instead of starting a second build — still 202. A build this call started is pending with a null started_at; one already running is building. Compare the returned commit_sha with yours: if it differs, wait for that deploy to finish and deploy again.

post/sites/{id}/deploy

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Path parameters

id, string required

The resource's ID, as returned in its id field

Headers

Idempotency-Key, string

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Request body

object required
commit_sha, string

A commit on the site's main to deploy, usually the sha POST /sites/{id}/source/commits returned. Omit to ship the working copy.

Response

The queued deployment

Deployment required
id, string required
object, string required
site, string required
status, 'pending' | 'building' | 'live' | 'failed' | 'superseded' | 'unpublished' required
commit_sha, string nullable required
is_live, boolean required
url, string nullable required
triggered_by, string nullable required
error_message, string nullable required
db_bookmark, string nullable required
current_stage, string nullable required
stages, unknown[] required
duration_seconds, number nullable required
elapsed_seconds, number nullable required
started_at, string nullable required
finished_at, string nullable required
created_at, string required

Changes

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    1 more change in this revision