Create a trigger

Creates a trigger for a Function visible on the branch. The required
type discriminator selects the trigger-specific configuration. The
supported types are schedule and storage_object_created. A schedule
trigger uses a numeric five-field cron expression interpreted in UTC. A
storage-object-created trigger fires only after a successful upload to
one exact bucket and may narrow matches to an object-key prefix.

The name must be unique among triggers visible on the branch, including
inherited triggers.

Note: This endpoint is currently in Beta.

Path Params
string
required
^[a-z0-9-]{1,60}$

The Neon project ID

string
required
^[a-z0-9-]{1,60}$

The Neon branch ID

Body Params
string
enum
required

Trigger type discriminator.

Allowed:
string
required
^[a-z0-9]{1,20}$

The branch-local Function slug to invoke.

string
required
length between 1 and 256

Human-readable name, unique among triggers visible on the branch.

string
length between 1 and 2048
Defaults to /

Path passed to the target Function. Defaults to /.

schedule
object
required

A numeric five-field cron schedule interpreted in UTC.

boolean
Defaults to true

Whether future occurrences should be scheduled.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json