Skip to content
Last updated

Test your campaign

We strongly suggest sending a test email, in order to verify that the configuration and content of your campaign are set up properly. Use POST /campaigndraft/{draft_ID}/test to do that:

Example

curl -s \
	-X POST \
	--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
	https://api.mailjet.com/v3/REST/campaigndraft/$draft_ID/test \
	-H 'Content-Type: application/json' \
	-d '{
      "Recipients":[
        {
          "Email":"passenger@mailjet.com",
          "Name":"Passenger 1"
        }
      ]
	}'

API Response

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