Skip to content
Last updated

Use a sender on all API Keys (metasender)

By default your senders are not shared between the primary and sub-account API keys. In case you want to use the same sender / domain on all your API keys, you should create a metasender.

Do a POST /metasender to create a new metasender object.

Example

curl -s \
	-X POST \
	--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
	https://api.mailjet.com/v3/REST/metasender \
	-H 'Content-Type: application/json' \
	-d '{
      "Description":"Metasender 1 - used for Promo emails",
      "Email":"pilot@mailjet.com"
	}'

API Response

{
	"Count": 1,
	"Data": [
		{
			"Description": "Metasender 1 - used for Promo emails",
			"CreatedAt": "2018-01-01T00:00:00",
			"Email": "pilot@mailjet.com",
			"Filename": "a12345b67c123456ab1ca12345b1234b5.txt",
			"ID": 123,
			"IsEnabled": true
		}
	],
	"Total": 1
}

Afterwards you need to request the validation of the metasender by our support team. Once done, it will be authorized for use on all of your API keys and any additional senders matching this metasender will also be validated.