1. SDK Reference
  2. sendEvent

See our sendEvent guide for more info.

Parameters

keyRequired
string

A unique key for the event in the context of a workflow run. Please see the Keys and Resumability guide for more info.

eventRequired
object
id
string

An optional unique ID for the event. If not provided, one will be generated automatically (using clid). Set this field to perform event deduplication.

nameRequired
string

The name of the event. This is the name you set when creating the customEvent trigger.

payloadRequired
json object

The payload of the event.

timestamp
ISO8601 string

An optional timestamp for the event. If not provided, one will be generated. Must be in ISO 8601 format (e.g. new Date().toISOString())

context
json object

An optional context object for the event. This can be used to pass additional information about the event, such as the user who triggered it. Note that this is not currently exposed to the workflow (coming soon).

delay
object

An optional delay object for the event. This can be used to delay the event by a certain amount of time. Use one of the following options:

  • { seconds: number } - delay the event by a certain number of seconds
  • { minutes: number } - delay the event by a certain number of minutes
  • { hours: number } - delay the event by a certain number of hours
  • { days: number } - delay the event by a certain number of days
  • { until: Date } - delay the event until a certain date

See the Delaying Event Delivery docs for more info.