---
title: "Create schedules"
method: POST
path: "/v1/schedules"
tags: ["Schedules"]
---

# Create schedules

`POST /v1/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.

## Request body

- CreateSchedulesRequest — A request to create a schedule.
  - `actor` union — A map of properties describing a user or an object to identify in Knock and mark as who or what performed the action.
    - string — The ID of the user which is used as the reference for the recipient.
    - InlineIdentifyUserRequest — A set of parameters to inline-identify a user with. Inline identifying the user will ensure that the user is available before the request is executed in Knock. It will perform an upsert for the user you're supplying, replacing any properties specified.
      - `avatar` string, nullable — A URL for the avatar of the user.
      - `channel_data` InlineChannelDataRequest — A request to set channel data for a type of channel inline.
      - `created_at` string, date-time, nullable — The creation date of the user from your system.
      - `email` string, nullable — The primary email address for the user.
      - `id` string, required — The unique identifier of the user.
      - `locale` string, nullable — The locale of the user. Used for [message localization](/concepts/translations).
      - `name` string, nullable — Display name of the user.
      - `phone_number` string, nullable — The [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the user (required for SMS channels).
      - `preferences` InlinePreferenceSetRequest — Inline set preferences for a recipient, where the key is the preference set id. Preferences that are set inline will be merged into any existing preferences rather than replacing them.
      - `timezone` string, nullable — The timezone of the user. Must be a valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
    - InlineIdentifyObjectRequest — A custom [Object](/concepts/objects) entity which belongs to a collection.
      - `channel_data` union — An optional set of [channel data](/managing-recipients/setting-channel-data) for the object. This is a list of `ChannelData` objects.
        - object — A request to set channel data for a type of channel inline.
        - unknown
      - `collection` string, required — The collection this object belongs to.
      - `created_at` string, date-time, nullable — Timestamp when the resource was created.
      - `id` string, required — Unique identifier for the object.
      - `name` string, nullable — An optional name for the object.
      - `preferences` union — An optional set of [preferences](/concepts/preferences) for the object.
        - object — Inline set preferences for a recipient, where the key is the preference set id. Preferences that are set inline will be merged into any existing preferences rather than replacing them.
        - unknown
    - object, nullable
  - `data` object, nullable — 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](/developer-tools/api-logs#log-truncation) in your logs.
  - `ending_at` string, date-time, nullable — The ending date and time for the schedule.
  - `recipients` RecipientRequest[], required — The recipients to set the schedule for. Limited to 100 recipients per request.
    - union — Specifies a recipient in a request. This can either be a user identifier (string), an inline user request (object), or an inline object request, which is determined by the presence of a `collection` property.
      - string — The ID of the user which is used as the reference for the recipient.
      - object — A set of parameters to inline-identify a user with. Inline identifying the user will ensure that the user is available before the request is executed in Knock. It will perform an upsert for the user you're supplying, replacing any properties specified.
        - `avatar` string, nullable — A URL for the avatar of the user.
        - `channel_data` InlineChannelDataRequest — A request to set channel data for a type of channel inline.
        - `created_at` string, date-time, nullable — The creation date of the user from your system.
        - `email` string, nullable — The primary email address for the user.
        - `id` string, required — The unique identifier of the user.
        - `locale` string, nullable — The locale of the user. Used for [message localization](/concepts/translations).
        - `name` string, nullable — Display name of the user.
        - `phone_number` string, nullable — The [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the user (required for SMS channels).
        - `preferences` InlinePreferenceSetRequest — Inline set preferences for a recipient, where the key is the preference set id. Preferences that are set inline will be merged into any existing preferences rather than replacing them.
        - `timezone` string, nullable — The timezone of the user. Must be a valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
      - object — A custom [Object](/concepts/objects) entity which belongs to a collection.
        - `channel_data` union — An optional set of [channel data](/managing-recipients/setting-channel-data) for the object. This is a list of `ChannelData` objects.
          - object — A request to set channel data for a type of channel inline.
          - unknown
        - `collection` string, required — The collection this object belongs to.
        - `created_at` string, date-time, nullable — Timestamp when the resource was created.
        - `id` string, required — Unique identifier for the object.
        - `name` string, nullable — An optional name for the object.
        - `preferences` union — An optional set of [preferences](/concepts/preferences) for the object.
          - object — Inline set preferences for a recipient, where the key is the preference set id. Preferences that are set inline will be merged into any existing preferences rather than replacing them.
          - unknown
  - `repeats` ScheduleRepeatRule[] — The repeat rule for the schedule.
    - `__typename` string — The typename of the schema.
    - `day_of_month` integer, nullable — The day of the month to repeat the schedule.
    - `days` string[], nullable — The days of the week to repeat the schedule.
    - `frequency` 'daily' | 'weekly' | 'monthly' | 'hourly', required — The frequency of the schedule.
    - `hours` integer, nullable — The hour of the day to repeat the schedule.
    - `interval` integer — The interval of the schedule.
    - `minutes` integer, nullable — The minute of the hour to repeat the schedule.
  - `scheduled_at` string, date-time, nullable — The starting date and time for the schedule.
  - `tenant` union — 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.
    - union — An request to set a tenant inline.
      - string — The unique identifier for the tenant.
      - object — A tenant to be set in the system. You can supply any additional properties on the tenant object.
        - `channel_data` union — The channel data for the tenant.
          - unknown
          - object — A request to set channel data for a type of channel inline.
        - `id` string, required — The unique identifier for the tenant.
        - `name` string, nullable — An optional name for the tenant.
        - `preferences` union — The preferences for the tenant.
          - unknown
          - object — Inline set preferences for a recipient, where the key is the preference set id. Preferences that are set inline will be merged into any existing preferences rather than replacing them.
        - `settings` object — The settings for the tenant. Includes branding and preference set.
          - `branding` object — The branding for the tenant.
            - `icon_url` string, nullable — The icon URL for the tenant. Must point to a valid image with an image MIME type.
            - `logo_url` string, nullable — The logo URL for the tenant. Must point to a valid image with an image MIME type.
            - `primary_color` string, nullable — The primary color for the tenant, provided as a hex value.
            - `primary_color_contrast` string, nullable — The primary color contrast for the tenant, provided as a hex value.
          - `preference_set` union — The preference set for the tenant. Used to override the default preference set.
            - unknown
            - object — A request to set a preference set for a recipient.
              - …
    - unknown
  - `workflow` string, required — The key of the workflow.

## Response `200`

OK

- Schedule[] — A list of schedules.
  - `__typename` string — The typename of the schema.
  - `actor` union — A map of properties describing a user or an object to identify in Knock and mark as who or what performed the action.
    - User — A [User](/concepts/users) represents an individual in your system who can receive notifications through Knock. Users are the most common recipients of notifications and are always referenced by your internal identifier.
      - `__typename` string, required — The typename of the schema.
      - `avatar` string, nullable — A URL for the avatar of the user.
      - `created_at` string, date-time, nullable — The creation date of the user from your system.
      - `email` string, nullable — The primary email address for the user.
      - `id` string, required — The unique identifier of the user.
      - `name` string, nullable — Display name of the user.
      - `phone_number` string, nullable — The [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the user (required for SMS channels).
      - `timezone` string, nullable — The timezone of the user. Must be a valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
      - `updated_at` string, date-time, required — The timestamp when the resource was last updated.
    - Object — A custom [Object](/concepts/objects) entity which belongs to a collection.
      - `__typename` string, required — The typename of the schema.
      - `collection` string, required — The collection this object belongs to.
      - `created_at` string, date-time, nullable — Timestamp when the resource was created.
      - `id` string, required — Unique identifier for the object.
      - `properties` object — The custom properties associated with the object.
      - `updated_at` string, date-time, required — The timestamp when the resource was last updated.
    - unknown
  - `data` object, nullable — 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](/developer-tools/api-logs#log-truncation) in your logs.
  - `id` string, uuid, required — Unique identifier for the schedule.
  - `inserted_at` string, date-time, required — Timestamp when the resource was created.
  - `last_occurrence_at` string, date-time, nullable — The last occurrence of the schedule.
  - `next_occurrence_at` string, date-time, nullable — The next occurrence of the schedule.
  - `recipient` union, required — A recipient of a notification, which is either a user or an object.
    - object — A [User](/concepts/users) represents an individual in your system who can receive notifications through Knock. Users are the most common recipients of notifications and are always referenced by your internal identifier.
      - `__typename` string, required — The typename of the schema.
      - `avatar` string, nullable — A URL for the avatar of the user.
      - `created_at` string, date-time, nullable — The creation date of the user from your system.
      - `email` string, nullable — The primary email address for the user.
      - `id` string, required — The unique identifier of the user.
      - `name` string, nullable — Display name of the user.
      - `phone_number` string, nullable — The [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the user (required for SMS channels).
      - `timezone` string, nullable — The timezone of the user. Must be a valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
      - `updated_at` string, date-time, required — The timestamp when the resource was last updated.
    - object — A custom [Object](/concepts/objects) entity which belongs to a collection.
      - `__typename` string, required — The typename of the schema.
      - `collection` string, required — The collection this object belongs to.
      - `created_at` string, date-time, nullable — Timestamp when the resource was created.
      - `id` string, required — Unique identifier for the object.
      - `properties` object — The custom properties associated with the object.
      - `updated_at` string, date-time, required — The timestamp when the resource was last updated.
  - `repeats` ScheduleRepeatRule[], required — The repeat rule for the schedule.
    - `__typename` string — The typename of the schema.
    - `day_of_month` integer, nullable — The day of the month to repeat the schedule.
    - `days` string[], nullable — The days of the week to repeat the schedule.
    - `frequency` 'daily' | 'weekly' | 'monthly' | 'hourly', required — The frequency of the schedule.
    - `hours` integer, nullable — The hour of the day to repeat the schedule.
    - `interval` integer — The interval of the schedule.
    - `minutes` integer, nullable — The minute of the hour to repeat the schedule.
  - `tenant` string, nullable — 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.
  - `updated_at` string, date-time, required — The timestamp when the resource was last updated.
  - `workflow` string, required — The workflow the schedule is applied to.

---

[API](https://skmtc.net/knocklabs/apis/knock-api.md) · [All operations](https://skmtc.net/knocklabs/apis/knock-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/knocklabs/knock-api/revisions/4b8499dddbc5/schema)
