https://retellai.com/?utm_source=discord&utm_medium=seo logo
what is the chat agent custom function payload str...
# ❓・ai-evy-support
m
@AI Evy what is the chat agent custom function payload structure
a
Thanks for tagging me @Maurizio Isendoorn. I'll look through relevant sources and get back to you shortly.
### Answer The custom function request payload structure for Retell AI includes the following components [(1) ]() [(2) ]() : Request Headers: - `X-Retell-Signature`: encrypted request body using your secret key for verification -
Content-Type: application/json
Request Body (for POST, PUT, and PATCH requests) : - `name`: the name of the custom function - `call`: the call object for context, including real-time transcript up to when the request is sent - `args`: the arguments for the custom function, as a JSON object Important Note: If Payload: args only is enabled for a function, the body contains only the argument object with no
name
,
call
, or
args
wrapper . In this case, parameters appear at the top level of the JSON request . Response Format: Response should have a status code between 200-299 to indicate success [(2) ]() . The response can be in various formats (string, buffer, JSON object, blob) , and all will be converted to string before sending to the LLM . The function result is capped at 15,000 characters .
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy Now this is specifically for chat agents. They do not have, or at least that's my question, "call" in their request body, or is that going to be "chat"?
a
Thanks for the follow-up, @Maurizio Isendoorn. I'll get back to you soon.
### Answer I don't have information in the available sources that specifically documents the custom function payload structure for chat agents or whether chat agents use a different property name (like "chat" instead of "call") in their request body [(1) ]() . The documentation I have access to describes the custom function request structure with the
call
object, but it doesn't explicitly differentiate between voice agents and chat agents for this payload structure . I'd recommend testing with a chat agent to see the actual payload structure, or reaching out through one of these support channels for clarification: - Visit [Documentation]() - Visit [Hire certified Retell partner]() Would you like a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.