PATCH v2/EviMail/Batches/{batchid}
HTTP Method: PATCH
Description:
This endpoint is used to mark a bulk email batch as "scheduled/active." It finalizes the batch details and makes it eligible for processing and sending. Alternatively, it can revert a scheduled batch back to the "DRAFT" state.
Input Parameters
ScheduledDate (datetime, optional)
Specifies the date and time the batch should be sent.
Note: This parameter is incompatible with the
State
parameter, as they serve opposite purposes.
State (string, optional)
Used to revert a previously scheduled batch back to the "DRAFT" state or to finalize a batch using “Submitted”
Valid Value:
"Draft", "Submitted"
.
Output Parameters
No output parameters.
The endpoint will only return an HTTP status code indicating the result of the operation.
Request Examples
Scheduling a Batch:
PATCH /v2/EviMail/Batches/{batchid}
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
{
"State": "Submitted",
"ScheduledDate": "2024-11-15T10:00:00Z"
}
Reverting a Batch to Draft:
PATCH /v2/EviMail/Batches/{batchid}
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
{
"State": "Draft"
}
Response Example
The endpoint will return an HTTP status code:
200 OK if the batch was successfully updated.
400 Bad Request if conflicting parameters (
ScheduledDate
WithoutState
) are included in the request or if the input is invalid.404 Not Found if the specified
batchid
does not exist.
Notes
Batch ID Requirement:
The
batchid
in the URL must correspond to an existing batch created via the initialSubmit
endpoint.
Timezone:
Ensure the
ScheduledDate
datetime is in a standard format (e.g., ISO 8601) and considers timezone differences.