https://retellai.com/?utm_source=discord&utm_medium=seo logo
Custom Function Error 400
# ❓・bug-report
q
I'm trying to make a custom function URL call but it's giving me error 400. Talked to a dev, he said the error is from Retell's end. It's an URL endpoint from ServiceTitan and it's 100% correct, but Retell is giving the 400 issue.
@utkarshmarwaha the community says you are the God with things like this?
e
...
q
Hey @eviewang_ any way to forward this to retell devs to take a look for why it's failing? The url is: https://api.servicetitan.io/dispatch/v2/tenant/2576973978/capacity
n
What you have defined in the parameters is incorrect. The parameters section expects a JSON schema of the request body
Also the name of the tool you have specified is in double curly braces. I think that should not contain curly braces
q
Hi NJ, can I ask how would you write it?
n
Just copy paste what you have right now in the parameters section in that above link I sent (json to json schema) and then copy what you see on the right side in that tool (the json schema corresponding to that json) in retell
Like this. Copy the right side thing in retell
Thats the "schema". It tells retell the "shape" of the incoming json for that API. Retell doesnt need the actual JSON, they need the "shape"
q
OMFG it worked @NJ no error. I'll test the function call tomorrow. YOU ARE A LEGEND.
LEGEND I SAY!!
e
🚀
thanks!!!
n
Btw @Qcumbers | CC not to spoil your fun but the custom function call will not work just yet😅 You see the ServiceTitan API is not being called "directly" by retell. Instead they pass a specific "payload" for which you will have to write an "intermediate" hosted API (using node or python or make.com or any other tool), which will then call the service titan api and get the response
q
@NJ sigh....can I hire you.