Many enquiries about a used part are the same three questions: does it fit my vehicle, what does shipping cost, what condition is it in. They arrive in the evening and at weekends, and whoever waits until Monday buys elsewhere. A form captures the question but does not answer it.
The website channel is built as a browser gateway, not as a Hub call with a hidden credential: the widget authenticates with a channel key that can be rotated at any time. Your API key stays on the server, where it belongs.
| Surface | Roles |
|---|---|
| Sales agent | Parts trading, Vehicle trading, Platform and marketplace |
What this case requires
- A configured profile. The agent answers according to its instruction; without a profile there is no tone, no rules and no permissions.
- A website channel with allowed origins.
allowedOriginsdefines which addresses the widget may speak from — that is the protection against misuse of the channel key. When setting up the widget and when starting a conversation, the Origin of the request must be one of these origins; otherwise the gateway answers withorigin_not_allowed. - The visitor token.
GET /web/channelissues it; the gateway expects it back in theX-Agent-Visitorheader. - Somewhere for handovers to land.
needsHumanwithout an inbox is a warning nobody reads.
The sequence
The table names the responsible call per stage and what exists afterwards. The reasoning for why a stage cannot be skipped follows below it.
| Stage | Call | What exists afterwards |
|---|---|---|
| Set up the widget | GET /web/channel | title, greeting, accentColor, locale and maxMessageChars for the surface |
| Start the conversation | POST /web/conversations | conversationId plus the first reply, with needsHuman and owner |
| Keep answering | POST /web/conversations/{conversationId}/messages | One reply per turn with seq; the same clientMessageId returns the stored reply |
| Close the conversation | POST /web/conversations/{conversationId}/close | A closed conversation that stays traceable in the inbox |
Why each stage is needed
- Set up the widget.
GET /web/channelreturnstitle,greeting,accentColor,locale,pollIntervalSecondsandmaxMessageChars. The surface is therefore not hard-wired in the script but loaded from the channel — changing the greeting needs no new page build. - Start the conversation.
POST /web/conversationsaccepts the first message and immediately performs the first turn. Back comeconversationId,seqand the reply, plusneedsHumanandowner. A second call for the first reply would be avoidable waiting. - Keep answering.
POST /web/conversations/{conversationId}/messagesperforms every further turn. TheclientMessageIdmatters more than it looks: if a message is sent again with the sameclientMessageId, the call returns the stored reply instead of running again. - Close the conversation.
POST /web/conversations/{conversationId}/closeends it. Closed does not mean deleted — the history stays traceable in the inbox, and that is exactly what you need in a complaint.
curl -X POST \
-H 'X-Agent-Channel-Key: <KANALSCHLUESSEL>' \
-H 'X-Agent-Visitor: <BESUCHERTOKEN>' \
-H 'Content-Type: application/json' \
-d '{"message":"Passt der Scheinwerfer an einen Golf 7 Facelift?","clientMessageId":"m-1"}' \
'https://api.tapinomahub.com/agent/api/index.php/web/conversations'What you end up with
In the end the website answers the recurring questions itself and passes the rest, with their history, to a colleague. The visitor does not wait until Monday, and the colleague does not start from zero.
Where to find this in the documentation
The binding field lists, error codes and sample responses live in this surface’s OpenAPI contract at docs.tapinomahub.com (tapinoma-agent). All use cases arranged by surface and role: overview of the use cases.
Sources and legal references
Frequently asked
Does my API key end up in the browser?
No. The widget authenticates with a channel key valid only for that channel, and it can be rotated. The API key stays server-side.
What if a stranger copies the channel key?
That is what the allowed origins and the ability to rotate the channel key are for. On top of that, turns per visitor and conversations per hour can be capped.
Can I change the greeting without rebuilding the page?
Yes. The widget loads title, greeting and accent colour from the channel. A change to the channel takes effect on the next load.
