Chat with your AI agent over the REST API

Call your IntelliDesk AI agent from any backend: 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

  1. Create a secret key under API keys (keep it on your server).
  2. Name the user with user: { id, email, name } so the chat lands on their contact (or send an anonymous visitorId). Pass conversationId to continue a thread.
  3. Add "stream": true to get tokens as server-sent events.
bash
curl -X POST https://YOUR_APP/api/v1/agents/AGENT_ID/chat \
  -H "Authorization: Bearer $INTELLIDESK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "Do you ship to Canada?", "user": {"id": "user-123", "email": "ada@example.com"}}'

Replace AGENT_ID with your agent's id and keep the key in your server's environment.

Next