Skip to navigation

Create notification rule

View as Markdown

Creates a rule that runs widget_id on a schedule and sends the result by email, Slack, or both.

  • cron: five fields, in IST, at most once an hour.
  • At least one of email_recipients or slack_webhook_url is required.
  • slack_webhook_url must start with https://hooks.slack.com/ and is never returned; check slack_configured.

Path parameters

org_idstringRequired
Organization ID
workspace_idstringRequired
Workspace ID
board_idstringRequiredformat: "uuid"

Board ID, as returned in id by Create board or List boards. Must be a UUID; anything else is rejected with 422.

Headers

X-API-KeystringRequired
Your workspace API key.

Request

This endpoint expects an object.
widget_idstringRequiredformat: "uuid"
Widget whose result is delivered on this schedule
cronstringRequired>=1 character

Five-field cron expression (minute hour day-of-month month day-of-week), evaluated in IST (Asia/Kolkata). It may not fire more than once an hour: * * * * * is rejected with 422.

namestring or nullOptional1-80 characters
Label for the rule
email_recipientslist of strings or nullOptional

Email addresses to deliver to. At least one of this or slack_webhook_url is required; sending neither is rejected with 422.

slack_webhook_urlstring or nullOptionalformat: "^https://hooks\.slack\.com/"

Slack incoming-webhook URL. Must start with https://hooks.slack.com/; any other URL is rejected with 422. Write-only: no endpoint ever returns it. Read slack_configured to tell whether one is set.

slack_channel_namestring or nullOptional<=80 characters
Display label for the Slack destination

Response

Successful Response
rule_idstringformat: "uuid"

Rule identifier, used as {rule_id} in nested routes

widget_idstringformat: "uuid"
Widget whose result this rule delivers
cronstring

Five-field cron expression, evaluated in IST (Asia/Kolkata)

enabledboolean
False while the schedule is paused
created_atdatetime
Creation time, UTC, RFC 3339
updated_atdatetime
Last change time, UTC, RFC 3339
namestring or nullOptional
Label for the rule, or null when unnamed
next_run_atdatetime or nullOptional
Next scheduled delivery, in UTC. Null while the rule is disabled.
email_recipientslist of strings or nullOptional
Configured email recipients
slack_channel_namestring or nullOptional
Slack destination label, when one is configured
slack_configuredbooleanOptionalDefaults to false
True when a Slack webhook is set. The URL itself is never returned.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error