{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/mandrill/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition","tabs","tab"]},"type":"markdown"},"seo":{"title":"Inbound Calls","siteUrl":"https://dev.mailjet.com/","projectTitle":"Mailjet Developer Documentation","description":"Replace Mandrill inbound email with Mailjet’s Parse API. parseroute maps to /inbound/domains, add-domain, add-route, update-route, and delete-route calls.","image":"https://dev.mailjet.com/og-image.png","lang":"en-US","keywords":["Mailjet API","Email API","Content API","SMTP Relay","transactional email","email delivery","Send API","email templates","developer documentation"],"meta":[{"name":"og:type","content":"website"},{"name":"og:site_name","content":"Mailjet Developer Documentation"},{"name":"twitter:card","content":"summary_large_image"},{"name":"robots","content":"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1"},{"name":"googlebot","content":"index, follow, max-snippet:-1, max-image-preview:large"}],"jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://dev.mailjet.com/#organization","name":"Mailjet","alternateName":"Sinch Mailjet","url":"https://www.mailjet.com","logo":"https://assets.mailjet.com/lib/images/mailjetLogo/mj_logo_with_text_color.png","parentOrganization":{"@type":"Organization","name":"Sinch","url":"https://www.sinch.com"}},{"@type":"WebSite","@id":"https://dev.mailjet.com/#website","name":"Mailjet Developer Documentation","description":"Official developer documentation for the Mailjet Email API, Content API and SMTP Relay.","url":"https://dev.mailjet.com/","inLanguage":"en-US","publisher":{"@id":"https://dev.mailjet.com/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://dev.mailjet.com/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]},"llmstxt":{"hide":false,"title":"Mailjet Developer Documentation","description":"Developer documentation for the Mailjet Email API, Content API and SMTP Relay - guides, API references and code samples for sending, templating and tracking email at scale.","details":{"content":"Mailjet (part of Sinch) provides APIs for sending and managing email.\n\nThis documentation covers four main areas:\n\n- **Email API** - the Send API (v3 and v3.1) for transactional and marketing email,\n  plus contact management, segmentation, campaigns, statistics, webhooks, the Parse API\n  and the Mailjet Templating Language.\n- **Content API** - programmatic management of email templates, template contents,\n  images, labels and authentication tokens (v1).\n- **SMTP Relay** - sending through Mailjet's SMTP servers, including custom headers.\n- **API Reference** - the complete, generated reference for every endpoint, built directly\n  from the OpenAPI specifications.\n\nBase URL for all REST APIs: `https://api.mailjet.com`.\nAuthentication uses HTTP Basic auth with an API key and secret key.\n\n## Machine-readable entry points\n\nPrefer these when you need the API surface in as few requests as possible:\n\n- `/openapi/openapi-mailjet.md` - the **complete** Email API reference (every endpoint,\n  grouped by resource) as a single Markdown document.\n- `/openapi/openapi-passport.md` - the **complete** Content API reference as a single\n  Markdown document.\n- `/_bundle/openapi/openapi-mailjet.yaml` - the raw, fully bundled OpenAPI 3 description\n  of the Email API.\n- `/_bundle/openapi/openapi-passport.yaml` - the raw, fully bundled OpenAPI 3 description\n  of the Content API.\n- `/sitemap.xml` - every indexable URL on this site.\n\nEvery page on this site is also available as clean Markdown by appending `.md` to its URL."},"sections":[{"title":"Email API","description":"Sending, contacts, campaigns, statistics, webhooks and templating.","includeFiles":["docs/email-api/**/*.md"],"excludeFiles":[]},{"title":"Content API","description":"Manage templates, template contents, images, labels and tokens.","includeFiles":["docs/content-api/**/*.md","docs/content-api.md"],"excludeFiles":[]},{"title":"SMTP Relay","description":"Send email through Mailjet's SMTP servers.","includeFiles":["docs/smtp-relay/**/*.md"],"excludeFiles":[]},{"title":"API Reference","description":"Complete generated reference for every Mailjet API endpoint.","includeFiles":["openapi/openapi-mailjet.yaml","openapi/openapi-passport.yaml","docs/api-reference/**/*.md"],"excludeFiles":[]},{"title":"Migrating from Mandrill","description":"Guides for switching from Mandrill to Mailjet.","includeFiles":["docs/mandrill/**/*.md"],"excludeFiles":[]}],"excludeFiles":[]},"priority":0.3},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"inbound-calls","__idx":0},"children":["Inbound Calls"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"introduction","__idx":1},"children":["Introduction"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Mailjet provides a way to receive email, in addition to sending them. To achieve that, you should start creating a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/email-api/categories/parse/"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parseroute"]}]}," which maps a given email address to your webhook."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For testing purposes, Mailjet provides auto generated email addresses on the domain ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parse-in1.mailjet.com"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For production setup, we however recommend you to setup the Parse API with your own domain, as explained below."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"domains","__idx":2},"children":["Domains"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Maps to /inbound/domains.json"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In Mailjet API, Inbound Domains are called ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/email-api/categories/parse/"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parseroute"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"add-domain","__idx":3},"children":["Add-Domain"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Maps to /inbound/add-domain.json"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Adding a domain is done through the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/email-api/categories/sender-addresses-and-domains/"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sender"]}]}," resource."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"check-domain","__idx":4},"children":["Check-Domain"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Domain verification is tied to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/email-api/categories/sender-addresses-and-domains/"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sender"]}]}," resource."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Please refer to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/#senders-calls"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Senders calls"]}]}," guide to learn more."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"delete-domain","__idx":5},"children":["Delete-Domain"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Maps to /inbound/delete-domain.json"]}]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"PHP","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"<?php\nrequire 'vendor/autoload.php';\nuse \\Mailjet\\Resources;\n$mj = new \\Mailjet\\Client(getenv('MJ_APIKEY_PUBLIC'), getenv('MJ_APIKEY_PRIVATE'));\n$response = $mj->delete(Resources::$Sender, ['id' => $id]);\n$response->success() && var_dump($response->getData());\n?>\n","lang":"php"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Bash","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Delete : Manage an email sender for a single API key. An e-mail address or a complete domain (*) has to be registered and validated before being used to send e-mails. In order to manage a sender available across multiple API keys, see the related MetaSender resource.\ncurl -s \\\n\t-X DELETE \\\n\t--user \"$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE\" \\\n\thttps://api.mailjet.com/v3/REST/sender/$ID \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\n\t}'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Node.js","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"/**\n *\n * Delete : Manage an email sender for a single API key. An e-mail address or a complete domain (*) has to be registered and validated before being used to send e-mails. In order to manage a sender available across multiple API keys, see the related MetaSender resource.\n *\n */\nvar mailjet = require('node-mailjet').connect(\n  process.env.MJ_APIKEY_PUBLIC,\n  process.env.MJ_APIKEY_PRIVATE\n)\nvar request = mailjet\n  .delete('sender')\n  .id($ID)\n  .request()\nrequest\n  .on('success', function(response, body) {\n    console.log(response.statusCode, body)\n  })\n  .on('error', function(err, response) {\n    console.log(response.statusCode, err)\n  })\n","lang":"javascript"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Ruby","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ruby","header":{"controls":{"copy":{}}},"source":"# Delete : Manage an email sender for a single API key. An e-mail address or a complete domain (*) has to be registered and validated before being used to send e-mails. In order to manage a sender available across multiple API keys, see the related MetaSender resource.\nMailjet.configure do |config|\n  config.api_key = ENV['MJ_APIKEY_PUBLIC']\n  config.secret_key = ENV['MJ_APIKEY_PRIVATE']\n  config.default_from = 'your default sending address'\nend\ntarget = Mailjet::Sender.find($ID)\ntarget.delete()\n","lang":"ruby"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"\"\"\"\nDelete : Manage an email sender for a single API key. An e-mail address or a complete domain (*) has to be registered and validated before being used to send e-mails. In order to manage a sender available across multiple API keys, see the related MetaSender resource.\n\"\"\"\nfrom mailjet_rest import Client\nimport os\napi_key = os.environ['MJ_APIKEY_PUBLIC']\napi_secret = os.environ['MJ_APIKEY_PRIVATE']\nmailjet = Client(auth=(api_key, api_secret))\nid = '$ID'\nresult = mailjet.sender.delete(id=id)\nprint result.status_code\nprint result.json()\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Go","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"/*\nDelete : Manage an email sender for a single API key. An e-mail address or a complete domain (*) has to be registered and validated before being used to send e-mails. In order to manage a sender available across multiple API keys, see the related MetaSender resource.\n*/\npackage main\nimport (\n\t\"fmt\"\n\t. \"github.com/mailjet/mailjet-apiv3-go\"\n\t\"github.com/mailjet/mailjet-apiv3-go/resources\"\n\t\"os\"\n)\nfunc main () {\n\tmailjetClient := NewMailjetClient(os.Getenv(\"MJ_APIKEY_PUBLIC\"), os.Getenv(\"MJ_APIKEY_PRIVATE\"))\n\tmr := &MailjetRequest{\n\t  Resource: \"sender\",\n\t  ID: RESOURCE_ID,\n\t}\n\terr := mailjetClient.Delete(mr)\n\tif err != nil {\n\t  fmt.Println(err)\n\t}\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"package com.my.project;\nimport com.mailjet.client.errors.MailjetException;\nimport com.mailjet.client.MailjetClient;\nimport com.mailjet.client.MailjetRequest;\nimport com.mailjet.client.MailjetResponse;\nimport com.mailjet.client.resource.Sender;\npublic class MyClass {\n    /**\n     * Delete : Manage an email sender for a single API key. An e-mail address or a complete domain (*) has to be registered and validated before being used to send e-mails. In order to manage a sender available across multiple API keys, see the related MetaSender resource.\n     */\n    public static void main(String[] args) throws MailjetException {\n      MailjetClient client;\n      MailjetRequest request;\n      MailjetResponse response;\n      client = new MailjetClient(\"api key\", \"api secret\");\n      request = new MailjetRequest(Sender.resource, ID);\n      response = client.delete(request);\n      System.out.println(response.getStatus());\n      System.out.println(response.getData());\n    }\n}\n","lang":"java"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Issue a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DELETE"]}," request on the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/email-api/categories/sender-addresses-and-domains/"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sender"]}]}," resource to set its status to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Deleted"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"routes","__idx":6},"children":["Routes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Inbound routes are called ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/email-api/categories/parse/"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parseroute"]}]}," in the Mailjet API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"add-route","__idx":7},"children":["Add-Route"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Maps to /inbound/add-route.json"]}]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"PHP","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"<?php\nrequire 'vendor/autoload.php';\nuse \\Mailjet\\Resources;\n$mj = new \\Mailjet\\Client(getenv('MJ_APIKEY_PUBLIC'), getenv('MJ_APIKEY_PRIVATE'));\n$body = [\n    'APIKeyID' => \"\",\n    'Email' => \"miss@mailjet.com\",\n    'Url' => \"\"\n];\n$response = $mj->post(Resources::$Parseroute, ['body' => $body]);\n$response->success() && var_dump($response->getData());\n?>\n","lang":"php"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Bash","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Create : ParseRoute description\ncurl -s \\\n\t-X POST \\\n\t--user \"$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE\" \\\n\thttps://api.mailjet.com/v3/REST/parseroute \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\n\t\t\"APIKeyID\":\"\",\n\t\t\"Email\":\"miss@mailjet.com\",\n\t\t\"Url\":\"\"\n\t}'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Node.js","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"/**\n *\n * Create : ParseRoute description\n *\n */\nvar mailjet = require('node-mailjet').connect(\n  process.env.MJ_APIKEY_PUBLIC,\n  process.env.MJ_APIKEY_PRIVATE\n)\nvar request = mailjet.post('parseroute').request({\n  APIKeyID: '',\n  Email: 'miss@mailjet.com',\n  Url: '',\n})\nrequest\n  .on('success', function(response, body) {\n    console.log(response.statusCode, body)\n  })\n  .on('error', function(err, response) {\n    console.log(response.statusCode, err)\n  })\n","lang":"javascript"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Ruby","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ruby","header":{"controls":{"copy":{}}},"source":"# Create : ParseRoute description\nMailjet.configure do |config|\n  config.api_key = ENV['MJ_APIKEY_PUBLIC']\n  config.secret_key = ENV['MJ_APIKEY_PRIVATE']\n  config.default_from = 'your default sending address'\nend\nvariable = Mailjet::Parseroute.create(apikey_id: \"\",email: \"miss@mailjet.com\",url: \"\")\n","lang":"ruby"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"\"\"\"\nCreate : ParseRoute description\n\"\"\"\nfrom mailjet_rest import Client\nimport os\napi_key = os.environ['MJ_APIKEY_PUBLIC']\napi_secret = os.environ['MJ_APIKEY_PRIVATE']\nmailjet = Client(auth=(api_key, api_secret))\ndata = {\n  'APIKeyID': '',\n  'Email': 'miss@mailjet.com',\n  'Url': ''\n}\nresult = mailjet.parseroute.create(data=data)\nprint result.status_code\nprint result.json()\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Go","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"/*\nCreate : ParseRoute description\n*/\npackage main\nimport (\n\t\"fmt\"\n\t. \"github.com/mailjet/mailjet-apiv3-go\"\n\t\"github.com/mailjet/mailjet-apiv3-go/resources\"\n\t\"os\"\n)\nfunc main () {\n\tmailjetClient := NewMailjetClient(os.Getenv(\"MJ_APIKEY_PUBLIC\"), os.Getenv(\"MJ_APIKEY_PRIVATE\"))\n\tvar data []resources.Parseroute\n\tmr := &MailjetRequest{\n\t  Resource: \"parseroute\",\n\t}\n\tfmr := &FullMailjetRequest{\n\t  Info: mr,\n\t  Payload: &resources.Parseroute {\n      APIKeyID: ,\n      Email: \"miss@mailjet.com\",\n      Url: ,\n    },\n\t}\n\terr := mailjetClient.Post(fmr, &data)\n\tif err != nil {\n\t  fmt.Println(err)\n\t}\n\tfmt.Printf(\"Data array: %+v\\n\", data)\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"package com.my.project;\nimport com.mailjet.client.errors.MailjetException;\nimport com.mailjet.client.MailjetClient;\nimport com.mailjet.client.MailjetRequest;\nimport com.mailjet.client.MailjetResponse;\nimport com.mailjet.client.resource.Parseroute;\npublic class MyClass {\n    /**\n     * Create : ParseRoute description\n     */\n    public static void main(String[] args) throws MailjetException {\n      MailjetClient client;\n      MailjetRequest request;\n      MailjetResponse response;\n      client = new MailjetClient(\"api key\", \"api secret\");\n      request = new MailjetRequest(Parseroute.resource)\n\t\t\t\t\t\t.property(Parseroute.APIKEYID, )\n\t\t\t\t\t\t.property(Parseroute.EMAIL, \"miss@mailjet.com\")\n\t\t\t\t\t\t.property(Parseroute.URL, );\n      response = client.post(request);\n      System.out.println(response.getStatus());\n      System.out.println(response.getData());\n    }\n}\n","lang":"java"},"children":[]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"Count\": 1,\n  \"Data\": [\n    {\n      \"APIKeyID\": \"\",\n      \"Email\": \"miss@mailjet.com\",\n      \"ID\": \"\",\n      \"Url\": \"\"\n    }\n  ],\n  \"Total\": 1\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In order to create a new ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/email-api/categories/parse/"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parseroute"]}]},", issue a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}," request."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"update-route","__idx":8},"children":["Update-Route"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Maps to /inbound/update-route.json"]}]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"PHP","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"<?php\nrequire 'vendor/autoload.php';\nuse \\Mailjet\\Resources;\n$mj = new \\Mailjet\\Client(getenv('MJ_APIKEY_PUBLIC'), getenv('MJ_APIKEY_PRIVATE'));\n$body = [\n    'APIKeyID' => \"\",\n    'Url' => \"\"\n];\n$response = $mj->put(Resources::$Parseroute, ['id' => $id, 'body' => $body]);\n$response->success() && var_dump($response->getData());\n?>\n","lang":"php"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Bash","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Modify : ParseRoute description\ncurl -s \\\n\t-X PUT \\\n\t--user \"$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE\" \\\n\thttps://api.mailjet.com/v3/REST/parseroute/$ID \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\n\t\t\"APIKeyID\":\"\",\n\t\t\"Url\":\"\"\n\t}'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Node.js","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"/**\n *\n * Modify : ParseRoute description\n *\n */\nvar mailjet = require('node-mailjet').connect(\n  process.env.MJ_APIKEY_PUBLIC,\n  process.env.MJ_APIKEY_PRIVATE\n)\nvar request = mailjet\n  .put('parseroute')\n  .id($ID)\n  .request({\n    APIKeyID: '',\n    Url: '',\n  })\nrequest\n  .on('success', function(response, body) {\n    console.log(response.statusCode, body)\n  })\n  .on('error', function(err, response) {\n    console.log(response.statusCode, err)\n  })\n","lang":"javascript"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Ruby","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ruby","header":{"controls":{"copy":{}}},"source":"# Modify : ParseRoute description\nMailjet.configure do |config|\n  config.api_key = ENV['MJ_APIKEY_PUBLIC']\n  config.secret_key = ENV['MJ_APIKEY_PRIVATE']\n  config.default_from = 'your default sending address'\nend\ntarget = Mailjet::Parseroute.find($ID)\ntarget.update_attributes(apikey_id: \"\",url: \"\")\n","lang":"ruby"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"\"\"\"\nModify : ParseRoute description\n\"\"\"\nfrom mailjet_rest import Client\nimport os\napi_key = os.environ['MJ_APIKEY_PUBLIC']\napi_secret = os.environ['MJ_APIKEY_PRIVATE']\nmailjet = Client(auth=(api_key, api_secret))\nid = '$ID'\ndata = {\n  'APIKeyID': '',\n  'Url': ''\n}\nresult = mailjet.parseroute.update(id=id, data=data)\nprint result.status_code\nprint result.json()\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Go","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"/*\nModify : ParseRoute description\n*/\npackage main\nimport (\n\t\"fmt\"\n\t. \"github.com/mailjet/mailjet-apiv3-go\"\n\t\"github.com/mailjet/mailjet-apiv3-go/resources\"\n\t\"os\"\n)\nfunc main () {\n\tmailjetClient := NewMailjetClient(os.Getenv(\"MJ_APIKEY_PUBLIC\"), os.Getenv(\"MJ_APIKEY_PRIVATE\"))\n\tmr := &MailjetRequest{\n\t  Resource: \"parseroute\",\n\t  ID: RESOURCE_ID,\n\t}\n\tfmr := &FullMailjetRequest{\n\t  Info: mr,\n\t  Payload: &resources.Parseroute {\n      APIKeyID: ,\n      Url: ,\n    },\n\t}\n\terr := mailjetClient.Put(fmr)\n\tif err != nil {\n\t  fmt.Println(err)\n\t}\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"package com.my.project;\nimport com.mailjet.client.errors.MailjetException;\nimport com.mailjet.client.MailjetClient;\nimport com.mailjet.client.MailjetRequest;\nimport com.mailjet.client.MailjetResponse;\nimport com.mailjet.client.resource.Parseroute;\npublic class MyClass {\n    /**\n     * Modify : ParseRoute description\n     */\n    public static void main(String[] args) throws MailjetException {\n      MailjetClient client;\n      MailjetRequest request;\n      MailjetResponse response;\n      client = new MailjetClient(\"api key\", \"api secret\");\n      request = new MailjetRequest(Parseroute.resource, ID)\n\t\t\t\t\t\t.property(Parseroute.APIKEYID, )\n\t\t\t\t\t\t.property(Parseroute.URL, );\n      response = client.put(request);\n      System.out.println(response.getStatus());\n      System.out.println(response.getData());\n    }\n}\n","lang":"java"},"children":[]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"Count\": 1,\n  \"Data\": [\n    {\n      \"APIKeyID\": \"\",\n      \"Email\": \"miss@mailjet.com\",\n      \"ID\": \"\",\n      \"Url\": \"\"\n    }\n  ],\n  \"Total\": 1\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In order to update ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/email-api/categories/parse/"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parseroute"]}]},", issue a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PUT"]}," request with its given ID."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"delete-route","__idx":9},"children":["Delete-Route"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Maps to /inbound/delete-route.json"]}]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"PHP","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"<?php\nrequire 'vendor/autoload.php';\nuse \\Mailjet\\Resources;\n$mj = new \\Mailjet\\Client(getenv('MJ_APIKEY_PUBLIC'), getenv('MJ_APIKEY_PRIVATE'));\n$response = $mj->delete(Resources::$Parseroute, ['id' => $id]);\n$response->success() && var_dump($response->getData());\n?>\n","lang":"php"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Bash","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Delete : ParseRoute description\ncurl -s \\\n\t-X DELETE \\\n\t--user \"$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE\" \\\n\thttps://api.mailjet.com/v3/REST/parseroute/$ID \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\n\t}'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Node.js","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"/**\n *\n * Delete : ParseRoute description\n *\n */\nvar mailjet = require('node-mailjet').connect(\n  process.env.MJ_APIKEY_PUBLIC,\n  process.env.MJ_APIKEY_PRIVATE\n)\nvar request = mailjet\n  .delete('parseroute')\n  .id($ID)\n  .request()\nrequest\n  .on('success', function(response, body) {\n    console.log(response.statusCode, body)\n  })\n  .on('error', function(err, response) {\n    console.log(response.statusCode, err)\n  })\n","lang":"javascript"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Ruby","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ruby","header":{"controls":{"copy":{}}},"source":"# Delete : ParseRoute description\nMailjet.configure do |config|\n  config.api_key = ENV['MJ_APIKEY_PUBLIC']\n  config.secret_key = ENV['MJ_APIKEY_PRIVATE']\n  config.default_from = 'your default sending address'\nend\ntarget = Mailjet::Parseroute.find($ID)\ntarget.delete()\n","lang":"ruby"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"\"\"\"\nDelete : ParseRoute description\n\"\"\"\nfrom mailjet_rest import Client\nimport os\napi_key = os.environ['MJ_APIKEY_PUBLIC']\napi_secret = os.environ['MJ_APIKEY_PRIVATE']\nmailjet = Client(auth=(api_key, api_secret))\nid = '$ID'\nresult = mailjet.parseroute.delete(id=id)\nprint result.status_code\nprint result.json()\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Go","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"/*\nDelete : ParseRoute description\n*/\npackage main\nimport (\n\t\"fmt\"\n\t. \"github.com/mailjet/mailjet-apiv3-go\"\n\t\"github.com/mailjet/mailjet-apiv3-go/resources\"\n\t\"os\"\n)\nfunc main () {\n\tmailjetClient := NewMailjetClient(os.Getenv(\"MJ_APIKEY_PUBLIC\"), os.Getenv(\"MJ_APIKEY_PRIVATE\"))\n\tmr := &MailjetRequest{\n\t  Resource: \"parseroute\",\n\t  ID: RESOURCE_ID,\n\t}\n\terr := mailjetClient.Delete(mr)\n\tif err != nil {\n\t  fmt.Println(err)\n\t}\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"package com.my.project;\nimport com.mailjet.client.errors.MailjetException;\nimport com.mailjet.client.MailjetClient;\nimport com.mailjet.client.MailjetRequest;\nimport com.mailjet.client.MailjetResponse;\nimport com.mailjet.client.resource.Parseroute;\npublic class MyClass {\n    /**\n     * Delete : ParseRoute description\n     */\n    public static void main(String[] args) throws MailjetException {\n      MailjetClient client;\n      MailjetRequest request;\n      MailjetResponse response;\n      client = new MailjetClient(\"api key\", \"api secret\");\n      request = new MailjetRequest(Parseroute.resource, ID);\n      response = client.delete(request);\n      System.out.println(response.getStatus());\n      System.out.println(response.getData());\n    }\n}\n","lang":"java"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In order to delete ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/email-api/categories/parse/"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parseroute"]}]},", issue a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DELETE"]}," request with its given ID."]}]},"headings":[{"value":"Inbound Calls","id":"inbound-calls","depth":1},{"value":"Introduction","id":"introduction","depth":2},{"value":"Domains","id":"domains","depth":2},{"value":"Add-Domain","id":"add-domain","depth":2},{"value":"Check-Domain","id":"check-domain","depth":2},{"value":"Delete-Domain","id":"delete-domain","depth":2},{"value":"Routes","id":"routes","depth":2},{"value":"Add-Route","id":"add-route","depth":2},{"value":"Update-Route","id":"update-route","depth":2},{"value":"Delete-Route","id":"delete-route","depth":2}],"frontmatter":{"title":"Inbound Calls","seo":{"description":"Replace Mandrill inbound email with Mailjet’s Parse API. parseroute maps to /inbound/domains, add-domain, add-route, update-route, and delete-route calls.","priority":0.3,"title":"Inbound Calls"}},"lastModified":"2026-08-26T10:53:57.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/mandrill/inbound-calls","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}