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.
Create the trigger
Section titled “Create the trigger”- Open the application and find its deployment trigger settings.
- Generate the trigger. Serversinc shows the deploy key and the secret.
- Copy the secret now. Serversinc stores only a hash and cannot show it again.
- Store the secret in the CI provider’s secret manager.
Send the request
Section titled “Send the request”curl -X POST "https://api.serversinc.io/v1/applications/$DEPLOY_KEY/trigger" \ -H "X-Deploy-Secret: $DEPLOY_SECRET" \ -H "Accept: application/json"| Response | Meaning |
|---|---|
201 | Deployment created. The body contains the deployment object. |
401 | Unknown 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.
Rotate the secret
Section titled “Rotate the secret”Generating a new secret invalidates the old one immediately.
- Pause any pipeline that may deploy during rotation.
- Generate the new secret and update the CI secret.
- Run one deployment and confirm it appears under Deployments.