Invalid_params_field error in http request

Hey Guys, i’m triyng to make a http request, but i don’t know how to resolve this

my code:

curl -X POST https://api2.transloadit.com/assemblies
-H ‘Content-Type: application/json’
-d ‘{
“steps”: {
“import”: {
“robot”: “/http/import”,
“url”: “pic.url”
},
“watermark”: {
“use”: “import”,
“robot”: “/image/resize”,
“watermark_url”: “pic.png”,
“watermark_size”: “25%”,
“watermark_position”: “bottom-right”,
“imagemagick_stack”: “v2.0.7”
}
},
“allow_steps_override”: true,
“auth”: {
“key”: “xxxxxxxxxxxx”,
“expires”: “2021/08/22 17:00:42+00:00”
},
“template_id”: “xxxxxxx”
}’

and a get the error below:

{“error”:“NO_PARAMS_FIELD”,“message”:“No params field provided.”,“http_code”:400}

i have no idea whats parameters is.

Thanks.

The params field is used to provide form fields for the API. Here is a doc that helps to explain to it: API Docs | Transloadit

Regarding your code, the params field is placed in the “-d” section. The Content-Type header has to be removed otherwise it causes the HTTP request to fail. Here is a working example that shows how to use the params field:
curl -XPOST -d ‘params={
“auth”: {
“key”: “*************”
},
“steps”: {
“imported”: {
“robot”: “/http/import”,
“url”: “url.pic”
},
“watermark”: {
“robot”: “/image/resize”,
“use”: “imported”,
“watermark_url”: “url.pic”,
“watermark_size”: “25%”,
“watermark_position”:“bottom-right”,
“imagemagick_stack”:“v2.0.7”
}
}
}’ ‘https://api2.transloadit.com/assemblies