Automations

Create an automation

Changed on

Create an automation: a project script run on a cron schedule or by its webhook (see scripts.create).

post/automations

Request

  • Base URL: https://api.sazabi.com/v1
  • URL: https://api.sazabi.com/v1/automations
  • Auth: none declared

Request body

projectIdstring uuid

Project to create the automation in. Auto-filled from CLI and SDK context when omitted.

namestring required

Automation name.

descriptionstring nullable

Human-readable description. At most 2,000 characters.

scriptIdstring uuid

Project script to run, by ID. Provide exactly one of scriptId or script.

scriptstring

Project script to run, by name (resolved to scriptId server-side). Provide exactly one of scriptId or script.

trigger'schedule' | 'webhook'

What starts a script automation's runs: its cron schedule (the default) or a delivery to its webhook. A webhook automation takes no cronExpression or timezone, and its creation returns the webhook's signing secret once.

cronExpressionstring

Cron schedule for the automation. Defaults to every minute when omitted.

timezonestring

IANA timezone for cronExpression. Defaults to UTC.

timeoutSecondsinteger

Execution timeout in seconds. Defaults to 60.

enabledboolean

Whether the automation starts enabled. Defaults to true.

Response

OK

webhookSecretstring

The new webhook automation's signing secret, returned only here. Store it now: it is never shown again, and rotating it issues a new one.

Changes

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • warning

      removed the request property

    • info

      removed the log_match enum value from the / response property for the response status

    • info

      removed the signal enum value from the / response property for the response status

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status