How it works
- The visitor asks something your bot can’t answer from its training alone – like “Where’s order 4172?”.
- The AI fills in the request from the chat (here, the order number) and calls your endpoint.
- Your API replies with the data.
- Chatref feeds that reply back to the bot, which uses it to finish its answer – “Order 4172 shipped yesterday and arrives Friday.”
What you configure
- Method – the HTTP method, defaulting to POST. You can also pick GET, PUT, PATCH, or DELETE.
- URL – your API endpoint.
- Request Body Fields – the inputs the AI fills from the chat. Each field has a Field Name, a type, whether it’s Required, and a Description that tells the AI what to put there. These become the inputs the bot supplies when it calls your API.
- Headers – extra header keys and values. Put auth tokens here.
1
Open the Actions tab
In your agent’s dashboard, go to the Actions tab and create a new action.
2
Choose API / Webhook
Pick API / Webhook as the action type.
3
Name it and describe when to use it
Name the action, like “Check order status”, and write a description that tells
the AI when to call it – for example, “Use this to look up an order by its
order number.”
4
Set the method and URL
Choose the Method (default POST) and enter your endpoint URL.
5
Add request body fields
Click Add Field for each input the AI should send – for an order lookup,
one field named
orderNumber. Add a Description for each so the AI knows
what value to fill in.6
Add headers and save
Click Add Header for any auth tokens or content type your endpoint needs,
then save. Your bot can now call your API whenever the chat matches your
description.
Seeing calls
Each call is recorded in the Action Submissions table – see Custom Actions for how to read it. GET lookups are not recorded; other methods are.Next steps
Custom Actions
How actions work and the three types.
Form action
Collect details from the visitor instead.
Button action
Show a one-tap button in the chat.
Knowledge Base
Train your bot on your own content.