Apni website, CRM ya billing software se seedha WhatsApp message bhejiye. API key panel ke Settings page me milti hai.
Har request me header bhejein:
Authorization: Bearer oct_xxxxxxxxxxxxxxxx
24-ghante ki window ke bahar bhi jaata hai. Template pehle approved hona chahiye.
POST https://api.octobyte.shop/api.php?action=send_template
{
"to": "9876543210",
"template": "order_update",
"variables": ["Rahul", "ORD-1029"],
"header_media": "https://site.com/banner.jpg"
}
Sirf tab jab customer ne pichle 24 ghante me message kiya ho.
POST https://api.octobyte.shop/api.php?action=send_text
{ "to": "9876543210", "text": "Aapka order aaj shaam nikal jayega." }
POST https://api.octobyte.shop/api.php?action=add_contact
{ "phone": "9876543210", "name": "Rahul Sharma",
"attributes": { "city": "Delhi", "order_id": "ORD-1029" } }
?action=status&id=123 — kisi queue item ka status?action=usage — plan, limit aur is mahine ka usage?action=contacts — contact list (page wise)?action=templates — approved template listSettings me apna webhook URL daal dijiye — incoming message aur delivery status ka JSON hum aapko POST kar denge.
401 — API key galat402 — subscription expire ya limit khatam403 — aapke plan me API nahi hai409 — 24-ghante ki window band hai (template bhejein)422 — request ka data adhura ya galat