Endpoints
API channel (AI chat)
Run your AI agent from your own app or website. Turn the channel on under Channels → API first. These routes take an API key only.
Οι διαδρομές είναι σχετικές με το βασικό URL. Κάθε κάρτα δείχνει το δικαίωμα που απαιτεί η κλήση και κάθε παράμετρο, με τον τύπο και τα όριά της.
/messagesSend a customer message to the AI agent. The agent replies a little later, like in a real DM: to the callback URL set under Channels → API, or poll GET /conversations/:id/messages.
Σώμα JSON
- messageυποχρεωτικόstring
The customer's message.
- conversationIdπροαιρετικόinteger
Continue an API-channel conversation. Omit to start a new one.
- messageIdπροαιρετικόstring
Your ID for this message, used to ignore duplicates.
- externalUserIdπροαιρετικόstring
Your ID for the customer.
- externalUsernameπροαιρετικόstring
The customer's username in your app.
- externalFirstNameπροαιρετικόstring
The customer's first name.
- externalChatIdπροαιρετικόstring
Your chat or thread ID.
- Answers 202 { conversationId, status: "buffering", delivery: "callback" | "polling" }.
- 403 when the API channel is not enabled under Channels → API.
/chatSynchronous one-shot chat: send a message and wait for the AI reply. Answers { conversationId, response, messages }.
Σώμα JSON
- messageυποχρεωτικόstring
The customer's message.
- conversationIdπροαιρετικόinteger
Continue a conversation.
- externalUserIdπροαιρετικόstring
Your ID for the customer.
- externalUsernameπροαιρετικόstring
The customer's username in your app.
- externalFirstNameπροαιρετικόstring
The customer's first name.
- externalChatIdπροαιρετικόstring
Your chat or thread ID.
/agentsReturns the workspace's agent as [{ id, systemPrompt }], or [] before setup.