Robofy API
HomeChangelog
HomeChangelog
Visit Website
Sign In
Create an account
  1. Chat
  • Start Guide
    • Overview
    • Architecture
    • Authentication
    • Changelog
  • Robofy API
    • Chat
      • Generate Client Token (Handshake)
        POST
      • Send Message (Streaming)
        POST
      • Send Message (Non Streaming)
        POST
      • Send WhatsApp Message
        POST
    • Chatbot / Agent
      • List Agents
      • Create Agent
      • Retrieve Agent
      • Update Agent
      • Delete Agent
      • Delink Asset
      • List Linked Assets
      • Delete Widget Tab
    • Account
      • Retrieve Account Details
      • Update Account Details
      • Retrieve Account Limit
    • Prompt & Persona
      • Update System Prompt
      • Retrieve Agent Settings
      • Update Persona
      • Retrieve Persona
    • Inbox
      • List Sessions
      • List Session Messages
    • Project
      • Create Project
      • List Projects
      • Update Project
      • Retreive Project
    • Leads
      • List Leads
    • Content
      • Add Website
      • Get Crawl Status
      • Add Text Content
      • Add File
    • Stats
      • Stats
    • License
      • Create License
      • List License
      • Update License
      • Retrieve License
      • Delete License
      • Update License Limit
    • Partner
      • Onboard
    • Schemas
      • Account
      • AccountDetailDto
      • Address
      • AgentCredentialInsertResponseDto
      • AgentCredentialRequestDto
      • AgentCredentialResponseDto
      • AgentDataPoint
      • AgentLeadCapture
      • AgentLeadReportDto
      • AgentLinkageDto
      • AgentMcpServerDto
      • AgentMcpServerInsertResponseDto
      • AgentMcpServerRequestDto
      • AgentMcpServerUpdateRequestDto
      • AgentPromptVersionDto
      • AgentSessionListDto
      • AgentSessionListItemDto
      • AgentStatsDto
      • AgentThemeDto
      • AgentThemeListDto
      • AgentToolLinkageInsertResponseDto
      • AgentToolLinkageRequestDto
      • AgentWhatappIntrgrationResponse
      • AgentWhatsAppLinkageDto
      • Button
      • CarouselCard
      • CategoryStats
      • ChatBotDetailsDto
      • ChatBotDetailsRequest
      • ChatBotDetailsUpdateRequest
      • ChatbotAISettingsDto
      • ChatbotAISettingsRequest
      • ChatbotAdvanceSettingsDto
      • ChatbotAdvanceSettingsRequest
      • ChatbotAppearanceSettingsDto
      • ChatbotAppearanceSettingsRequest
      • ChatbotAssetDelinkDto
      • ChatbotAssetLinkageDataDto
      • ChatbotAssetLinkageDelinkRequest
      • ChatbotAssetLinkageDetailsDto
      • ChatbotAssetLinkageDto
      • ChatbotAssetLinkageRequest
      • ChatbotTextLinkageRequest
      • ClientData
      • CommonResponse
      • Component
      • Contact
      • ContactName
      • CrawlStatusDto
      • CrawlWebsiteRequest
      • CreateOrUpdateProjectRequest
      • CreatePhoneNumberRequest
      • CreateTemplateRequest
      • CreateWebhookConfigRequest
      • DeLinkWhatsAppRequest
      • Email
      • Error
      • ErrorResponse
      • Example
      • FailureStats
      • FailureStatsDataPoint
      • FormField
      • GoogleSheetDto
      • GoogleSheetIntegrationRequest
      • InboxChatDto
      • InboxDto
      • InboxMessage
      • InboxSession
      • IntelligentMetricsDto
      • Interactive
      • InteractiveAction
      • InteractiveBody
      • InteractiveButton
      • InteractiveFooter
      • InteractiveHeader
      • InteractiveMedia
      • InteractiveProductItem
      • InteractiveProductSection
      • InteractiveReply
      • InteractiveRow
      • InteractiveSection
      • LeadCaptureForm
      • LeadData
      • LeadDataField
      • LeadFormData
      • LeadReport
      • LicenseCreateRequest
      • LicenseDto
      • LicenseLimitRequest
      • LicenseUpdateRequest
      • LimitedTimeOffer
      • LinkWhatsAppRequest
      • LinkedCredentialDto
      • LinkedMcpServerDto
      • Location
      • Media
      • MessageMetaData
      • MessageRequest
      • MessageResponse
      • MessageStats
      • MessageStatsDataPoint
      • MessageTemplate
      • NamedParameter
      • OrgLimitDto
      • Organization
      • PaginatedWebhookLogsResponse
      • Part
      • PartnerClientSession
      • PartnerClientSessionDto
      • Phone
      • PhoneNumberRequest
      • PhoneVerifyCodeRequest
      • PhoneVerifyRequest
      • PlatformStats
      • ProjectDetailDto
      • ProjectWABADetail
      • Reaction
      • ReadTypingIndicatorRequest
      • RecentInsightDto
      • Response
      • SessionInsightItemDto
      • SessionInsightsDto
      • SessionMetaDto
      • SessionMetricsDto
      • SessionSummaryDetailDto
      • StartUrl
      • SubcribedAppsRequest
      • SupportedApp
      • TemplateAction
      • TemplateButtons
      • TemplateCarousel
      • TemplateComponent
      • TemplateCurrency
      • TemplateDateTime
      • TemplateLimitedTimeOffer
      • TemplateMedia
      • TemplateParameter
      • TemplateProductItem
      • TemplateSection
      • TemplateTapTargetConfiguration
      • Text
      • ThemeMetaDto
      • TypingIndicator
      • UpdateOnboardStatusRequest
      • UpdateOnboardStatusResponseDto
      • UploadMedia
      • Url
      • WABADetail
      • WABADto
      • Webhook
      • WebhookConfigDto
      • WebhookConfiguration
      • WebhookLogDto
      • WebsiteDto
      • WhatsAppBusinessApiData
      • WhatsAppBusinessProfile
      • WidgetIntegration
  1. Chat

Send WhatsApp Message

POST
/v1/ai-agent/whatsapp/chat
Send WhatsApp Message allows a client application to send a WhatsApp user message to an AI agent and receive a complete AI-generated response in a single request.
This endpoint is designed for WhatsApp chat integrations where user messages are received from WhatsApp and forwarded to the configured chatbot. The chatbot processes the message using its configuration, knowledge base, conversation context, and available tools, then returns a response that can be sent back to the WhatsApp user.
This API is commonly used for WhatsApp support bots, lead qualification, booking flows, customer engagement, FAQ automation, and conversational commerce.

Endpoint#


Request Body#

{
  "query": "Hello",
  "pid": "3..",
  "chatbot_id": "DKDvwn...",
  "user_context": {
    "session_id": "918727...",
    "platform": "whatsapp"
  }
}

Request Parameters#

FieldTypeRequiredDescription
querystringYesUser message received from WhatsApp.
pidstringYesProject ID associated with the chatbot.
chatbot_idstringYesUnique chatbot identifier that should process the WhatsApp message.
user_contextobjectYesAdditional context about the WhatsApp user, session, or client application.
user_context.session_idstringNoUnique WhatsApp conversation identifier. This can be the user’s WhatsApp number or another stable session ID.
user_context.platformstringYesPlatform where the message originated. For this endpoint, use whatsapp.

Success Response#

{
  "message": "Success",
  "data": {
    "answer": "Hello! How can I help you with your setup today?",
    "session_id": "918727..."
  }
}

Response Fields#

Root#

FieldTypeDescription
messagestringStatus message for the WhatsApp chat request.
dataobjectContains the AI-generated response and session details.

data#

FieldTypeDescription
answerstringAI-generated response returned by the chatbot.
session_idstringWhatsApp conversation session identifier associated with the response.

Error Responses#

401 Unauthorized#

Returned when the request does not include a valid bearer token.
{
  "message": "Unauthorized",
  "error": {
    "code": "UNAUTHORIZED",
    "detail": "Authentication token is missing or invalid."
  }
}

Notes#

Use this endpoint when the message source is WhatsApp and you want the full AI response returned at once.
The response structure is the same as the non-streaming chat API response, which returns message, data.answer, and data.session_id.
For WhatsApp integrations, session_id is commonly mapped to the user’s WhatsApp phone number or a unique conversation ID.
The chatbot_id must belong to the specified project ID.
The returned answer can be forwarded back to the WhatsApp user through your WhatsApp messaging provider or webhook handler.

Request

Body Params application/jsonRequired

Examples

Responses

🟢200Success
application/json
Bodyapplication/json

🟠401Unauthorized
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://agents.robofy.ai/v1/ai-agent/whatsapp/chat' \
--header 'Content-Type: application/json' \
--data '{
    "query": "Hello",
    "pid": "3..",
    "chatbot_id": "DKDvwn...",
    "user_context": {
        "session_id": "918727...",
        "platfrom": "whatsapp"
    }
}'
Response Response Example
200 - Example 1
{
    "message": "Success",
    "data": {
        "answer": "Hello! How can I help you with your setup today?",
        "session_id": "918727..."
    }
}
Modified at 2026-05-04 11:16:26
Previous
Send Message (Non Streaming)
Next
List Agents
Built with