Send Messages

Send Broadcast

Endpoint

POST https://wa20.nuke.co.in/webhook/api/addbroadcastUnofficial.php

Authentication

Send a JWT in one of these ways:

MethodExample
HeaderAuthorization: Bearer <jwt_token>
Cookieauth_token=<jwt_token>

Alternatively, you can pass username directly in the request body — if present, it's used instead of the JWT.

Body Parameters

ParameterTypeRequiredDescription
usernamestringNo*Your account username. Only needed if not sending a JWT. *One of username or a valid JWT is required.
broadcast_namestringYesAny label for this broadcast (max 100 characters, gets trimmed if longer).
brodcast_servicestringYesRoute/service to send through.
contactsarrayYesPhone numbers with country code. Non-digit characters are stripped automatically.
messagestringYesThe message text to send (max 1500 characters).
img1string (URL)NoImage URL to attach to the message.
img2string (URL)NoSecond image URL to attach.
documentstring (URL)NoDocument 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

FieldDescription
request_idUnique ID for this broadcast, in the format VIRTU_YYYYMMDD_XXXXXX. Use this to track the campaign later.
statusStatus 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.
usernameThe username the broadcast was sent under.
CreditsTotal 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, and message must all be present and non-empty.
  • message cannot exceed 1500 characters.
  • Requests are rate-limited to 10 per minute per username + IP combination.

Error Responses

StatusMessageReason
405Method not allowedRequest method is not POST.
401Invalid Authorization tokenNo valid JWT and no username in body.
429Too many requests. Please try again later.More than 10 requests in 60 seconds from the same username/IP.
400broadcast_name, brodcast_service, contacts, and message are requiredOne or more required fields missing.
400Message is too longMessage exceeds 1500 characters.
400Each contact number must be between 9 and 30 digitsA contact number is too short or too long after cleanup.
400Insufficient credits. Available: X, Required: YNot enough bulk_whatsapp_credits balance to cover the broadcast.
500Database connection failed / various insert/prepare errorsServer/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.