Schedule a webhook for later
Send an HTTP request at a future timestamp, with the TypeScript SDK or curl.
1. Create an API key
Sign in to Cuey, create a team, and generate an API key in team settings. Keep it on your server. Install the SDK with npm install cuey and set CUEY_API_KEY.
2. Schedule your request
Use a complete, publicly reachable HTTPS URL and an ISO timestamp in the future. Add an application secret to authenticate the callback.
import { cuey } from "cuey";
// Server-side only. Set CUEY_API_KEY in your environment.
const event = await cuey.schedule({
webhook_url: "https://your.app/api/remind",
method: "POST",
scheduled_at: new Date(Date.now() + 15 * 60 * 1000).toISOString(),
headers: { Authorization: `Bearer ${process.env.REMINDER_SECRET}` },
payload: { reminder_id: "reminder_123" },
});
// Store event.id alongside the reminder in your database.3. Handle delivery
Verify the shared secret before processing the payload. Load the reminder by ID and check whether it still applies. Make the side effect idempotent, then return a 2xx response. Configure retry behaviour for failed requests.
4. Inspect or cancel it
const current = await cuey.events.get(event.id);
// Only pending, manually created events can be deleted.
await cuey.events.delete(event.id);Inspect event status and response details in the dashboard. Cancellation can race with delivery, so also check the reminder state in your handler.
Using another language?
The API accepts the same fields. The command below schedules a request fifteen minutes from now. Set CUEY_API_KEY in your shell first.
SCHEDULED_AT=$(node -e 'console.log(new Date(Date.now() + 900000).toISOString())')
curl https://cuey.dev/api/v1/events \
-H "Authorization: Bearer $CUEY_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"webhook_url\":\"https://your.app/api/remind\",\"method\":\"POST\",\"scheduled_at\":\"$SCHEDULED_AT\"}"Schedule your first request
The first 10,000 events each month are free. Additional events cost $0.0001 each. See pricing or read the API documentation.
Get your API key ↗