Docs
/
/

Create schedules

Creates one or more schedules for a workflow with the specified recipients, timing, and data. Schedules can be one-time or recurring. This endpoint also handles [inline identifications](/managing-recipients/identifying-recipients#inline-identifying-recipients) for the `actor`, `recipient`, and `tenant` fields.

Create schedules

Creates one or more schedules for a workflow with the specified recipients, timing, and data. Schedules can be one-time or recurring. This endpoint also handles inline identifications for the actor, recipient, and tenant fields.

Endpoint

POST/v1/schedules

Rate limit

Tier 3

Request body

A map of properties describing a user or an object to identify in Knock and mark as who or what performed the action.

data
object(any)

An optional map of data to pass into the workflow execution. There is a 10MB limit on the size of the full data payload. Any individual string value greater than 1024 bytes in length will be truncated in your logs.

ending_at
string(date-time)

The ending date and time for the schedule.

recipientsRequired

The recipients to set the schedule for. Limited to 100 recipients per request.

The repeat rule for the schedule.

__typename
string

The typename of the schema.

day_of_month
integer

The day of the month to repeat the schedule.

days
enum(string)[]

The days of the week to repeat the schedule.

montuewedthufrisatsun
frequency
enum(string)
Required

The frequency of the schedule.

dailyweeklymonthlyhourly
hours
integer

The hour of the day to repeat the schedule.

interval
integer

The interval of the schedule.

minutes
integer

The minute of the hour to repeat the schedule.

scheduled_at
string(date-time)

The starting date and time for the schedule.

The tenant to trigger the workflow for. Triggering with a tenant will use any tenant-level overrides associated with the tenant object, and all messages produced from workflow runs will be tagged with the tenant.

workflow
string
Required

The key of the workflow.

Returns

SchedulesResponse

A list of schedules.

New chat