Event sources

Schedule Event Sources

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

POST
/event-sources.schedule
AuthorizationBearer <token>

All the DevRev APIs require a token to authenticate the user. Provide Authorization: Bearer <TOKEN> as a header to every API request. How do I find my token?

In: header

event_key?string

A unique key for this event (scoped to an event source) used for updating/getting/deleting scheduled events.

Formattext
event_typestring

The type of the event.

Formattext
idstring

The event source's ID.

Formatid
payloadstring

The raw payload of the event.

publish_at?string

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.

Formatdate-time
update_if_exists?boolean

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 Body

curl -X POST "https://api.devrev.ai/event-sources.schedule" \  -H "Content-Type: application/json" \  -d '{    "event_type": "string",    "id": "string",    "payload": "string"  }'
{
  "event_key": "string"
}
{
  "detail": "string",
  "message": "string",
  "type": "artifact_already_attached_to_a_parent",
  "existing_parent": "string",
  "is_same": true
}
{
  "detail": "string",
  "message": "string",
  "type": "unauthenticated"
}
{
  "detail": "string",
  "message": "string",
  "type": "forbidden"
}
{
  "detail": "string",
  "message": "string",
  "type": "not_found"
}
{
  "detail": "string",
  "message": "string",
  "type": "too_many_requests",
  "retry_after": 0
}
{
  "detail": "string",
  "message": "string",
  "type": "internal_error",
  "reference_id": "string"
}
{
  "detail": "string",
  "message": "string",
  "type": "service_unavailable"
}