Overview
The AI processing endpoint allows you to send text messages, images, audio, and PDFs for intelligent analysis. The system can respond synchronously or asynchronously (via postback).Main Endpoint
POST
/ai/processPayload Parameters
Tenant ID (obtained from dashboard)
ID of the lead sending the message
Sender role:
user, assistant, human, systemMessage content
Message type:
text, image, audio, pdfMedia URL (required for types other than
text)When
true, accumulates messages and sends response via postbackURL to receive the response (required when
debounce: true)Request Example
Message Types
Text
Text
Simple text message.
Image
Image
Send an image for visual analysis.
Audio
Audio
Send audio for transcription and analysis.
PDF
Send a PDF for content extraction.
Debounce Mode
Debounce mode is useful when you want to accumulate multiple messages before processing.
How It Works
- When
debounce: true, the system accumulates messages for a configured time - After the debounce time, all messages are processed together
- The response is sent to the
postback_url
Request Flow
Synchronous Response (without debounce)
Whendebounce: false, the response is returned immediately:
Postback Response
Whendebounce: true, the postback receives: