Nonsensical Error Message when Enabling Email Routing

I’m trying to use the enable email routing function like so:

It returns this error message:

"messages":[{"code":2007,"message":"Invalid Input: must be a a subdomains of"

That is not my typo, it literally says “be a a subdomains”.

My zone is configured with DNS and working. This is strange. I tried several other domains, same issue.

Thanks for reporting this!

Are you able to share, the code or curl command for the API call you are making, with the API token redacted?

I’m using a java unirest library. I do this for all my CF API calls, not really something I can cut and paste. And this API method was working for me for more than a year, so something changed in the past couple months

The only data passed is the zone identifier in the URL, if you want one of my zone identifiers I can send privately.

How do I report this bug? The API method was broken recently.

Here is the method:

Here is a sample call:

HttpResponse<String> response ="")
  .header("Content-Type", "application/json")
  .header("X-Auth-Email", "")

Hello. I can confirm this bug/error. Here sample output from my PHP script.

Trying to to POST to{zone_identifier}/email/routing/enable (

The HTTP header:

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'X-Auth-Email: '.$email.'',
    'X-Auth-Key: '.$apikey.'',
    'Cache-Control: no-cache',
    'purge_everything: true'

Enable email routing result:

Sending JSON: {}
  "result": null,
  "success": false,
  "errors": [
      "code": 2007,
      "message": "Invalid Input: must be a a subdomains of"
  "messages": [
      "code": 2007,
      "message": "Invalid Input: must be a a subdomains of"

Thank you.

I would like to add that the API documentation must be wrong when getting invalid input from that post endpoint when there are no post fields in the current documentation?

Hard remark on:


$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "",
    "Content-Type: application/json",
    "X-Auth-Email: "

$response = curl_exec($curl);
$err = curl_error($curl);


if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;