WhatsApp API Endpoints
1. Send Message
Description: Sends a text message to a specified phone number
curl -X POST
https://grow.buktor.com/api/send
-H 'Authorization: Bearer <YOUR_AUTHORIZATION_TOKEN>'
-H 'Content-Type: application/json'
-d '{
"phone": "+1 (968) 082-5846",
"message": "Hello John, how are you?",
"header": "Test header",
"footer": "Test footer",
"buttons": [
{
"id": "id_1",
"title": "Fine"
},
{
"id": "id_2",
"title": "Not well"
}
]
}'2. Send Media
Description: Sends media (e.g., images or videos) to a specified phone number with an optional caption.
curl -X POST
https://grow.buktor.com/api/send/media
-H 'Authorization: Bearer <YOUR_AUTHORIZATION_TOKEN>'
-H 'Content-Type: application/json'
-d '{
"phone": "+1 (968) 082-5846",
"media_type": "image",
"media_url": "https://images.pexels.com/photos/276267/pexels-photo-276267.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2",
"caption": "your caption for image or video media types",
"file_name": "testFileName"
}'
3. Send Template Message
Description: Sends a structured template message, which can include various components.
curl -X POST
https://grow.buktor.com/api/send/template
-H 'Authorization: Bearer <YOUR_AUTHORIZATION_TOKEN>'
-H 'Content-Type: application/json'
-d '{
"phone": "+1 (968) 082-5846",
"template": {
"name": "car_insurance",
"language": {
"code": "en"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"link": "http(s)://URL"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "TEXT_STRING"
},
{
"type": "date_time",
"date_time": {
"fallback_value": "MONTH DAY, YEAR"
}
}
]
},
{
"type": "button",
"sub_type": "quick_reply",
"index": "0",
"parameters": [
{
"type": "payload",
"payload": "PAYLOAD"
}
]
},
{
"type": "button",
"sub_type": "quick_reply",
"index": "2",
"parameters": [
{
"type": "payload",
"payload": "PAYLOAD"
}
]
}
]
}
}'