Schedule an email campaign
PUT /campaigns/{uuid}/actions/schedule
/campaigns/{uuid}/actions/scheduleSCHEDULES THE CAMPAIGN FOR REAL: sets the date and time at which it will be sent to all its recipients, with no further action. Nothing goes out now; at that time the same real send as campaign_send_now happens, to real people, and it cannot be recalled. Before sending, check with get_campaign that the campaign has recipients (recipient_count above 0), no entry in warnings has blocks_sending: true, and its status is draft, ready or scheduled. The API does not check recipients, credits or account status when scheduling: they are checked when the scheduled time arrives, and if the check fails the campaign moves to campaign.status.error and nothing is sent.
When to use: Only when the person has confirmed the campaign and the date at which it must go out to all its recipients.
When not to use: To send right away, use campaign_send_now. To cancel the schedule, use campaign_unschedule. To check the email first, use campaign_send_test. For an SMS campaign, use schedule_sms_campaign. Automation campaigns cannot be scheduled.
Side effects: The status becomes campaign.status.scheduled and the send is queued for the date. At that time real emails go out and email credits are used. Until then the campaign can be edited with update_campaign or cancelled with campaign_unschedule. Scheduling an already scheduled campaign replaces its date. With campaign_confirmation_email, a confirmation email goes to mailing_confirm_emails when the sending ends.
Permissions: Requires the manager role or higher, or the marketing.campaigns.send capability.
Value for the X-Auth-Token header parameter.
In: header
Path Parameters
UUID of the email campaign (the uuid field returned by list_campaigns).
The updated Campaign resource
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X PUT "https://api.easymailing.com/campaigns/8d4e2a71-5c3b-4f96-b1a8-6e0d9c7f2b35/actions/schedule" \ -H "X-Auth-Token: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "campaign_confirmation_email": true, "mailing_confirm_emails": [ "user@example.com" ], "schedule_mailing_date": "2019-08-24T14:15:22Z" }'null