REST API v1
Base URL: https://wa.go.as2techs.com/api/v1. Create a token in the dashboard under Setup → API and send it as Authorization: Bearer <token>. Limit: 60 requests per minute per account.
Send a message
POST /api/v1/messages
| Field | Notes |
|---|---|
channel_id | Number id from the API page. |
to | Phone in any format; Pakistani numbers like 0300… are converted to +92…. |
type | template, text, image, document, audio, video. |
template, language, params | For templates. params is a list for {{1}}, {{2}}… or {"body": [...], "header": {"link": "https://…"}, "buttons": {"0": "suffix"}}. |
text | For text (only inside the 24-hour window on Official numbers). |
media_url, caption, filename | For media messages. |
curl -X POST https://wa.go.as2techs.com/api/v1/messages \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"channel_id":"…","to":"+923001234567","type":"template",
"template":"order_confirmation","language":"en","params":["Ali","#10452","Rs. 4,500"]}'
Response 202: {"id":"…","status":"queued", …}. Errors: 422 invalid phone, unknown template, no opt-in, window closed; 429 plan limit or rate limit.
The recipient must have opted in (create them with opt_in: true) or have written to you in the last 24 hours.
Message status
GET /api/v1/messages/{id} → queued, sent, delivered, read or failed with error_code and error_message.
Templates
GET /api/v1/templates lists approved templates with their variables.
Contacts
POST /api/v1/contacts creates or updates a contact by phone.
{"phone":"03001234567","name":"Ali Khan","tags":["vip"],"custom_fields":{"city":"Karachi"},
"opt_in":true,"opt_in_source":"checkout"}
ERP webhooks
Shopify, WooCommerce, Odoo and custom systems use a per-integration URL and secret — see Setup → ERP integrations → Setup guide.