Skip to main content
POST
Create a trigger

Authorizations

Authorization
string
header
required

API key with the vk_ prefix. Create one from the dashboard.

Path Parameters

env_id
string
required

Environment ID

Body

application/json
kind
string
required

cron or webhook.

prompt
string
required

The message each firing sends. {{payload}} = the webhook body as JSON (at most 16 KiB), {{.a.b}} = one field of it; missing fields render empty. Cron firings have no payload.

name
string | null

Display name, at most 64 characters.

cron
string | null

cron: a five-field POSIX cron expression (minute granularity; weekdays 0-6 = Sunday-Saturday) or an @nickname (@hourly, @daily, ...).

timezone
string | null

cron: IANA time zone the expression is read in (default UTC).

provider
string | null

webhook: github, gitlab or custom (Standard Webhooks; default).

session_mode
string | null

fresh (default): a new session per firing, ended when the run completes. reuse: wake reuse_session_id, send, pause it again.

reuse_session_id
string | null
budget_usd
number<double> | null

Spend ceiling per fresh session in USD (default 2.00).

output
null | object

Where results go besides trigger.execution.* webhooks (default none).

Response

The new trigger (with its secret, for a webhook trigger)

object
string
required
id
string
required
environment_id
string
required
kind
string
required

cron | webhook

session_mode
string
required

fresh | reuse

prompt
string
required
budget_usd
number<double>
required
output
object
required

Slack URLs are masked.

status
string
required

active | paused

consecutive_failures
integer<int32>
required
created_by
string
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
name
string | null
provider
string | null

webhook: github | gitlab | custom

cron
string | null
timezone
string | null
reuse_session_id
string | null
paused_reason
string | null

Why the trigger is paused, when it was not paused by hand (five consecutive failures, a deleted environment, ...).

next_fire_at
string<date-time> | null

cron: when it fires next (absent while paused).

webhook_url
string | null

webhook: the URL to give the provider.

secret
string | null

webhook: the signing secret. Returned ONLY by create and rotate-secret; store it then.

previous_secret_expires_at
string<date-time> | null

webhook: until when the previous secret still verifies (rotation grace).

last_execution
null | object