event-source

Event Sources Schedule Event

POST
Schedules an event to be published to the specified event source.

Request

This endpoint expects an object.
event_type
stringRequired
The type of the event.
id
stringRequired
The event source's ID.
payload
stringRequired
The raw payload of the event.
event_key
stringOptional
A unique key for this event (scoped to an event source) used for updating/getting/deleting scheduled events.
publish_at
datetimeOptional
The timestamp at which the event should be published. The event is guaranteed to be published after this. If omitted, the event is published immediately.
update_if_exists
booleanOptional
Whether or not to update an existing scheduled event with the same event key. If this is false, and an event is already scheduled with the same event key, then HTTP 409 Conflict is returned.

Response

This endpoint returns an object
event_key
stringOptional
The event key for this event. Auto-generated if the caller doesn't specify the event key. This may be empty if the event was published immediately.
POST
1curl -X POST https://api.devrev.ai/event-sources.schedule \
2 -H "Authorization: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "event_type": "event_type",
6 "id": "id",
7 "payload": "payload"
8}'
200
Successful
1{
2 "event_key": "event_key"
3}