Skip to main content

Schedule Campaign

Schedule a campaign to be sent automatically at a future time. The recipient list is built immediately and total_recipients is stored on the campaign.

POST /v1/campaigns/{id}/schedule

Authenticationโ€‹

Requires a valid API key with campaigns:write scope.

Path Parametersโ€‹

ParameterTypeDescription
idintegerThe campaign ID

Request Bodyโ€‹

FieldTypeRequiredDescription
scheduled_atstringYesSend time (ISO 8601). Must be in the future; stored in UTC

Prerequisitesโ€‹

  • The campaign must be in draft or scheduled status
  • email_subject and email_body must be set

Request Exampleโ€‹

curl -X POST "https://app.equipdash.com/api/v1/campaigns/42/schedule" \
-H "Authorization: Bearer eqd_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"scheduled_at": "2026-07-25T08:00:00+00:00"
}'

Response (200 OK)โ€‹

Returns the campaign with status scheduled.

{
"data": {
"id": 42,
"name": "Summer Kayak Promo",
"description": "Promote summer kayak rentals",
"kind": "one_off",
"channel": "email",
"status": "scheduled",
"audience_type": "filter",
"audience_filter": {
"v": 2,
"preset": "recent"
},
"email_subject": "Summer is here, {customer_name}!",
"email_body": "<p>Hi {customer_name}, book your kayak now.</p>",
"template_key": "promo_blast",
"cta_text": "Book now",
"cta_url": "https://example.com/book",
"scheduled_at": "2026-07-25T08:00:00+00:00",
"sent_at": null,
"total_recipients": 250,
"total_sent": 0,
"created_at": "2026-07-01T09:00:00+00:00",
"updated_at": "2026-07-20T10:00:00+00:00"
},
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-07-20T10:00:00+00:00"
}
}

Error Responsesโ€‹

StatusCodeDescription
403insufficient_scopeAPI key lacks campaigns:write scope
404resource_not_foundCampaign not found
422validation_errorscheduled_at is missing or not in the future
422validation_erroremail_subject or email_body is missing
422invalid_stateCampaign has already been sent