Schedule emails
Scheduling transactional batches is useful when you need to send high volumes at the same time. Hitting the transactional endpoint in bursts can make it hard to handle all the asynchronous calls. Scheduling sends ahead of time makes it easier to process API calls in advance.
This guide covers:
Defining scheduled batches
To define a scheduled batch or an individual scheduled message, use the scheduledAt parameter when calling the Send a Transactional Message Endpoint. This parameter takes a standard ISO-formatted datetime value, and you can specify a different timezone by adding hours:
Note: you can schedule a message up to 72 hours in the future (from the moment the API request is executed).
Sending multiple correlated batches at a specific time.
To execute the transactional endpoint multiple times at a specific time in the future, pass a batchId parameter to track the state of your sends. This links all your messages to a unique identifier and simplifies tracking of batch operations.
We recommend using UUIDs for this purpose.
batchId: 275d3289-d5cb-4768-9460-a990054b6c81
Retrieve scheduled batches
Use the batchId discussed earlier. Pass your UUID value in the request parameters to receive an API response with the state of your scheduled job.
If you scheduled a single transactional email, pass the messageId from the API response of that action.
Endpoint: Fetch scheduled emails by batchId or messageId
GET https://api.brevo.com/v3/smtp/emailStatus/{identifier}
The identifier field should be either:
- The
messageId, for a single email. - The
batchId, for a batch sending.
Canceling scheduled batches
If you mistakenly scheduled one or a series of batch calls, delete them from the queue by passing the batchId. The scheduled operation aborts once you receive a successful response status.
Endpoint: Delete scheduled emails by batchId or messageId
DELETE https://api.brevo.com/v3/smtp/email/{identifier}
The identifier field should be either:
- The
messageId, for a single email. - The
batchId, for a batch sending.
You receive a 204 status code once the delete action goes through.