Send Broadcast
Endpoint
POST https://wa20.nuke.co.in/webhook/api/addbroadcastUnofficial.php
Authentication
Send a JWT in one of these ways:
| Method | Example |
|---|---|
| Header | Authorization: Bearer <jwt_token> |
| Cookie | auth_token=<jwt_token> |
Alternatively, you can pass username directly in the request body — if present, it's used instead of the JWT.
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
username | string | No* | Your account username. Only needed if not sending a JWT. *One of username or a valid JWT is required. |
broadcast_name | string | Yes | Any label for this broadcast (max 100 characters, gets trimmed if longer). |
brodcast_service | string | Yes | Route/service to send through. |
contacts | array | Yes | Phone numbers with country code. Non-digit characters are stripped automatically. |
message | string | Yes | The message text to send (max 1500 characters). |
img1 | string (URL) | No | Image URL to attach to the message. |
img2 | string (URL) | No | Second image URL to attach. |
document | string (URL) | No | Document URL to attach. |
Example Request
POST https://wa20.nuke.co.in/webhook/api/addbroadcastUnofficial.php
Authorization: Bearer eyJhbGciOi...
Content-Type: application/json
{
"broadcast_name": "test",
"brodcast_service": "sms_credits",
"contacts": ["919340886343"],
"message": "hello test",
"img1": "https://example.com/images/banner.jpg",
"img2": "https://example.com/images/product.jpg",
"document": "https://example.com/docs/invoice.pdf"
}
cURL Example
curl -X POST "https://wa20.nuke.co.in/webhook/api/addbroadcastUnofficial.php" \
-H "Authorization: Bearer eyJhbGciOi..." \
-H "Content-Type: application/json" \
-d '{
"broadcast_name": "test",
"brodcast_service": "sms_credits",
"contacts": ["919340886343"],
"message": "hello test",
"img1": "https://example.com/images/banner.jpg",
"img2": "https://example.com/images/product.jpg",
"document": "https://example.com/docs/invoice.pdf"
}'
Example Response — 200 OK
{
"request_id": "VIRTU_20260711_138476",
"status": "Completed",
"message": "Success",
"username": "yourusername",
"Credits": 2
}
Response Fields
| Field | Description |
|---|---|
request_id | Unique ID for this broadcast, in the format VIRTU_YYYYMMDD_XXXXXX. Use this to track the campaign later. |
status | Status of the campaign record at creation time. Always "Completed" in the response — this reflects that the request was accepted and queued, not final delivery to every recipient. |
message | "Success" if the request was accepted. |
username | The username the broadcast was sent under. |
Credits | Total bulk_whatsapp_credits deducted — 1 credit per contact. |
How Credits Are Calculated
Unlike the GSM SMS API, credits here are flat-rate: 1 credit per contact, regardless of message length (up to the 1500-character limit).
Total deduction = number of valid contacts
Credits are deducted from your bulk_whatsapp_credits balance. If your balance is lower than the number of contacts, the request is rejected with a 400, and both your available and required credit counts are shown in the error message.
Validation Rules
- Each contact number must be 9 to 30 digits after stripping non-numeric characters. Anything outside this range fails the entire request with a
400. broadcast_name,brodcast_service,contacts, andmessagemust all be present and non-empty.messagecannot exceed 1500 characters.- Requests are rate-limited to 10 per minute per username + IP combination.
Error Responses
| Status | Message | Reason |
|---|---|---|
| 405 | Method not allowed | Request method is not POST. |
| 401 | Invalid Authorization token | No valid JWT and no username in body. |
| 429 | Too many requests. Please try again later. | More than 10 requests in 60 seconds from the same username/IP. |
| 400 | broadcast_name, brodcast_service, contacts, and message are required | One or more required fields missing. |
| 400 | Message is too long | Message exceeds 1500 characters. |
| 400 | Each contact number must be between 9 and 30 digits | A contact number is too short or too long after cleanup. |
| 400 | Insufficient credits. Available: X, Required: Y | Not enough bulk_whatsapp_credits balance to cover the broadcast. |
| 500 | Database connection failed / various insert/prepare errors | Server/database error. |
Notes
- Each contact in the request is recorded individually — after submission, every number in your campaign starts out in a pending state and progresses independently as delivery happens.
- To receive delivery status updates for messages sent through this API, set up a webhook. See the delivery report page for payload details and setup steps.
