Skip to main content
Use cuey.schedule() as a convenient alias for cuey.events.create(). Both methods are equivalent.

Overview

Create a new scheduled event that will execute once at the specified time.

Parameters

string
required
The full URL of the webhook endpoint to call. Must be a valid HTTP/HTTPS URL.
string
default:"POST"
HTTP method to use for the webhook request. Options: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS. Defaults to POST.
string
required
ISO 8601 timestamp when the event should execute. Must be in the future.
object | null
Custom headers to include in the webhook request. Object with string keys and values.
object | null
Payload to send with the webhook request. Can be any JSON-serializable object.
object | null
Retry configuration for failed webhook attempts.

Response

Event
required
The created event object.

Errors

The scheduled_at timestamp must be in the future. The SDK validates this client-side before making the API call.
  • ValidationError: If scheduled_at is in the past or invalid, or if webhook URL is invalid
  • UnauthorizedError: If API key is invalid or missing

Examples

Schedule Event in One Hour

Schedule Multiple Events