Build with WA Gateway
Integrate WA Gateway into your application. Authenticate requests with your API key, call endpoints in your preferred language, and receive real-time webhook events.
Authentication & Base URL
Every request requires your API key.
Send Message
Sends a text or media message to a recipient using your connected WhatsApp session. For a file, set message_type to "media" and pass media_url (and optionally caption) - see "Sending Files" below for the full steps, plan rules and limits.
/messages/send
Build with AI
Generate a ready-to-paste implementation prompt for Send Message in your language.
Built from this section of the docs only. Your real API key is never included.
Preview prompt
{
"session_id": "9482521",
"recipient": "919876543210",
"message_type": "text",
"message": "Hello from WA Gateway!"
}
{
"success": true,
"message_id": "wamid_xxxxxxxxx",
"status": "queued"
}
List Sessions
Returns the WhatsApp sessions available for your API key.
/sessions
Build with AI
Generate a ready-to-paste implementation prompt for List Sessions in your language.
Built from this section of the docs only. Your real API key is never included.
Preview prompt
{
"success": true,
"sessions": [
{
"id": "9482521",
"status": "connected",
"name": "My WhatsApp"
}
]
}
Register Webhook
Registers an HTTPS endpoint that receives real-time WhatsApp events.
/webhooks
Build with AI
Generate a ready-to-paste implementation prompt for Register Webhook in your language.
Built from this section of the docs only. Your real API key is never included.
Preview prompt
{
"session_id": "9482521",
"url": "https://example.com/webhook"
}
{
"success": true,
"webhook_id": "wh_123456"
}
Upload Media
Uploads an image, video, audio, or document file and returns a media_url ready to use with Send Message.
/media/upload
Build with AI
Generate a ready-to-paste implementation prompt for Upload Media in your language.
Built from this section of the docs only. Your real API key is never included.
Preview prompt
{
"file": "(binary file data)",
"category": "image"
}
{
"success": true,
"media_url": "https://app.fireclashpro.com/media/f/6b1f...a92.jpg",
"category": "image",
"content_type": "image/jpeg",
"size_bytes": 84213
}
Media Storage Usage
Returns how much of your plan's media storage quota is currently in use.
/media/storage
Build with AI
Generate a ready-to-paste implementation prompt for Media Storage Usage in your language.
Built from this section of the docs only. Your real API key is never included.
Preview prompt
{
"used_mb": 45.5,
"quota_mb": 200,
"image_video_enabled": false,
"retention_days": 30
}
Sending Files (images, video, audio, documents)
Two steps: upload the file, then send the link you get back.
Step by step
-
Upload the file with
POST /media/uploadasmultipart/form-data, field namefile. Example:curl -X POST https://waapi.fireclashpro.com/api/v1/media/upload \ -H "X-API-Key: wag_live_YOUR_API_KEY_HERE" \ -F "file=@invoice.pdf"
The response contains a ready-to-usemedia_url:{ "media_url": "https://app.fireclashpro.com/media/f/6b1f...a92.pdf", "category": "document", "content_type": "application/pdf", "size_bytes": 84213 } -
Send it with
POST /messages/send, usingmessage_type: "media"and thatmedia_url.captionis optional (not used for audio):curl -X POST https://waapi.fireclashpro.com/api/v1/messages/send \ -H "X-API-Key: wag_live_YOUR_API_KEY_HERE" -H "Content-Type: application/json" \ -d '{ "session_id": "9482521", "recipient": "919876543210", "message_type": "media", "media_url": "https://app.fireclashpro.com/media/f/6b1f...a92.pdf", "caption": "Your invoice" }' -
Check the result - the send call returns a
message_idand statusqueued; the final status (sent/failed) arrives on your webhook or viaGET /messages/{message_id}.
Already host the file yourself? Skip step 1 and put your public link in media_url.
The same plan rules apply, and the file is downloaded and checked by its real content before it is sent. The link must be
https (or http) on port 80/443, reachable from the internet, and must not point to a private/internal address or redirect more than 3 times.
What each plan can send
| Plan | Image | Video | Audio | Document | Storage |
|---|---|---|---|---|---|
| Starter | Yes | - | - | PDF only, max 2 MB | 200 MB |
| Pro | Yes | Yes | Yes | Yes | 500 MB |
| Business | Yes | Yes | Yes | Yes | 2000 MB |
Annual plans have the same access as their monthly version. Storage is a rolling 30-day total of what you uploaded; files are deleted after 30 days. There is no free plan: you need an active paid plan to connect WhatsApp and send anything. If your plan expires, sending and uploads stop until you renew.
File types and limits
| Type | Formats | Max size | Max length |
|---|---|---|---|
| Image | JPG, PNG, WebP, GIF | 10 MB | - |
| Video | MP4, MOV | 60 MB | 2 minutes |
| Audio | MP3, OGG, AAC, WAV | 15 MB (WAV 20 MB) | 5 minutes |
| Document | PDF, DOCX, XLSX | 20 MB (Starter: PDF only, 2 MB) | - |
| Text | TXT, CSV (UTF-8) | 5 MB | - |
Uploads are limited to 60 per hour per account. Old .doc / .xls files are not accepted - save as .docx / .xlsx or send a PDF.
How files are checked (and what gets refused)
- The type is read from the file's content, never from its name. A renamed file is identified as what it really is.
- Every file is scanned by an antivirus engine before it is stored. Infected files are rejected.
- Word / Excel files containing macros, ActiveX or embedded objects are rejected. PDFs containing scripts, launch actions or embedded files are rejected.
- Executables, scripts, HTML, SVG, archives and anything else not in the table above are rejected.
Errors you may see
| Code | HTTP | Meaning / what to do |
|---|---|---|
| PLAN_RESTRICTED | 403 | Your plan does not include this file type. Upgrade (see the table above). |
| STORAGE_QUOTA_EXCEEDED | 413 | Your 30-day media storage is full. Wait for old files to expire or upgrade. |
| FILE_TOO_LARGE | 413 | Over the size limit for that file type. |
| MEDIA_TOO_LONG | 413 | Video over 2 minutes or audio over 5 minutes. |
| INVALID_FILE_CONTENT | 400 | The file is not one of the supported types (checked by content). |
| FILE_TYPE_MISMATCH | 400 | The category you sent does not match the real file. |
| UNSAFE_FILE | 400 | Macros, scripts or embedded objects found. Re-save a plain file. |
| MALWARE_DETECTED | 400 | The antivirus scan flagged the file. |
| SCANNER_UNAVAILABLE | 503 | The scanner is temporarily unreachable - retry in a few minutes. |
| QUOTA_EXCEEDED | 403 | Monthly message limit reached. Upgrade or buy a top-up (top-ups need an active paid plan). |
| RATE_LIMITED | 429 | Too many requests - slow down and retry. |
When you send a link you host yourself: if the link clearly names a file type your plan does not allow, the send call returns PLAN_RESTRICTED straight away; otherwise the file is checked when it is delivered and the message shows as failed with the reason.
Webhook events
Your webhook URL should be reachable over HTTPS. WA Gateway sends event payloads to the registered endpoint as JSON.