Skip to content

Deploy Hooks

Deploy hooks let you trigger a deployment from any external system, CircleCI, Jenkins, a shell script, or anything that can make an HTTP POST request. Authenticate with a personal access token (kbr_pat_). There is no unsigned deploy-hook URL.

POST to the deployments build API for a specific project, environment, and service. Store the same token as a CI secret in each provider if you trigger from more than one system.

terminal
# Queue a build: project / environment / service
curl -X POST "https://api.stackblaze.cloud/api/deployments/build/acme-app/production/api" \
-H "Authorization: Bearer $STACKBLAZE_TOKEN"
# Response
{
"status": "queued",
"deployment_id": "dep_9f3k2m...",
"message": "Deploy queued successfully"
}
# HTTP Status: 202 Accepted
.github/workflows/deploy.yml
name: Deploy to StackBlaze
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Run tests
run: npm test
- name: Deploy to StackBlaze
run: |
curl -X POST "https://api.stackblaze.cloud/api/deployments/build/acme-app/production/api" \
-H "Authorization: Bearer $STACKBLAZE_TOKEN"
env:
STACKBLAZE_TOKEN: ${{ secrets.STACKBLAZE_TOKEN }}
System How to trigger
CircleCI Trigger a StackBlaze deploy at the end of a successful CircleCI pipeline using a curl step.
Jenkins Add a post-build action in your Jenkinsfile to POST to the build API after tests pass.
Custom scripts Call the hook from any shell script, Makefile target, or deployment automation.
Zapier / n8n Wire up a Zapier webhook action or n8n HTTP Request node to deploy on any trigger.
GitHub Actions Use a curl step in a GitHub Actions workflow for fine-grained deploy control beyond auto-deploy.
Scheduled deploys Combine with a cron job (e.g. cron.org) to deploy your service on a schedule, refreshing data or config.
  1. Create an API token

    Create a personal access token in Settings → API tokens (prefix kbr_pat_). Store it as a CI secret. The token is scoped to your organization and RBAC — there is no separate unsigned deploy-hook URL.

  2. Store the token as a secret

    Treat the token like a password. Store it as an encrypted secret in your CI system (CircleCI environment variable, GitHub Actions secret, etc.) and never commit it to version control.

  3. POST a build

    POST https://api.stackblaze.cloud/api/deployments/build/{pipeline}/{phase}/{app} with Authorization: Bearer $STACKBLAZE_TOKEN. That queues a build for the named app. If the project already auto-deploys on git push, you can skip this and rely on the GitHub webhook.

  4. Monitor the deploy

    Watch the Deployments tab in the dashboard, or poll GET /api/deployments/{pipeline}/{phase}/{app} and GET /api/apps/{pipeline}/{phase}/{app}/status.