Scheduled Sends API

Schedule one-time HTTP requests to be delivered at a specific date and time.

Endpoints

MethodPathDescription
POST/api/organizations/{orgId}/scheduled-sendsCreate scheduled send
GET/api/organizations/{orgId}/scheduled-sendsList scheduled sends
GET/api/organizations/{orgId}/scheduled-sends/{id}Get scheduled send
PATCH/api/organizations/{orgId}/scheduled-sends/{id}Update scheduled send
DELETE/api/organizations/{orgId}/scheduled-sends/{id}Cancel scheduled send
POST/api/organizations/{orgId}/scheduled-sends/{id}/send-nowTrigger immediately

Scheduled Send Object

{
  "id": "uuid",
  "organization_id": "org_xxx",
  "name": "Weekly report trigger",
  "description": "Triggers the weekly report generation endpoint",
  "url": "https://api.example.com/reports/generate",
  "method": "POST",
  "headers": "{\"X-Api-Key\": \"secret\"}",
  "payload": "{\"type\": \"weekly\"}",
  "scheduled_for": "2026-03-15T14:00:00.000Z",
  "timezone": "UTC",
  "status": "pending",
  "attempts": 0,
  "max_attempts": 3,
  "response_status": null,
  "response_body": null,
  "error_message": null,
  "latency_ms": null,
  "sent_at": null,
  "created_at": "2026-03-08T10:00:00.000Z",
  "updated_at": "2026-03-08T10:00:00.000Z"
}

Status Values

StatusDescription
pendingWaiting to be sent at the scheduled time
sendingCurrently being processed
sentSuccessfully delivered
failedDelivery failed after all retry attempts
cancelledManually cancelled

Create Scheduled Send

curl -X POST https://api.hookbase.app/api/organizations/{orgId}/scheduled-sends \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Deploy notification",
    "url": "https://api.example.com/webhooks/deploy",
    "method": "POST",
    "headers": {"Content-Type": "application/json"},
    "payload": {"version": "2.1.0", "environment": "production"},
    "scheduledFor": "2026-03-15T14:00:00Z",
    "timezone": "America/New_York",
    "maxAttempts": 3
  }'

Parameters

FieldTypeRequiredDescription
namestringNoDisplay name
descriptionstringNoOptional description
urlstringYesTarget URL (http/https)
methodstringNoHTTP method (default: POST)
headersobjectNoCustom HTTP headers
payloadstring/objectNoRequest body
scheduledForstringYesISO 8601 timestamp (must be in the future)
timezonestringNoIANA timezone (default: UTC)
maxAttemptsnumberNoMax retry attempts (default: 3)

List Scheduled Sends

curl https://api.hookbase.app/api/organizations/{orgId}/scheduled-sends?status=pending \
  -H "Authorization: Bearer {token}"

Query Parameters

ParameterDescription
statusFilter by status: pending, sending, sent, failed, cancelled
pagePage number (default: 1)
pageSizeItems per page (default: 20, max: 100)

Cancel Scheduled Send

curl -X DELETE https://api.hookbase.app/api/organizations/{orgId}/scheduled-sends/{id} \
  -H "Authorization: Bearer {token}"

Only pending and failed sends can be cancelled.

Send Now

Trigger a scheduled send immediately, regardless of its scheduled time:

curl -X POST https://api.hookbase.app/api/organizations/{orgId}/scheduled-sends/{id}/send-now \
  -H "Authorization: Bearer {token}"

Only pending and failed sends can be triggered.

Retry Behavior

When a scheduled send fails (non-2xx response or network error):

  1. The attempts counter increments
  2. If attempts < maxAttempts, status resets to pending for retry on the next scheduler cycle (runs every minute)
  3. If attempts >= maxAttempts, status is set to failed

See Also