Quickstart
Get started with the CubeConnect API in 5 minutes.
Prerequisites
- A CubeConnect account with an active subscription
- A connected WhatsApp Business account
- An API key (generated from dashboard)
Step 1: Get Your API Key
- Log in to CubeConnect Dashboard
- Go to Settings > API Keys
- Click Generate New Key
- Copy and store the key securely
WARNING
Your API key is shown only once. Store it in a secure location like an environment variable.
Step 2: Test Your Connection
Verify your API key works by calling the health check endpoint:
bash
curl https://cubeconnect.io/api/healthExpected response:
json
{
"success": true,
"data": {
"status": "healthy",
"checks": {
"app": true,
"database": true,
"cache": true
},
"timestamp": "2026-02-27T12:00:00Z"
}
}Step 3: Send Your First Message
Send a text message to a WhatsApp number:
bash
curl -X POST https://cubeconnect.io/api/v1/messages/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "+966501234567",
"message_type": "text",
"data": {
"body": "Hello from CubeConnect API!"
}
}'Expected response:
json
{
"success": true,
"data": {
"status": "queued",
"message_log_id": 1,
"conversation_category": "SERVICE",
"cost": 0.0
}
}INFO
Text messages require the customer to have messaged you within the last 24 hours. For first-time messages, use a template message.
Step 4: Send a Template Message
Templates can be sent anytime, without the 24-hour restriction:
bash
curl -X POST https://cubeconnect.io/api/v1/messages/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "+966501234567",
"message_type": "template",
"data": {
"name": "hello_world"
}
}'What's Next?
- Send Your First Message - Detailed guide with all message types
- Set Up Webhooks - Receive incoming messages and delivery status
- Conversation Flows - Build automated chatbot flows
- API Reference - Full API documentation