Skip to content

Deploy Hooks ​

Set up URLs that OneFive calls when your content changes so your storefront rebuilds automatically.

MethodPathDescription
GET/v1/store/deploy-hooksList deploy hooks
POST/v1/store/deploy-hooksCreate a deploy hook
GET/v1/store/deploy-hooks/{id}Get a deploy hook
PATCH/v1/store/deploy-hooks/{id}Update a deploy hook
DELETE/v1/store/deploy-hooks/{id}Delete a deploy hook
POST/v1/store/deploy-hooks/{id}/testTest a deploy hook

List deploy hooks

GET /v1/store/deploy-hooks

Returns a cursor-paginated list of deploy hooks configured for the store. Secrets are masked. Requires a secret key.

Query parameters

ParameterTypeDefaultDescription
limitinteger25
cursorstring-
fieldsstring-
orderstringdesc Values: asc, desc

Request

curl https://api.hydrajs.dev/v1/store/deploy-hooks \
  -H "Authorization: Bearer sk_YOUR_KEY"

Response 200

{
	"data": [],
	"pagination": {}
}

Get a deploy hook

GET /v1/store/deploy-hooks/{id}

Retrieves a deploy hook by ID including its trigger status and failure count. Secrets are masked. Requires a secret key.

Path parameters

ParameterTypeDescription
idstring

Query parameters

ParameterTypeDefaultDescription
fieldsstring-

Request

curl https://api.hydrajs.dev/v1/store/deploy-hooks/:id \
  -H "Authorization: Bearer sk_YOUR_KEY"

Response 200

{
	"data": {}
}

Create a deploy hook

POST /v1/store/deploy-hooks

Creates a deploy hook that triggers a storefront rebuild when the store is published. Supports GitHub Actions repository_dispatch and generic HTTP POST (Vercel, Netlify, Cloudflare Pages, custom). The secret is returned in full on creation only. Requires a secret key.

Request body

FieldTypeRequiredDescription
namestringYes
typestringYes Values: github_actions, http
urlstringYesFor github_actions: owner/repo. For http: a full HTTPS URL (e.g. Vercel, Netlify, or Cloudflare Pages deploy hook).
secretstringNoFor github_actions: a GitHub Personal Access Token with Actions write scope. For http: an optional Bearer token.
event_typestringNoGitHub Actions event_type for repository_dispatch. Defaults to "rebuild".
auto_pause_thresholdintegerNoAuto-pause after N consecutive failures. 0 disables auto-pause.

Request

curl -X POST https://api.hydrajs.dev/v1/store/deploy-hooks \
  -H "Authorization: Bearer sk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Main Storefront",
    "type": "github_actions",
    "url": "bg-git/BROOKSANDGRANT-QUANTUM-STOREFRONT"
  }'

Response 201

{
	"data": {}
}

Update a deploy hook

PATCH /v1/store/deploy-hooks/{id}

Partially updates a deploy hook. Setting status to "active" resets the consecutive failure counter. Requires a secret key.

Path parameters

ParameterTypeDescription
idstring

Request body

FieldTypeRequiredDescription
namestringNo
urlstringNo
secretstringNo
event_typestringNo
statusstringNo Values: active, paused
auto_pause_thresholdintegerNo

Request

curl -X PATCH https://api.hydrajs.dev/v1/store/deploy-hooks/:id \
  -H "Authorization: Bearer sk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Main Storefront",
    "url": "bg-git/BROOKSANDGRANT-QUANTUM-STOREFRONT",
    "secret": "string_value"
  }'

Response 200

{
	"data": {}
}

Delete a deploy hook

DELETE /v1/store/deploy-hooks/{id}

Permanently deletes a deploy hook. The hook will no longer trigger on publish. Requires a secret key.

Path parameters

ParameterTypeDescription
idstring

Request

curl -X DELETE https://api.hydrajs.dev/v1/store/deploy-hooks/:id \
  -H "Authorization: Bearer sk_YOUR_KEY"

Test a deploy hook

POST /v1/store/deploy-hooks/{id}/test

Triggers a single deploy hook immediately and returns the result. Useful for verifying the hook is configured correctly. Requires a secret key.

Path parameters

ParameterTypeDescription
idstring

Request

curl -X POST https://api.hydrajs.dev/v1/store/deploy-hooks/:id/test \
  -H "Authorization: Bearer sk_YOUR_KEY"

Response 200

{
	"data": {}
}