Introduction
Welcome to the FlareSend API documentation. This guide provides specifications for connecting your systems to the FlareSend Application. Primarily, you can connect to perform the following:
- Create user accounts
- Authenticate users
- Create WhatsApp instances
- Send messages via WhatsApp
All requests MUST be made over HTTP/HTTPS. Calls without proper authorization will fail.
Errors
The FlareSend API uses the following error codes:
| Error Code | Meaning |
|---|---|
| 400 | Bad Request -- Your request is invalid. |
| 401 | Unauthorized -- Your API key or token is wrong. |
| 403 | Forbidden -- The resource requested cannot be accessed. |
| 404 | Not Found -- The specified resource could not be found. |
| 500 | Internal Server Error -- We had a problem with our server. Try again later. |
Create Account
Register a new user account to start using the API.
POST https://api.flaresend.io/register
| Header | Description |
|---|---|
api-key |
Your unique API key (e.g., 1acdff9afe3fcbf788d06df07057d29cbc18d02deafb0e71f004510f8b120e4e) |
Content-Type |
application/json |
| Parameter | Required | Type | Description |
|---|---|---|---|
| firstname | yes | string | User's first name |
| lastname | yes | string | User's last name |
| yes | string | User's email address | |
| password | yes | string | User's password |
curl --location 'https://api.flaresend.io/register' \
--header 'api-key: 1acdff9afe3fcbf788d06df07057d29cbc18d02deafb0e71f004510f8b120e4e' \
--header 'Content-Type: application/json' \
--data-raw '{
"firstname": "Sos",
"lastname": "Mongare",
"email": "sosmongare@gmail.com",
"password": "admin123"
}'
{
"status": "success",
"user_id": "u123456",
"message": "Account created successfully",
"created_at": "2025-09-26T11:50:00Z"
}
{
"error_code": 400,
"error_message": "Invalid request parameters"
}
Login
Authenticate an existing user to receive an access token.
POST https://api.flaresend.io/login
| Header | Description |
|---|---|
api-key |
Your unique API key |
Content-Type |
application/json |
| Parameter | Required | Type | Description |
|---|---|---|---|
| yes | string | User's email | |
| password | yes | string | User's password |
curl --location 'https://api.flaresend.io/login' \
--header 'api-key: 1acdff9afe3fcbf788d06df07057d29cbc18d02deafb0e71f004510f8b120e4e' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "sosmongare@gmail.com",
"password": "admin123"
}'
{
"status": "success",
"access_token": "1acdff9afe3fcbf788d06df07057d29cbc18d02deafb0e71f004510f8b120e4e",
"token_type": "Bearer",
"expires_in": 3600
}
{
"error_code": 401,
"error_message": "Invalid credentials"
}
Create Instance
Create a new WhatsApp instance for messaging.
POST https://api.flaresend.io/instances
| Header | Description |
|---|---|
api-key |
Your unique API key |
Authorization |
Bearer token for authentication |
No body parameters required.
curl --location --request POST 'https://api.flaresend.io/instances' \
--header 'api-key: 1acdff9afe3fcbf788d06df07057d29cbc18d02deafb0e71f004510f8b120e4e' \
--header 'Authorization: Bearer 1acdff9afe3fcbf788d06df07057d29cbc18d02deafb0e71f004510f8b120e4e' \
--data ''
{
"status": "success",
"instance_id": "inst123456",
"message": "Instance created successfully",
"created_at": "2025-09-26T11:50:00Z"
}
{
"error_code": 401,
"error_message": "Unauthorized"
}
Send Message
Send WhatsApp messages to one or multiple recipients.
POST https://api.flaresend.io/send-message
| Header | Description |
|---|---|
api-key |
Your unique API key |
Content-Type |
application/json |
Authorization |
Bearer token for authentication |
| Parameter | Required | Type | Description |
|---|---|---|---|
| recipients | yes | array | Array of recipient phone numbers |
| type | yes | string | Message type (e.g., "text") |
| text | yes | string | The message text |
curl --location 'https://api.flaresend.io/send-message' \
--header 'api-key: 1acdff9afe3fcbf788d06df07057d29cbc18d02deafb0e71f004510f8b120e4e' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 1acdff9afe3fcbf788d06df07057d29cbc18d02deafb0e71f004510f8b120e4e' \
--data '{
"recipients": ["254762043910","254735733119"],
"type": "text",
"text": "Good morning, Sent from Whatsapp API"
}'
{
"status": "success",
"message_id": "msg123456",
"recipients": ["254762043910", "254735733119"],
"message": "Message sent successfully",
"sent_at": "2025-09-26T11:50:00Z"
}
{
"error_code": 400,
"error_message": "Invalid request"
}
Webhooks
Set up webhooks to receive real-time notifications for events like incoming messages.
To set up webhooks, configure your endpoint URL in your instance settings. Your server will receive POST requests with event data in JSON format.
Make sure your endpoint can handle POST requests and returns a 200 status code to acknowledge receipt.
{
"event": "message_received",
"instanceId": "32208d70-8f21-4af5-a94c-59432f7cfe14",
"data": {
"from": "254708920430@s.whatsapp.net",
"message": {
"extendedTextMessage": {
"text": "niaje"
}
},
"timestamp": 1759697260,
"id": "3F26D637831DD7A0C9B9"
},
"timestamp": "2025-10-05T20:47:19.376Z"
}
| Event Type | Description |
|---|---|
message_received |
Triggered when a new message is received |
instance_connected |
Triggered when an instance successfully connects |
instance_disconnected |
Triggered when an instance disconnects |