Skip to main content

Overview

The events resource provides methods for managing one-time scheduled events. Access it via client.events or use the default cuey instance.

Quick Start

import { cuey } from "cuey";

// List all events
const { data: events } = await cuey.events.list();

// Get a specific event
const event = await cuey.events.get("event-id");

// Create a new event
const newEvent = await cuey.events.create({
  webhook_url: "https://api.example.com/webhook",
  scheduled_at: "2024-12-31T23:59:59Z",
  payload: { message: "Hello!" },
});

Methods

List Events

List all events with optional pagination and filters

Get Event

Retrieve a single event by ID

Create Event

Schedule a new one-time event

Update Event

Update an existing pending event

Delete Event

Delete a pending event

Event Status

Events can have the following statuses:
  • pending: Event is scheduled but not yet executed
  • processing: Event is currently being executed
  • success: Event executed successfully
  • failed: Event execution failed (after all retries)

Crons

Learn about managing recurring cron jobs

Error Handling

Understand error handling patterns

Advanced Configuration

Configure the client

Common Use Cases

See real-world examples