Skip to main content
Your knowledge base holds the rules. Function calling fetches the current state: an order status, a stock level, a free slot. You give an address and say when the bot should use it; Chatwize calls it during the conversation.

Where to find it

1

Open your chatbot

From Chatbots, click your chatbot.
2

Open AI agent

In the left sidebar, under Main menu. Open the agent that should get this ability.
3

Add an endpoint

Under Outbound API endpoints, click Add endpoint.

What you fill in

Write the description as an instruction: “Looks up an order by order number. Call this when the visitor asks where their order is.” Not: “Order API”.

Example

Order lookup on https://api.example.com/orders.
Parameters
Chatwize calls …/orders?order_number=10423. You reply:
The visitor reads: “Your order is on its way with PostNL and expected on 25 September.”
Stock — “Returns the stock of one product. Call this when the visitor asks whether something is in stock.”
Availability — an enum keeps the bot within your categories.
A date arrives as text. Check it yourself.Callback request — a write action via POST. Prevent duplicate requests on your side.
No parameters{}. Opening hours, for example. The best endpoint to start with.
WooCommerce: https://yourstore.com/wp-json/wc/v3/orders with parameter search, and your consumer key and secret in an Authorization header. Shopify and Magento work the same way: GET with query parameters, token in a header.Fixed values go in the URL yourself (?per_page=1); the AI cannot overwrite those.
A read key sees every order — anyone who guesses an order number gets its status. Put your own endpoint in front that requires order number and email address and returns only a few fields.

The schema

One flat object. Properties of type string, number, integer or boolean, optionally with an enum. No nested objects or arrays. The description is what the AI reads. Everything in the schema can be influenced by what the visitor types. So this never belongs in it:
A parameter customer_id gets filled with whatever the visitor says. Who gets the data is decided by your own system — never by the conversation.

What you receive

JSON over HTTPS, with your headers and a signature. Verify the signature: then you know the request came from Chatwize and was not altered. You see the secret once, when you create the endpoint.
Two headers: X-Chatwize-Outbound-Timestamp (moment of sending) and X-Chatwize-Outbound-Signature (sha256= plus an HMAC-SHA256 over <timestamp>.<content>). The content is the raw body for POST, PUT and PATCH, and the query string for GET.
Sign over the raw body, compare with timingSafeEqual / compare_digest / hash_equals (never ==), and include the ? for GET.

What you send back

JSON, within five seconds, small. Only the start of a long response reaches the AI. Anything you send can end up in the chat.

Keep it safe

Anything your bot may call, any visitor can indirectly cause it to call.
  • Authorise on your side. The signature proves it came from Chatwize, not that this visitor is entitled to this data.
  • Prefer read over write. Automatic calling off while testing.
  • Return as little as possible.
  • Separate key in a header, with as few rights as possible.
  • Public address that answers directly. Internal addresses and redirects do not work.

When it does not work

Every call is in the inbox: which endpoint, which parameters, what came back.