Skip to content
Last updated

Send the campaign

The final step is to send your campaign. You have two options - to schedule the sending for a specific date and time, or to send it immediately.

To schedule the sending, do a POST /campaigndraft/{draft_ID}/schedule call and set the sending time in the payload:

Example

curl -s \
	-X POST \
	--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
	https://api.mailjet.com/v3/REST/campaigndraft/$draft_ID/schedule \
	-H 'Content-Type: application/json' \
	-d '{
      "Date":"2018-01-01T00:00:00"
	}'

API Response

{
	"Count": 1,
	"Data": [
		{
			"Date": "2018-01-01T00:00:00",
			"Status": "Programmed"
		}
	],
	"Total": 1
}

To send the campaign right away, do a POST /campaigndraft/{draft_ID}/send call:

Example

curl -s \
	-X POST \
	--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
	https://api.mailjet.com/v3/REST/campaigndraft/$draft_ID/send \
	-H 'Content-Type: application/json' \
	-d '{
	}'

API Response

{
	"Count": 1,
	"Data": [
		{
			"Status": "Programmed"
		}
	],
	"Total": 1
}