Skip to content

Run Inbox Placement Test

Request

Create and run a new inbox placement test.

Either 'html', 'template_name' or 'account_template_name' field should be provided.

'variables' are Template variables, which could be used in html or template. You can use next recipient variables inside Template variables, which will be filled for every seed automatically: %recipient.first_name%, %recipient.last_name%.

Security
basicAuth
Bodyapplication/jsonrequired
fromstringrequired
subjectstringrequired
htmlstring
template_namestring

Domain-level template from Mailgun Send

account_template_namestring

Account-level template from Mailgun Send

variablesobject
headersobject
seed_liststring

Use existing Seed List. If omitted creates new Seed List

provider_filterArray of strings

missing/null/[] means all providers

sending_ip_pool_idstring

If provided the email will be delivered with an IP that belongs in that pool

sending_ipstring

Used to specify an IP Address to send an email that is owned by your account

max_seeds_per_providerinteger, (int32)

Maximum number of seeds per provider. 0 means no limit.

curl -i -X POST \
  -u '<username>:<password>' \
  https://api.mailgun.net/v4/inbox/tests \
  -H 'Content-Type: application/json' \
  -d '{
    "from": "First Last <mail@example.com>",
    "subject": "Buy our elephants",
    "html": "<html><body>Hello {{first_name}} {{last_name}}. Visit our new shop at {{address}}. <b>Our elephants are the best.</b> </body></html>",
    "template_name": "domain-template1",
    "account_template_name": "account-template1",
    "variables": {
      "address": "108, Robinson Ave, Richmond",
      "first_name": "%recipient.first_name%",
      "last_name": "%recipient.last_name%"
    },
    "seed_list": "ibp-123@mailgun.com",
    "provider_filter": [
      "gmail.com",
      "hotmail.com"
    ],
    "sending_ip_pool_id": "12345678901234567890abcd",
    "sending_ip": "1.2.3.4"
  }'

Responses

A 202 response

Bodyapplication/json
result_idstringrequired
mailing_liststringrequired
Response
{ "result_id": "uuid4", "links": { "results": "https://api.mailgun.net/v4/inbox/results/uuid4" } }