Tricky API call (x-www-form-urlencoded)

Hello, I have to use an API call with this documentation

I keep getting an invalid request error. I think the problem is the “fields” field.

If I add double quotes, Make escapes them.
For example, if I set the value like this

I get this input bundle
{


                "key": "fields",
                "value": "\"name\":\"value\""
            }

Is this the issue or is this expected?

The same happens even when I enclose “name”:“value” in curly brackets.

What should I do?

1 Like

Hi @AlbertoCabasVidani

The value of the fields should be a JSON object as in the example. You can use the Create JSON module and populate the output into the fields field.

1 Like

Thanks.
I used that exact same syntax in the HTTP module, as shown in your screenshot.
I also tried the Create JSON module, but to no avail

1 Like

@AlbertoCabasVidani, please provide the screenshots of the HTTP module setup.

1 Like

@AlbertoCabasVidani

  1. Please delete the screenshot with the API key if it’s a real API key.
  2. Does a contact with this email exist in the MailRush database?
  3. Can you try updating the contact with one fields variable {“name”:“Test Name”}?
  4. Please share the error screenshot.
  1. Done, thanks for pointing that out.
  2. Yes
  3. already done
  4. Here’s the screenshot
    image
1 Like

@AlbertoCabasVidani, can you try the API request they have in the Postman docs?

Yes, it times out after 30 seconds

1 Like

@AlbertoCabasVidani, it’s hard to suggest something without seeing the logs. However, does this contact belong to the campaign you specified in the API request?

Yes. Unfortunately Make’s logs show a successful API call with the 400 message I pasted above.

1 Like