Phone and chat assistants for your business, through one API
Teach it what you sell, put it on your website and phone line, and hear what it did. Start in a sandbox with test keys.
curl https://app.airfone.app/v1/knowledge/search \
-H "Authorization: Bearer $AIRFONE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "भेन्डिङ मेसिन कति पर्छ",
"audience": "public"
}'const res = await fetch('https://app.airfone.app/v1/knowledge/search', {
method: 'POST',
headers: {
Authorization: 'Bearer af_sk_test_...',
'Content-Type': 'application/json',
},
body: JSON.stringify({
query: 'भेन्डिङ मेसिन कति पर्छ',
audience: 'public',
}),
});
const { facts, passages } = await res.json();import requests
res = requests.post(
"https://app.airfone.app/v1/knowledge/search",
headers={"Authorization": "Bearer af_sk_test_..."},
json={
"query": "भेन्डिङ मेसिन कति पर्छ",
"audience": "public",
},
)
data = res.json() # {"facts": [...], "passages": [...]}POST /v1/knowledge/search 200 OK
{
"facts": [
"Vending machine: Costs Rs 45,000"
],
"passages": [
{
"title": "Price list",
"text": "Vending machine, standard model: Rs 45,000. Installation is included in Kathmandu Valley.",
"score": 0.82
}
]
}What your integration does
Teach it what you sell
Push your products, prices and policies as records from your own systems, or connect your website and let AirFone read it.
POST /v1/knowledge/sources/{source}/recordsPOST /v1/knowledge/connectionsPut it on your website
Add one script tag with your publishable key. Visitors can type or talk to the assistant from any page.
<script src="https://developers.airfone.app/widget.js" data-key="af_pk_..." async></script>Find what it knows
Ask a question and get back the facts and passages the assistant would use to answer it, for your own app or chatbot.
POST /v1/knowledge/searchHear what happened
Receive signed events as calls and chats finish, instead of polling for them.
POST /v1/webhook_endpoints