@extends('layouts.app') @section('title', 'Qiz WhatsApp API Documentation') @section('content')
Welcome to the Qiz WhatsApp Messaging API documentation. This guide will help you integrate WhatsApp messaging into your applications. With Qiz, you can easily Automate, send and receive WhatsApp messages, manage groups, and handle real-time events using webhooks.
API Version 1.0.0https://qiz-wa.alphaflare.co.ke
Authorization header for all requestsAuthorization header.
Send text, image, video, audio, or document messages to WhatsApp recipients. For media, you can send a file (multipart/form-data) or a URL.
POST /send-messageAuthorization: Bearer your-api-key
Content-Type: application/json (for text) or multipart/form-data (for media)
{
"recipients": ["254712345678", "254798765432"],
"type": "text",
"text": "Hello from Qiz!"
}
{
"recipients": ["254712345678"],
"type": "image",
"url": "https://example.com/image.jpg",
"caption": "Check this out!"
}
Form Data:
- recipients: ["254712345678"]
- type: image
- caption: "Check this out!"
- file: (select image file)
{
"recipients": ["254712345678"],
"type": "video",
"url": "https://example.com/video.mp4",
"caption": "Watch this!"
}
{
"recipients": ["254712345678"],
"type": "audio",
"url": "https://example.com/audio.mp3"
}
{
"recipients": ["254712345678"],
"type": "document",
"url": "https://example.com/file.pdf",
"fileName": "Report.pdf"
}
{
"success": true,
"message": "Message sending completed: 2 successful, 0 failed",
"sent_at": "2023-12-01T12:01:00Z",
"total_recipients": 2,
"successful_recipients": ["254712345678@s.whatsapp.net", "254798765432@s.whatsapp.net"],
"failed_recipients": [],
"invalid_recipients": []
}
{
"success": false,
"message": "Recipients array is required"
}
{
"success": false,
"message": "Instance not ready for messaging",
"status": "not_loaded"
}
Verify if a mobile number is registered on WhatsApp.
POST /check-numberAuthorization: Bearer your-api-key
Content-Type: application/json
{
"number": "254712345678"
}
{
"success": true,
"number": "254712345678",
"exists": true
}
{
"success": false,
"message": "No WhatsApp instance found. Please scan your QR code first."
}
Create a new WhatsApp group with a subject and participants.
POST /groupsAuthorization: Bearer your-api-key
Content-Type: application/json
{
"subject": "Project Team",
"participants": ["254712345678", "254798765432"]
}
{
"success": true,
"message": "Group created successfully",
"group": {
"id": "120363025988888888@g.us",
"subject": "Project Team",
"participants": [...]
}
}
{
"success": false,
"message": "Group subject and participants are required"
}
List all WhatsApp groups for your connected instance.
GET /groups?page=1&limit=20Authorization: Bearer your-api-key
{
"success": true,
"message": "Groups fetched successfully",
"total": 2,
"page": 1,
"limit": 20,
"groups": [
{
"id": "120363025988888888@g.us",
"name": "Project Team",
"participantsCount": 2
}
]
}
{
"success": false,
"message": "No WhatsApp instance found. Please scan your QR code first."
}
400 Bad Request, 401 Unauthorized, 403 Forbidden, 425 Instance Not Ready, 429 Rate Limit Exceeded, 500 Internal Server Error.message_received, message_sent).