Create a new scheduled event
TypeScript
import { cuey } from 'cuey'; const event = await cuey.schedule({ webhook_url: 'https://api.example.com/webhook', method: 'POST', scheduled_at: '2024-12-31T23:59:59Z', payload: { message: 'Hello, Cuey!' } });
{ "data": { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "scheduled_at": "2023-11-07T05:31:56Z", "status": "pending", "webhook_url": "<string>", "method": "GET", "cron_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "retry_of": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "executed_at": "2023-11-07T05:31:56Z", "headers": {}, "payload": {}, "retry_config": { "maxRetries": 5, "backoffMs": 2550, "backoffType": "exponential" }, "response_status": 123, "response_headers": {}, "response_body": "<string>", "response_duration": 123, "response_error": "<string>", "created_at": "2023-11-07T05:31:56Z", "updated_at": "2023-11-07T05:31:56Z", "team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" } }
API key authentication. Include your API key in the Authorization header as: Bearer
ISO timestamp, must be in the future
GET
POST
PUT
PATCH
DELETE
HEAD
OPTIONS
Show child attributes
Event created