Automation
Create a deploy hook: POST its url (returned once) to deploy the given branch
Without branch (or with the production branch) the hook follows the production branch and redeploys production. Any other branch is deployed as that branch's preview (docs/PREVIEWS.md): the first call creates it within the preview limits, later calls redeploy it. A call to the url (POST /hooks/deploy/{hookId}/{secret}, no auth) answers {ok, target, branch, deploymentId, previewId?, previewUrl?}, or the preview error (402 limit_reached, 429 rate_limited, 501 not_configured) when the preview cannot be created.
post/projects/{projectId}/hooks
Request
- Base URL: https://hostingsurge.com/api/v1
- URL: https://hostingsurge.com/api/v1/projects/{projectId}/hooks
- Auth: one of:
- HTTP bearer
- API key in cookie __Host-hs_session
Path parameters
projectIdstring uuid required
Example:3f2b8a4e-5c1d-4e8f-9a7b-2c6d1e0f4a5b
Request body
Response
Created (url shown once)
Changes
No recorded changes to this operation across all 1 revision of this API.