Use your AI support agent from Python
Call your IntelliDesk AI agent from Python: send a user's question, get the answer with sources, and continue the conversation. Your snippet, with your agent filled in, is in the dashboard under Deploy → Install; it also confirms when the chat is live on your site.
Steps
- Same endpoint from Python.
python
import os, requests
r = requests.post(
"https://YOUR_APP/api/v1/agents/AGENT_ID/chat",
headers={"Authorization": f"Bearer {os.environ['INTELLIDESK_API_KEY']}"},
json={"message": "Do you ship to Canada?", "user": {"id": "user-123"}},
timeout=60,
)
print(r.json()["data"]["reply"])Replace AGENT_ID with your agent's id and keep the key in your server's environment.
Next
- Every field, streaming and errors: REST API reference.
- New leads and conversations in your app as they happen: webhooks.
- All guides: Platform guides.