/
PATCH v2/EviMail/Batches/{batchid}

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

  1. 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.

  2. 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

  1. 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" }
  1. 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 Without State) are included in the request or if the input is invalid.

  • 404 Not Found if the specified batchid does not exist.

Notes

  1. Batch ID Requirement:

    • The batchid in the URL must correspond to an existing batch created via the initial Submit endpoint.

  2. Timezone:

    • Ensure the ScheduledDate datetime is in a standard format (e.g., ISO 8601) and considers timezone differences.

 

Related content

POST v2/EviMail/Batches
POST v2/EviMail/Batches
Read with this
GET v2/EviMail/Batches/{batchid}
GET v2/EviMail/Batches/{batchid}
Read with this
POST v2/EviMail/Batches/{batchid}/Recipients
POST v2/EviMail/Batches/{batchid}/Recipients
Read with this
PUT v2/EviMail/Batches/{batchid}/Body
PUT v2/EviMail/Batches/{batchid}/Body
Read with this
EviMail Batch Sending
EviMail Batch Sending
Read with this
QUERY v2/EviMail/Batches
QUERY v2/EviMail/Batches
Read with this