Skip to main content

Replying to Conversations

To send a message to a lead, you need two things: the lead's ID and a messaging channel connection ID (which channel the message goes out on).

1. List your channel connections

curl "https://api.abcsalesbot.com/v1/messaging-channel-connections" \
-H "Authorization: Bearer $ABC_API_KEY"
{
"data": {
"messaging_channel_connections": [
{
"id": 123,
"name": "Main WhatsApp",
"messaging_channel_id": "whatsapp",
"default": true,
"connected": true
}
]
}
}

Use the id of a connected channel. The default flag marks your primary channel.

2. Read the conversation (optional)

curl "https://api.abcsalesbot.com/v1/leads/{leadID}/conversations" \
-H "Authorization: Bearer $ABC_API_KEY"

3. Send the reply

curl -X POST "https://api.abcsalesbot.com/v1/leads/{leadID}/conversations/reply" \
-H "Authorization: Bearer $ABC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Thanks for reaching out! How can we help?",
"messaging_channel_connection_id": 123
}'

To attach a file, include the s3_attachment field. See Attachments.

WhatsApp: the 24-hour window

WhatsApp (Meta) only permits free-form messages within 24 hours of the lead's last inbound message. Keep this in mind when replying over a WhatsApp channel:

  • This endpoint sends free-form content only. It does not support sending a WhatsApp template (there is no template field on the request).
  • If the 24-hour window has closed, the send fails: the message is forwarded to WhatsApp, which rejects it with an "outside the messaging window" / re-engagement error, and that error is returned to you. There is no automatic fallback to a template.
  • Re-engaging a lead outside the window requires an approved WhatsApp template, which is not currently available through the public API.

So treat this endpoint as "works inside the 24-hour window." If you need to reach leads outside it, plan around that limitation for now.

See the API Reference for full request and response schemas.