Skip to content

Deploy hooks API

Starts a deployment of the site the token belongs to. No Authorization header: the unguessable token in the URL is the credential. Create or regenerate the URL under the site’s Settings → Deploy (permission deployments.manage).

Parameter Meaning
falak_deploy_branch Branch to deploy (default: the site’s branch)
falak_deploy_commit Exact commit SHA, 7–64 hex characters
falak_deploy_author Author shown in the UI and exported as FALAK_COMMIT_AUTHOR
falak_deploy_message Message shown in the UI and exported as FALAK_COMMIT_MESSAGE

Every other query parameter becomes FALAK_VAR_<NAME> in the deploy script environment: the name is upper-cased and non-alphanumeric characters become _. At most 50 variables, each up to 4 KiB. They are stored encrypted with the deployment.

Terminal window
curl -X POST "https://falak.example.com/api/deploy/$TOKEN?falak_deploy_branch=main&notify=ops-channel"
# deploy script: FALAK_VAR_NOTIFY=ops-channel
202 Accepted
{"data": {"id": "01k…", "status": "building", "number": 43, "url": "https://falak.example.com/sites/01k…/deployments/01k…"}}
Status Meaning
202 Deployment created, or merged into the site’s waiting deployment
404 Unknown or rotated token
422 Invalid commit
429 More than 30 requests per minute

The trigger is hook in the API and api in FALAK_TRIGGER.

See Push-to-deploy and deploy hooks for usage.