convoup Docs
Docs / Guides / Free-Form Text

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

When to Use Templates Instead

Endpoint

HTTP
POST https://api.convoup.com/api/v1/messages

Headers

HeaderValue
Content-Typeapplication/json
x-api-keyYour 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