Chat
Send a message to a specific AI Agent and receive a response. This endpoint is useful for headless integrations where you want to query your AI Agent programmatically from your own backend.
POST
/chatRequest parameters
Section titled “Request parameters”Body
agent_idstringrequiredThe UUID of the agent you want to send the message to.
messagestringrequiredThe user message to send to the agent.
Headers
AuthorizationstringrequiredYour API Key formatted as Bearer sk_live_…
Response
Section titled “Response”successbooleanIndicates whether the request was successfully processed.
messagestringThe AI Agent’s reply to your message.
curl -X POST https://app.picobot.dev/api/chat \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"agent_id": "91981020-f783-4544-ad96-39857ac589cb", "message": "What is your refund policy?"}'fetch('https://app.picobot.dev/api/chat', { method: 'POST', headers: { 'Authorization': 'Bearer <token>', 'Content-Type': 'application/json' }, body: JSON.stringify({ agent_id: '91981020-f783-4544-ad96-39857ac589cb', message: 'What is your refund policy?' })}).then(res => res.json()).then(console.log);import requests
headers = { "Authorization": "Bearer <token>" }response = requests.post( "https://app.picobot.dev/api/chat", headers=headers, json={ "agent_id": "91981020-f783-4544-ad96-39857ac589cb", "message": "What is your refund policy?" })print(response.json()){ "success": true, "message": "We offer a 30-day money-back guarantee on all plans. To request a refund, please contact our support team."}