Skip to content
Serversinc Serversinc
Dashboard

Deploy triggers

Start a deployment from CI with a deploy key and secret.

A deploy trigger lets an external system deploy one application and nothing else. Use it instead of a personal API token in CI.

  1. Open the application and find its deployment trigger settings.
  2. Generate the trigger. Serversinc shows the deploy key and the secret.
  3. Copy the secret now. Serversinc stores only a hash and cannot show it again.
  4. Store the secret in the CI provider’s secret manager.
Terminal window
curl -X POST "https://api.serversinc.io/v1/applications/$DEPLOY_KEY/trigger" \
-H "X-Deploy-Secret: $DEPLOY_SECRET" \
-H "Accept: application/json"
ResponseMeaning
201Deployment created. The body contains the deployment object.
401Unknown deploy key, no secret set, or the secret does not match.

What the trigger deploys depends on the application source:

  • Docker image: the application’s default tag.
  • GitHub: a new build from the configured branch.

The trigger does not accept a tag or branch. To deploy a specific tag from CI, use an API token and POST /v1/deployments with application_id and tag. See API tokens and MCP server.

201 means the deployment was created, not that it completed. If CI must gate on the result, store the returned deployment ID and poll GET /v1/deployments/{id} with an API token until the status is completed, failed, rolled_back, or superseded.

Generating a new secret invalidates the old one immediately.

  1. Pause any pipeline that may deploy during rotation.
  2. Generate the new secret and update the CI secret.
  3. Run one deployment and confirm it appears under Deployments.