Tobias
(Tobias Tiehmann)
1
Hi,
I am currently trying to create a new category via curl POST request. I am using the following Command:
“curl -v -u (myapikey):X -X POST -H ‘Content-Type: application/json’ -d ‘{ “name”:“TEST”, “description”:“Test”}, “visible_in_portals”:[1]’ https://(mydomain)/api/v2/solutions/categories”
But i get the following response:
" * Connection #0 to host support.elbcloud.de left intact
{“code”:“invalid_json”,“message”:“Request body has invalid json format”}%"
I used the Command provided by Freshdesk, the only thing I changed, is that I wanted to use the API rather than basic auth. Link: Service Desk API for Developers | Freshservice
Can someone help me?
Hi @Tobias
Welcome to the Freshworks developer community!
It seems the "visible_in_portals":[1]'
should be sent inside data. Could you please check the curl?
ref:
curl -u user@yourcompany.com:test -H “Content-Type: application/json” -X POST -d ‘{ “name”:“API”, “description”:“API related documents”, “visible_in_portals”:[1] }’ https://domain.freshservice.com/api/v2/solutions/categories
1 Like
Tobias
(Tobias Tiehmann)
3
Hi, unfortunately this doesn’t help. I get the following Message:
zsh: no matches found: “visible_in_portals”:[1]
system
(system)
Closed
4
This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.