palbaseDocs

Palbase ai · API

POST/ai/triggers

Create a trigger

Create a declarative cron, platform event, or HMAC-signed webhook trigger.

Called by your server, with the project's secret key.

Request body

namestring · required
kind"cron" | "event" | "webhook" · required
enabledboolean · optional
source_configobject · optional
target_configobject · required
dedupe_key_exprstring · optional
max_runs_hourinteger · optional
curl
curl -X POST "https://<your-ref>.palbase.studio/ai/triggers" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"name":"string","kind":"cron","target_config":{"kind":"workflow"}}'

Responses

201Trigger created

400The request is malformed, or names what this module does not offer (the error names which)

401No valid credential

403A publishable key or a user's session: everything here is the project's server's, called with the secret key

404No such response, job or provider in this project

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation CreateTrigger of ai's contract.