Flaresend API provides a simple and reliable way to integrate WhatsApp messaging into your applications. From building chatbots, notification systems, to customer support tools, Flaresend makes it easy to send, receive, and manage messages at scale all through secure RESTful endpoints. Get started by creating an account, setting up a WhatsApp instance, scanning the QR code, and generating your API key.
Base URL: https://api.flaresend.com
API Version: v1.0.0
- Visit https://www.flaresend.com
- Click βGet Startedβ to log in/sign up
- Fill in the required signup information.
- Log in to your dashboard.
β οΈ Important: You must have a connected WhatsApp instance before sending any messages or receive any notifications.
- Navigate to the βYour WhatsApp Instancesβ section in your dashboard.
- Click βCreate New Instanceβ at the top-right corner, a new instance will be generated automatically.
- Click Show QR button to scan the generated QR code.
- (If instance(s) is disconnected) Click the βReconnectβ button to link your WhatsApp number.
- Scan the QR code displayed on the screen following the on-screen instructions.
- Go to the βAPI Keysβ section in your dashboard.
- Copy your generated API key linked to the connected whatsapp number, youβll use it for all authenticated requests to the Flaresend API.
π Security Tip: Keep your API key secret. It authenticates your application and grants full access to your account.
All API requests must be authenticated using your API Key.
Include your API key in the Authorization header as follows:
Authorization: Bearer YOUR_API_KEYExample cURL request:
curl -X GET https://api.flaresend.com/send-message \
-H "Authorization: Bearer YOUR_API_KEY"Base URL:
https://api.flaresend.com
This endpoint allows you to send WhatsApp messages through your connected instance. You can send text, documents, media (image, audio, or video), or template messages depending on your integration setup.
Endpoint:
POST /send-message
| Header | Type | Description |
|---|---|---|
Authorization |
string | Bearer token used for authentication. |
Content-Type |
string | Must be application/json. |
| Parameter | Type | Required | Description |
|---|---|---|---|
recipients |
array | β | List of recipient phone numbers in international format (e.g., "2547XXXXXXXX"). |
type |
string | β | Message type , e.g., text, image, video, document, etc. |
text |
string | β
(if type = text) |
The message content to send. |
curl --location 'https://api.flaresend.com/send-message' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"recipients": ["254712345678"],
"type": "text",
"text": "Hello from the APIs!"
}'Success Response (200)
{
"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": []
}Error Response (401)
{
"success": false,
"error": "Authorization header required"
}Error Response (425)
{
"success": false,
"message": "Instance not ready for messaging",
"status": "initializing",
"action": "Please ensure the QR code is scanned and the instance is connected"
}Error Response (400)
{
"success": false,
"message": "Recipients array is required"
}Below are examples of how to send different message types using the same /send-message endpoint.
curl --location 'https://api.flaresend.com/send-message' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--form 'recipients[]="254712345678"' \
--form 'recipients[]="254718841608"' \
--form 'type="document"' \
--form 'file=@"/C:/Users/sosmo/Documents/Sec1L1.pdf"'{
"recipients": ["254712345678"],
"type": "document",
"url": "https://example.com/file.pdf",
"fileName": "Report.pdf"
}{
"recipients": ["254712345678"],
"type": "image",
"url": "https://example.com/image.jpg",
"caption": "Check this out!"
}Form Data:
recipients[]: ["254712345678"]type:imagecaption:"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"
}Here is a polished, ready-to-paste Schedule Messages section matching the formatting and tone of your existing documentation:
Flaresend allows you to schedule WhatsApp messages to be delivered at a future date and time. This is useful for reminders, notifications, campaigns, and automated workflows.
Endpoint: POST /schedule-message
| Header | Type | Description |
|---|---|---|
Authorization |
string | Bearer token used for authentication. |
Content-Type |
string | Must be application/json. |
| Parameter | Type | Required | Description |
|---|---|---|---|
recipients |
array | β | List of phone numbers in international format (e.g., "2547XXXXXXXX"). |
type |
string | β | Message type β text, image, video, audio, document, etc. |
text |
string | Required if type=text | Message content. |
sendAt |
string | β | Scheduled time in YYYY-MM-DD HH:mm:ss format (24-hour). |
curl --location 'https://api.flaresend.com/schedule-message' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"recipients": ["254708920430"],
"type": "text",
"text": "Again!",
"sendAt": "2025-11-14 13:48:00"
}'{
"success": true,
"message": "Message scheduled successfully",
"scheduled_for": "2025-11-14 13:48:00",
"task_id": "SCHED-9128371923"
}Retrieve all pending or upcoming scheduled messages.
Endpoint: GET /scheduled-messages
| Header | Type | Description |
|---|---|---|
Authorization |
string | Bearer token used for authentication. |
curl --location 'https://api.flaresend.com/scheduled-messages' \
--header 'Authorization: Bearer YOUR_API_KEY'{
"success": true,
"message": "Scheduled messages fetched successfully",
"data": [
{
"id": "SCHED-9128371923",
"recipients": ["254708920430"],
"type": "text",
"text": "Again!",
"sendAt": "2025-11-14 13:48:00",
"status": "pending"
}
]
}Hereβs your refined version with the Update endpoint switched to PATCH (for partial updates) and some small formatting improvements so itβs consistent and ready to copy-paste:
Update the message content, recipients, or scheduled time before it is sent.
Endpoint: PATCH /scheduled-messages/:id
| Header | Type | Description |
|---|---|---|
Authorization |
string | Bearer token used for authentication. |
Content-Type |
string | Must be application/json. |
| Parameter | Type | Required | Description |
|---|---|---|---|
recipients |
array | Optional | Updated list of recipient phone numbers. |
type |
string | Optional | Message type β text, image, video, etc. |
text |
string | Required if type=text | Updated message content. |
url |
string | Optional | New file/media URL. |
caption |
string | Optional | Updated caption for media. |
sendAt |
string | Optional | New schedule time YYYY-MM-DD HH:mm:ss (server local time). |
Only the fields you include will be updated.
curl --location --request PATCH 'https://api.flaresend.com/scheduled-messages/123' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"text": "Updated message!",
"sendAt": "2025-11-16 14:30:00"
}'{
"success": true,
"message": "Scheduled message updated successfully",
"id": "123",
"updated_fields": ["text", "sendAt"]
}{
"success": false,
"message": "This scheduled message can no longer be updated"
}{
"success": false,
"message": "Scheduled message not found"
}Cancel a scheduled message before the send time. Once cancelled, the message will not be delivered.
Endpoint: DELETE /scheduled-messages/:id
| Header | Type | Description |
|---|---|---|
Authorization |
string | Bearer token used for authentication. |
curl --location --request DELETE 'https://api.flaresend.com/scheduled-messages/123' \
--header 'Authorization: Bearer YOUR_API_KEY'{
"success": true,
"message": "Scheduled message cancelled successfully",
"id": "123"
}{
"success": false,
"message": "Scheduled message not found or cannot be cancelled"
}Manage WhatsApp groups using the Flaresend API. You can create groups, list existing groups, view details, generate invite links, and send messages to groups.
Base URL:
https://api.flaresend.com
Endpoint:
POST /groups
Creates a new WhatsApp group with a specified subject and list of participants.
| Header | Type | Description |
|---|---|---|
Authorization |
string | Bearer token used for authentication. |
Content-Type |
string | Must be application/json. |
| Parameter | Type | Required | Description |
|---|---|---|---|
subject |
string | β | The name of the group. |
participants |
array | β | List of participant phone numbers in international format. |
curl --location 'https://api.flaresend.com/groups' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"subject": "Family Group 4",
"participants": ["254712345678","254723456789"]
}'{
"success": true,
"message": "Group created successfully",
"data": {
"id": "120363420800326612@g.us",
"addressingMode": "lid",
"subject": "Family Group 4",
"subjectOwner": "163514152964174@lid",
"subjectTime": 1755072787,
"size": 2,
"creation": 1755072787,
"owner": "163514152964174@lid",
"restrict": false,
"announce": false,
"isCommunity": false,
"isCommunityAnnounce": false,
"joinApprovalMode": false,
"memberAddMode": false,
"participants": [
{
"id": "163514152964174@lid",
"admin": "superadmin"
},
{
"id": "268813446717676@lid",
"admin": null
}
]
}
}Endpoint:
GET /groups
Fetches all existing groups in your connected WhatsApp instance.
| Header | Type | Description |
|---|---|---|
Authorization |
string | Bearer token used for authentication. |
| Parameter | Type | Description |
|---|---|---|
page |
integer | Page number for pagination. |
limit |
integer | Number of results per page. |
curl --location 'https://api.flaresend.com/groups?page=1&limit=10' \
--header 'Authorization: Bearer YOUR_API_KEY'{
"success": true,
"message": "Fetched all groups successfully",
"data": {
"120363403582097887@g.us": {
"id": "120363403582097887@g.us",
"subject": "Again again",
"size": 2,
"owner": "268813446717676@lid",
"participants": [
{
"id": "163514152964174@lid",
"admin": null
},
{
"id": "268813446717676@lid",
"admin": "superadmin"
}
]
},
"120363420250618357@g.us": {
"id": "120363420250618357@g.us",
"subject": "Family Group 4",
"size": 2,
"owner": "163514152964174@lid",
"participants": [
{
"id": "163514152964174@lid",
"admin": "superadmin"
},
{
"id": "268813446717676@lid",
"admin": null
}
]
}
}
}Endpoint:
GET /groups/{groupId}
Retrieves detailed information about a specific group.
| Header | Type | Description |
|---|---|---|
Authorization |
string | Bearer token used for authentication. |
curl --location 'https://api.flaresend.com/groups/120363420250618357@g.us' \
--header 'Authorization: Bearer YOUR_API_KEY'{
"success": true,
"message": "Group info fetched successfully",
"data": {
"id": "120363420250618357@g.us",
"name": "Weekend Hiking Plans",
"desc": "Plan for our next hike.",
"createdAt": "Aug 13, 2025, 11:01 PM",
"owner": "163514152964174@lid",
"isCommunity": false,
"participants": [
{
"id": "50479304319053@lid",
"admin": "admin"
},
{
"id": "163514152964174@lid",
"admin": null
},
{
"id": "268813446717676@lid",
"admin": "admin"
}
]
}
}Endpoint:
GET /groups/{groupId}/invite-link
Fetches the groupβs WhatsApp invite link.
| Header | Type | Description |
|---|---|---|
Authorization |
string | Bearer token used for authentication. |
curl --location 'https://api.flaresend.com/groups/120363403582097887@g.us/invite-link' \
--header 'Authorization: Bearer YOUR_API_KEY'Endpoint:
POST /groups/send-message
Sends a message to one or more WhatsApp groups.
| Header | Type | Description |
|---|---|---|
Authorization |
string | Bearer token used for authentication. |
Content-Type |
string | Must be application/json. |
| Parameter | Type | Required | Description |
|---|---|---|---|
groupJids |
array | β | List of WhatsApp group IDs (@g.us). |
type |
string | β | Message type , e.g., text, image, etc. |
text |
string | β
(if type = text) |
The message content to send. |
curl --location 'https://api.flaresend.com/groups/send-message' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"groupJids": ["120363403582097887@g.us"],
"type": "text",
"text": "Hello group again!"
}'{
"success": true,
"message": "Message sent successfully to 1 group",
"data": {
"delivered": ["120363403582097887@g.us"],
"failed": []
}
}Hereβs the refined documentation for your 6th API endpoint written in the same style and format as your provided template:
Endpoint:
POST /groups/:groupId/participants
Performs participant management actions in a WhatsApp group, including adding, removing, promoting, or demoting users.
| Header | Type | Description |
|---|---|---|
Authorization |
string | Bearer token used for authentication. |
Content-Type |
string | Must be application/json. |
| Field | Type | Required | Description |
|---|---|---|---|
action |
string | β Yes | The operation to perform. Accepts: add, remove, promote, or demote. |
participants |
array | β Yes | List of participant WhatsApp IDs (@s.whatsapp.net) to apply the action to. |
curl --location 'https://api.flaresend.com/groups/120363422712338174@g.us/participants' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"action": "add",
"participants": [
"254712345678",
"254798765432"
]
}'Add Participants
{
"success": true,
"message": "Participants successfully added",
"groupId": "120363422712330174@g.us",
"participants": [
"254712345678",
"254798765432"
]
}Remove Participants
{
"success": true,
"message": "Participants successfully removed",
"groupId": "120363422712330174@g.us",
"participants": [
"254798765432"
]
}Promote Participants
{
"success": true,
"message": "Participants successfully promoted",
"groupId": "120363422712330174@g.us",
"participants": [
"254798765432"
]
}Demote Participants
{
"success": true,
"message": "Participants successfully demoted",
"groupId": "120363422712330174@g.us",
"participants": [
"254798765432"
]
}Participants already in group
{
"success": false,
"message": "Some participants are already in the group.",
"invalid": [
"254798765432"
]
}Participants not found or invalid
{
"success": false,
"message": "Some participants are not in the group.",
"invalid": [
"254700000000"
]
}Invalid action
{
"success": false,
"message": "Invalid action. Allowed: add, remove, promote, demote."
}- The endpoint uses the groupβs unique identifier (e.g.,
120363422712339174@g.us) as a URL parameter. - Only authorized users with valid Bearer tokens can perform group management actions.
- The API will return clear messages indicating the result of each participant operation.
Flaresend can notify your server in real time when specific events occur, such as receiving new WhatsApp messages. When a webhook is triggered, Flaresend sends a POST request with event data to your registered webhook URL.
Endpoint: POST {your_webhook_url}
Content-Type: application/json
- Go to the Your WhatsApp Instances section in your Flaresend dashboard.
- Click the Edit Webhook button.
- Enter your webhook endpoint URL (must start with
https://). - Save and verify your webhook by sending a message to the connected WhatsApp number or testing via Postman.
Note: During verification, your endpoint may need to respond to a challenge or return a 200 OK status to confirm successful setup.
{
"event": "message_received",
"instanceId": "9b540e83-e1ca-49b4-8c34-01fd31991d04",
"data": {
"from": "254712345678@s.whatsapp.net",
"message": {
"conversation": "Hi, how are you",
"messageContextInfo": {
"deviceListMetadata": {
"senderKeyHash": "k0KrwvtTGeJWyg==",
"senderTimestamp": "1760137298",
"recipientKeyHash": "fBBUmTapmjlK9w==",
"recipientTimestamp": "1760704527"
},
"deviceListMetadataVersion": 2,
"messageSecret": "40cV3I0agULcjIrFPsHdaDiA5BuAmFR4CkdpOlUpOHs="
}
},
"timestamp": 1760705280,
"id": "AC2EB4F50AAAC4C20D27DA8130FC844A"
},
"timestamp": "2025-10-17T12:47:59.689Z"
}| Field | Type | Description |
|---|---|---|
event |
string | Type of event. Example: message_received. |
instanceId |
string | Unique identifier of the connected WhatsApp instance. |
data.from |
string | WhatsApp ID of the sender (JID format). |
data.message.conversation |
string | The actual text content of the message. |
data.message.messageContextInfo |
object | Metadata about the message and device keys (encryption-related). |
data.id |
string | Internal message identifier. |
data.timestamp |
integer | Unix timestamp (seconds) when the message was received. |
timestamp |
string | ISO-formatted timestamp when the webhook was delivered. |
Your webhook endpoint should return a 200 OK response to acknowledge successful receipt. If Flaresend receives anything other than a 200 response repeatedly, delivery may be paused or retried according to the dashboard settings.
Example acknowledgement response:
{
"status": "received"
}- Use HTTPS endpoints and validate incoming requests (HMAC signature or token) to ensure the payload is from Flaresend.
- Retry logic: design your endpoint to handle duplicate events (idempotency).
- Log webhook payloads and response status codes for debugging.
- Filter events you don't need in the dashboard to reduce traffic.
This endpoint allows you to verify whether a given phone number is registered on WhatsApp. Itβs useful before attempting to send messages or add participants to groups.
Endpoint: POST /check-number
Base URL: https://api.flaresend.com
| Header | Type | Description |
|---|---|---|
Content-Type |
string | Must be application/json. |
Authorization |
string | Bearer token used for authentication. |
| Parameter | Type | Required | Description |
|---|---|---|---|
number |
string | β | The phone number to check, in international format (e.g. 254712345678). |
curl --location 'https://api.flaresend.com/check-number' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"number": "254798765432"
}'β Success (200)
{
"success": true,
"number": "254798765432",
"exists": true
}β Error (400)
{
"success": false,
"message": "Invalid number format or missing field"
}β Error (401)
{
"success": false,
"error": "Authorization header required"
}Need assistance or have questions about the API? Reach out to our support team via:
- π§ Email: support@flaresend.com
- π¬ WhatsApp: Chat with Support