Sending Free-Form Text
Use POST /api/v1/messages to send free-form text messages within a 24-hour conversation window.
Not fully documented
This endpoint is referenced in the SDK documentation summary but not fully detailed. The information below is based on the limited reference available. Contact Convoup support for the complete API specification.24-Hour Conversation Window
WhatsApp allows free-form text messages (non-template) only within a 24-hour window after the customer's last message. Outside this window, you must use template messages.
graph TD
A[Customer sends message] --> B[24h window opens]
B --> C{Within 24h?}
C -->|Yes| D[Send free-form text]
C -->|No| E[Send template message]
D --> F[Window resets on customer reply]
E --> G[Template delivery]
F --> C
When to Use Free-Form Text
- Customer support replies within the conversation window
- Two-way conversational flows
- Follow-up messages after the customer initiates contact
When to Use Templates Instead
- Business-initiated messages (no prior customer message)
- Messages outside the 24-hour window
- Marketing and promotional messages
- Transaction notifications (OTP, invoices, reminders)
Endpoint
HTTP
POST https://api.convoup.com/api/v1/messagesHeaders
| Header | Value |
|---|---|
Content-Type | application/json |
x-api-key | Your API key |
Request Body
Schema not specified
The exact request body schema for POST /api/v1/messages is not documented in the current SDK reference. Contact Convoup support for the full specification.cURL Example
bash
curl -X POST https://api.convoup.com/api/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"to": "+918851479441",
"type": "text",
"text": {
"body": "Your message here"
}
}'Checking Window Status
Use the window-status endpoint to check whether you can send a free-form message:
HTTP
GET https://api.convoup.com/api/v1/contacts/window-status Details not specified
Query parameters and response schema for this endpoint are not documented in the current SDK reference.SDK Alternative
The Convoup SDK does not currently wrap the /api/v1/messages endpoint. Use fetch directly:
TypeScript
const res = await fetch('https://api.convoup.com/api/v1/messages', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': process.env.CONVOUP_API_KEY!,
},
body: JSON.stringify({
to: '+918851479441',
type: 'text',
text: { body: 'Your message here' },
}),
});
const data = await res.json();Next Steps
- Dynamic Media Content - Send images, videos, and documents
- Template Discovery - List available templates
- REST Endpoints - Full REST API reference
