Your chatbots are accessible via REST API. The endpoints to deployed ChatBots are publicly accessible unless you choose to attach a Smarter API key. HTTP requests should substantially conform this command structure:
curl --location 'https://example.3141-5926-5359.api.smarter.sh/chatbot/' \
--header 'x-api-key: api-key-string-of-around-64-hashed-characters' \
--header 'Content-Type: application/json' \
--data '{
"messages": [
{
"role": "user",
"content": "what is FMLA?"
}
],
"chat_history": [
{
"message": "Hello, How can I help you?",
"direction": "incoming",
"sentTime": "11/16/2023, 5:53:32 PM",
"sender": "system"
}
]
}'
Your chatbot can also run in a pre-production ‘sandbox’ mode from inside the Smarter web console.
The Smarter application stack provides consistent behavior for any of three different domain name styles
- Default ChatBot domain names: [subdomain].[####-####-####].[environment].smarter.sh/chatbot/
- Customer’s custom domain names: [subdomain].example.com/chatbot/
- The Smarter API: /api/v0/chatbots/[int]/[ChatBot.name]