1002 Invalid Domain error when using API to create new zone

Hi. I’m having this issue:

For GET it is working fine, but for POST to create a new zone it is not working for me.

I’m doing exactly what is stated at the API → api(dot)Cloudflare(dot)com/#zone-create-zone

What seems to be the issue? Everything seems to be fine.

This is what I’m doing using Postman:

Appreciate your help.

The parameters are not sent URL parameters but as a JSON body so it should look like

{
  "name": "<your domain>",
  "account": {"id": "<account id>"},
  "jump_start: true,
  "type": "full"
}

You would set this under Body then select JSON body in Postman.

4 Likes

Hi. I’m having the same issue but:

Yes, for GET it is working fine, but for POST to create a new zone it is not working for me.

I’m doing exactly what is stated in here api. Cloudflare. com/#zone-create-zone

Appreciate your help.

You didn’t follow what I said to do.

2 Likes

Thanks a lot.

This is the reason then. I appreciate your help. Just a doblequote missing at the end of jump_start , but I added it and it worked.

{
  "name": "<your domain>",
  "account": {"id": "<account id>"},
  "jump_start": true,
  "type": "full"
}

Yes. I did. It’s just that the admin brought the same question from another thread. Thanks for your help.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.