API Access
Blueticks provides a simple REST API that allows you to send WhatsApp messages programmatically using your personal WhatsApp account through our browser extension.
Getting Started
To access the API:
- Navigate to your Account Settings
- Select “API” from the sidebar
- Your API token will be displayed with an option to regenerate it
API Authentication
The Blueticks API uses a simple API key authentication system. Your API token is displayed on the API page and can be regenerated at any time for security purposes.
Your API Token
- Each account has one API token that authenticates all API requests
- Click “REGENERATE” to create a new token (this will invalidate the previous token)
- Click “Copy” to copy your token to the clipboard
- Keep your API token secure and never share it publicly
API Endpoint
All API requests are made to:
https://api.blueticks.co
Sending Messages
POST /messages
Send a WhatsApp message through your connected account.
Endpoint: https://api.blueticks.co/messages
Method: POST
Headers:
Content-Type: application/json
Request Body Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
apiKey | string | Yes | Your API authentication token |
to | string | Yes | Full phone number with country prefix (e.g., “+1234567890”) |
message | string | Yes | The message text to send |
fileUrl | string | No | URL of a file to attach to the message |
mimeType | string | No | MIME type of the attached file (see list of MIME types) |
dueDate | string | No | ISO date string for scheduled delivery (optional) |
callbackUrl | string | No | URL to receive delivery status webhooks (optional) |
Example Request
fetch("https://api.blueticks.co/messages", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
apiKey: "6U8gFviZD3zRg8soAYTThyi9ZYs7A0y4",
to: "+1234567890",
message: "Hello from Blueticks API!",
})
})
Example with File Attachment
fetch("https://api.blueticks.co/messages", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
apiKey: "your-api-key-here",
to: "+1234567890",
message: "Check out this document!",
fileUrl: "https://example.com/document.pdf",
mimeType: "application/pdf"
})
})
Example with Scheduled Delivery
fetch("https://api.blueticks.co/messages", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
apiKey: "your-api-key-here",
to: "+1234567890",
message: "This message is scheduled!",
dueDate: "2024-12-25T10:00:00Z"
})
})
Testing the API
The API page includes a built-in testing interface where you can:
- Enter a phone number (with country code)
- Type your message
- Optionally add file attachments and scheduling
- Click “Send Message” to test the API
This helps you verify your API integration before implementing it in your application.
Supported File Types
You can attach files to messages by providing a publicly accessible URL. Common supported MIME types include:
- Images:
image/jpeg
,image/png
,image/gif
,image/webp
- Documents:
application/pdf
,application/msword
,application/vnd.openxmlformats-officedocument.wordprocessingml.document
- Audio:
audio/mpeg
,audio/wav
,audio/ogg
- Video:
video/mp4
,video/webm
,video/quicktime
For a complete list of supported MIME types, see the MDN documentation.
Response Format
The API returns JSON responses with appropriate HTTP status codes:
- 200 OK: Message sent successfully
- 400 Bad Request: Invalid request parameters
- 401 Unauthorized: Invalid API key
- 429 Too Many Requests: Rate limit exceeded
- 500 Internal Server Error: Server error
Rate Limits
API usage is subject to rate limits based on your subscription plan. If you exceed your rate limit, you’ll receive a 429 Too Many Requests
response.
Prerequisites
Important: To use the API, you must have:
- The Blueticks browser extension installed and connected to your WhatsApp account
- An active WhatsApp Web session
- Your browser must remain open for API messages to be sent
The API works by sending messages through your personal WhatsApp account via the browser extension, so an active connection is required.
Complete API Documentation
For additional details, code examples in multiple programming languages, and interactive testing, visit our complete API documentation:
Blueticks API Documentation (Postman)
Need Help?
If you encounter issues with the API:
- Check that your browser extension is connected and active
- Verify your API token is correct and hasn’t been regenerated
- Ensure phone numbers include the country code (e.g., “+1” for US numbers)
- Contact support through the help section for technical assistance