Introduction
Welcome to the HashLinks CRM API. Our API allows you to programmatically manage your leads, send WhatsApp messages, and sync your courier/order logistics directly with your own backend applications.
The HashLinks API is built on REST principles, uses standard HTTP verbs, and returns JSON-encoded responses.
Authentication
Authenticate your API requests by including your secret API key in the request header. You can manage your API keys in the Developer Settings of your dashboard.
Authentication Header Example
Authorization: Bearer hl_live_xxxxxxxxxxxxxxxxxxxxxxx
Create a Lead
Creates a new lead object in your CRM pipeline. This is useful for connecting custom landing pages or external contact forms.
Parameters
| Name | Type | Description |
|---|---|---|
name required |
string | Full name of the lead. |
phone required |
string | Phone number including country code (e.g., +923001234567). |
source |
string | Origin of the lead (e.g., 'website', 'facebook_ad'). |
PHP (Laravel HTTP Client)
use Illuminate\Support\Facades\Http;
$response = Http::withToken('hl_live_secret_key')->post('https://api.hashlinks.com/v1/leads', [
'name' => 'Ali Khan',
'phone' => '+923001234567',
'source' => 'custom_landing_page'
]);
return $response->json();
Send WhatsApp Message
Send an automated message or template via the Official Meta WhatsApp API connected to your HashLinks account.
cURL
curl -X POST https://api.hashlinks.com/v1/messages/send \
-H "Authorization: Bearer hl_live_secret_key" \
-H "Content-Type: application/json" \
-d '{
"to": "+923001234567",
"type": "template",
"template_name": "order_confirmation"
}'
Webhooks
HashLinks can push real-time event data to your server. This is highly useful for Courier API integrations where you need to update order status (e.g., Leopard Courier tracking updates) in your custom backend.
Register your webhook URL in the settings panel to listen for events like message.received, lead.updated, or order.status_changed.