Skip to main content
The Starhost Deployments API lets you automate your entire site publishing workflow without touching the dashboard. You can trigger new deployments for a site, poll their status until they are live, and roll back to a previously published deployment if something goes wrong. All three operations are available as simple REST endpoints. This page covers the following endpoints:
  • POST /starhost/deployments — Create a new deployment
  • GET /starhost/deployments/{id} — Get deployment status
  • POST /starhost/deployments/{id}/rollback — Roll back to a previous deployment

Create a deployment

Trigger a new deployment for one of your Starhost sites. You can optionally provide a source_url pointing to an archive of files that Starhost should fetch and deploy, or omit it to redeploy the site’s most recently uploaded content. Endpoint

Request parameters

string
required
The unique identifier of the Starhost site you want to deploy. You can find this in the Verbosec Cloud dashboard under your site’s settings.
string
A publicly accessible URL pointing to a .zip or .tar.gz archive of the site files to deploy. If omitted, Starhost redeploys the site’s most recent content.
string
The target environment for this deployment. Accepted values are "production" and "preview". Defaults to "production". Use "preview" to test changes before going live.

Example request

create-deployment.sh

Example response

create-deployment-response.json

Get deployment status

Retrieve the current status of a specific deployment. Poll this endpoint to track a deployment’s progress from pending through to published or failed. Endpoint

Path parameters

string
required
The unique identifier of the deployment, returned when you created it.

Example request

get-deployment.sh

Example response

get-deployment-response.json

Deployment status values


Roll back a deployment

Revert a site to the state of a previous successful deployment. This is useful when a newly published deployment introduces unexpected issues and you need to restore the last known good version quickly. Endpoint

Path parameters

string
required
The unique identifier of the deployment you want to roll back to. This should be the ID of the previously published deployment you want to restore.

Example request

rollback-deployment.sh

Example response

rollback-response.json

Error responses

Returned when a required body parameter such as site_id is missing from a create deployment request.
400-response.json
Returned when the deployment id in the path does not match a deployment on your account.
404-response.json
Returned when your API key is missing or invalid. See the Authentication guide for help.
401-response.json