FlareSend WhatsApp API documentation

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.

Next →

Event / third-party apps

If you are an event organizer or you are embedding WhatsApp into another product, stay inside your own app. FlareSend is the messaging pipe. Give your backend the instance API key from the dashboard API Keys page — not a login JWT or cookie.

  1. Create a WhatsApp instance and scan the QR (or pair by phone) so status is connected.
  2. Copy the instance API key from API Keys.
  3. From your server, call POST /send-message with Authorization: Bearer YOUR_INSTANCE_API_KEY.

POST /send-message

curl --location 'https://api.flaresend.com/send-message' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_INSTANCE_API_KEY' \
  --data '{
    "recipients": ["254712345678"],
    "type": "text",
    "text": "Your ticket for Event X is confirmed."
  }'

Also useful: POST /check-number, media via type plus file or URL, and group endpoints if the plan includes them. Do not put the key in browser JavaScript.

← Back
Send Message →

Authorization

FlareSend uses API keys and bearer tokens for access. Create an account and login to obtain a token. Use the token in subsequent calls via the Authorization header: Authorization: Bearer {token}.

← Back
Next →

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.
← Back
Next →

Create Account

Register a new user account to start using the API.

POST https://api.flaresend.com/register

Header Description
api-key Your unique API key (e.g., YOUR_API_KEY)
Content-Type application/json
Parameter Required Type Description
firstname yes string User's first name
lastname yes string User's last name
email yes string User's email address
password yes string User's password
curl --location 'https://api.flaresend.com/register' \
--header 'api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "firstname": "Test",
    "lastname": "User",
    "email": "you@example.com",
    "password": "your-password"
}'
                
{
  "status": "success",
  "user_id": "u123456",
  "message": "Account created successfully",
  "created_at": "2025-09-26T11:50:00Z"
}
                
{
  "error_code": 400,
  "error_message": "Invalid request parameters"
}
                
← Back
Next →

Login

Authenticate an existing user to receive an access token.

POST https://api.flaresend.com/login

Header Description
api-key Your unique API key
Content-Type application/json
Parameter Required Type Description
email yes string User's email
password yes string User's password
curl --location 'https://api.flaresend.com/login' \
--header 'api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "you@example.com",
    "password": "your-password"
}'
                
{
  "status": "success",
  "access_token": "YOUR_API_KEY",
  "token_type": "Bearer",
  "expires_in": 3600
}
                
{
  "error_code": 401,
  "error_message": "Invalid credentials"
}
                
← Back
Next →

Create Instance

Create a new WhatsApp instance for messaging.

POST https://api.flaresend.com/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.com/instances' \
--header 'api-key: YOUR_API_KEY' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data ''
                
{
  "status": "success",
  "instance_id": "inst123456",
  "message": "Instance created successfully",
  "created_at": "2025-09-26T11:50:00Z"
}
                
{
  "error_code": 401,
  "error_message": "Unauthorized"
}
                
← Back
Next →

Send Message

Send WhatsApp messages to one or multiple recipients.

POST https://api.flaresend.com/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.com/send-message' \
--header 'api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
    "recipients": ["254712345678","254798765432"],
    "type": "text",
    "text": "Good morning, Sent from Whatsapp API"
}'
                
{
  "status": "success",
  "message_id": "msg123456",
  "recipients": ["254712345678", "254798765432"],
  "message": "Message sent successfully",
  "sent_at": "2025-09-26T11:50:00Z"
}
                
{
  "error_code": 400,
  "error_message": "Invalid request"
}
                
← Back

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
← Back
Next →