Skip to main content

Hi there, I am trying to convert the following cURL POST request to a webhook by Zapier (tried both Custom Request option and the POST option) and I’ve been having some trouble. Would love to know what I’m doing wrong! In my production instance, I have updated <YOUR_API_KEY> with the relevant value.

 

cURL request:

curl --request POST \
'https://predict.vellum.ai/v1/generate' \
--header 'accept: application/json' \
--header 'X-API-KEY: <YOUR_API_KEY>' \
--header 'content-type: application/json' \
--data-raw '{
    "deployment_name": "km-test-zapier-1",
    "requests": e
        {
            "input_values": {
                "context_str": "<your-context_str-value>",
                "query_str": "<your-query_str-value>",
                "anti_context_str": "<your-anti_context_str-value>",
                "raw_data": "<your-raw_data-value>"
            }
        }
    ]
}'

 

Zapier screen shot:

 

I’m getting the following error: “JSON parse error - Expecting value: line 1 column 1 (char 0) (HTTP Status Code: 400)”

I suspect I’m not doing something correctly with the quotation marks and so it’s not able to read the above as JSON but I’m not sure where to fix that. When I run the cURL request on my Terminal, it works fine!

Hi @kothariy 

Good question.

Try this…

Remove remove the lead --data-raw ‘

Remove the trailing ‘

The Data should start and end with { }