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

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)