curl --request POST \
--url https://cconnect.online/api/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"channel": "whatsapp",
"channel_id": "YOUR_WHATSAPP_CHANNEL_ID",
"to": "+628123456789",
"text": "Your support request is being reviewed."
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
channel: 'whatsapp',
channel_id: 'YOUR_WHATSAPP_CHANNEL_ID',
to: '+628123456789',
text: 'Your support request is being reviewed.'
})
};
fetch('https://cconnect.online/api/v1/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cconnect.online/api/v1/messages"
payload = {
"channel": "whatsapp",
"channel_id": "YOUR_WHATSAPP_CHANNEL_ID",
"to": "+628123456789",
"text": "Your support request is being reviewed."
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "whatsapp",
"channel_id": "<string>",
"status": "queued",
"error_code": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}Send a message
Queues WhatsApp text or an approved template, or an email reply with ticket_id. Requires whatsapp:send + Chat or email:send + Desk. Email uses the ticket’s configured Gmail/SMTP sender and requester; omit to. SMS and attachments are not supported. Idempotent retries return the original acceptance with the same message ID. Check GET /api/v1/messages/{id} for current status.
curl --request POST \
--url https://cconnect.online/api/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"channel": "whatsapp",
"channel_id": "YOUR_WHATSAPP_CHANNEL_ID",
"to": "+628123456789",
"text": "Your support request is being reviewed."
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
channel: 'whatsapp',
channel_id: 'YOUR_WHATSAPP_CHANNEL_ID',
to: '+628123456789',
text: 'Your support request is being reviewed.'
})
};
fetch('https://cconnect.online/api/v1/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cconnect.online/api/v1/messages"
payload = {
"channel": "whatsapp",
"channel_id": "YOUR_WHATSAPP_CHANNEL_ID",
"to": "+628123456789",
"text": "Your support request is being reviewed."
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "whatsapp",
"channel_id": "<string>",
"status": "queued",
"error_code": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
},
"request_id": "<string>"
}Authorizations
Company-owned API token. Supply Authorization: Bearer YOUR_CCONNECT_API_TOKEN. Never use provider tokens or member passwords. Tokens are shown only once when created.
Headers
Unique per operation and company, 1–128 visible ASCII characters. Identical retries return the original 202 acceptance and message ID. Changed requests return 409. Retained for the company lifetime. Check the message resource for current status.
1 - 128Body
whatsapp, email 1^(whatsapp|email)$1 - 200E.164 number with a leading +, required for WhatsApp. Omit for email.
16WhatsApp text: 1–4096 characters within the 24-hour reply window. Email reply: 1–10000 characters. Omit when using a template.
10000Show child attributes
Show child attributes
Required for email replies; the ticket must use channel_id. Omit for WhatsApp.
Response
Accepted
Show child attributes
Show child attributes