curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/webhook-chat-message \ -H "Content-Type: application/json" \ -d '{ "widget_key": "wgt_a1b2c3d4e5f6789012345678", "message": "Hi, I have a question about your services", "visitor_id": "v_abc123def456", "page_url": "https://example.com/pricing" }'
Copy
{ "session_id": "e5f6a7b8-c9d0-1e2f-3a4b-567890cdef12", "aiResponse": "Hello! I'd be happy to help you learn about our services. What specific questions do you have?", "aiMessageId": "f6a7b8c9-d0e1-2f3a-4b5c-678901def234"}
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/webhook-chat-message \ -H "Content-Type: application/json" \ -d '{ "widget_key": "wgt_a1b2c3d4e5f6789012345678", "message": "Hi, I have a question about your services", "visitor_id": "v_abc123def456", "page_url": "https://example.com/pricing" }'
Copy
{ "session_id": "e5f6a7b8-c9d0-1e2f-3a4b-567890cdef12", "aiResponse": "Hello! I'd be happy to help you learn about our services. What specific questions do you have?", "aiMessageId": "f6a7b8c9-d0e1-2f3a-4b5c-678901def234"}
Send a visitor message to a chat session and receive an AI response. This endpoint is used by the embeddable chat widget.
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/webhook-chat-message \ -H "Content-Type: application/json" \ -d '{ "widget_key": "wgt_a1b2c3d4e5f6789012345678", "message": "Hi, I have a question about your services", "visitor_id": "v_abc123def456", "page_url": "https://example.com/pricing" }'
Copy
{ "session_id": "e5f6a7b8-c9d0-1e2f-3a4b-567890cdef12", "aiResponse": "Hello! I'd be happy to help you learn about our services. What specific questions do you have?", "aiMessageId": "f6a7b8c9-d0e1-2f3a-4b5c-678901def234"}