Website button & WhatsApp links
Create a tracked WhatsApp link
/v2/links- Scope:
links:write - Idempotency-Key:optional
- changes settings
https://mursilat.com/l/<slug> records an anonymous click and redirects (302) to wa.me with the prefilled text + ref code — never anywhere else. Slug: random 10 chars (unguessable) or a custom word. utm_* on the visited URL override the defaults. QR codes (SVG / PNG) are in the dashboard.
Parameters
Headers
| Name | Type | Constraints | Description |
|---|---|---|---|
Idempotency-Keyoptional | Typestring | Constraints≤ 191 chars | DescriptionYour unique id for this operation (≤ 191 visible ASCII). A retry with the same key and body returns the first answer with Idempotent-Replayed: true — it never runs twice. Kept 24 h. |
X-Request-Idoptional | Typestring | Constraints— | DescriptionOptional: your own request id, echoed back (otherwise we generate req_…). Quote it to support. |
Request
curl -X POST "https://mursilat.com/api/v2/links" \
-H "Authorization: Bearer $WASLA_API_KEY" \
-H "Idempotency-Key: order-1042-confirm" \
-H "Content-Type: application/json" \
-d '{
"name": "Instagram bio",
"numberId": "cm1abcd2345efgh6789ijkl",
"message": "عايز أعرف الأسعار",
"utm": {
"source": "instagram",
"medium": "bio"
}
}'const res = await fetch('https://mursilat.com/api/v2/links', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WASLA_API_KEY}`,
'Idempotency-Key': 'order-1042-confirm',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Instagram bio",
"numberId": "cm1abcd2345efgh6789ijkl",
"message": "عايز أعرف الأسعار",
"utm": {
"source": "instagram",
"medium": "bio"
}
}),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import os
import requests
headers = {"Authorization": f"Bearer {os.environ['WASLA_API_KEY']}", "Idempotency-Key": "order-1042-confirm"}
res = requests.post(
"https://mursilat.com/api/v2/links",
headers=headers,
json={
"name": "Instagram bio",
"numberId": "cm1abcd2345efgh6789ijkl",
"message": "عايز أعرف الأسعار",
"utm": {
"source": "instagram",
"medium": "bio"
}
},
timeout=30,
)
data = res.json()
if not res.ok:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$ch = curl_init('https://mursilat.com/api/v2/links');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('WASLA_API_KEY'),
'Idempotency-Key: order-1042-confirm',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Instagram bio',
'numberId' => 'cm1abcd2345efgh6789ijkl',
'message' => 'عايز أعرف الأسعار',
'utm' => [
'source' => 'instagram',
'medium' => 'bio'
]
], JSON_UNESCAPED_UNICODE),
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($status >= 400) { throw new Exception($data['error']['code'] . ': ' . $data['error']['message']); }
print_r($data);{
"name": "Instagram bio",
"numberId": "cm1abcd2345efgh6789ijkl",
"message": "عايز أعرف الأسعار",
"utm": {
"source": "instagram",
"medium": "bio"
}
}Response
201Example
{
"id": "cm9link0001",
"name": "Instagram bio",
"slug": "k7m2xq9prw",
"customSlug": false,
"url": "https://mursilat.com/l/k7m2xq9prw",
"numberId": "cm1abcd2345efgh6789ijkl",
"number": {
"name": "فرع المعادي",
"phone": "201001234567"
},
"message": "عايز أعرف الأسعار",
"utm": {
"source": "instagram",
"medium": "bio",
"campaign": "",
"content": "",
"term": ""
},
"attribution": {
"enabled": true,
"label": "ref",
"position": "end"
},
"enabled": true,
"stats7d": {
"clicks": 64,
"conversations": 18
},
"createdAt": "2026-10-14T09:00:00.000Z",
"updatedAt": "2026-10-14T09:00:00.000Z"
}Response schema
Fields of the example answer. Expand objects and arrays.
responseobject14 fields
- idstring "cm9link0001"
- namestring "Instagram bio"
- slugstring "k7m2xq9prw"
- customSlugboolean false
- urlstring "https://mursilat.com/l/k7m2xq9prw"
- numberIdstring "cm1abcd2345efgh6789ijkl"
numberobject2 fields
- namestring "فرع المعادي"
- phonestring "201001234567"
- messagestring "عايز أعرف الأسعار"
utmobject5 fields
- sourcestring "instagram"
- mediumstring "bio"
- campaignstring ""
- contentstring ""
- termstring ""
attributionobject3 fields
- enabledboolean true
- labelstring "ref"
- positionstring "end"
- enabledboolean true
stats7dobject2 fields
- clicksinteger 64
- conversationsinteger 18
- createdAtstring "2026-10-14T09:00:00.000Z"
- updatedAtstring "2026-10-14T09:00:00.000Z"
Errors
Besides the authentication, rate-limit and validation errors every endpoint can return:
- 403LINK_LIMIT_REACHEDYour plan allows no more WhatsApp links.
- 403LINK_CUSTOM_SLUG_PLANCustom link names need a paid plan.
- 400LINK_SLUG_INVALIDCustom slug: 3–40 lower-case letters, digits or dashes.
- 400LINK_SLUG_RESERVEDThis slug is a reserved word.
- 409LINK_SLUG_TAKENThis slug is already used.
- 400LINK_NUMBER_INVALIDnumberId is not one of your numbers.
- 400LINK_NUMBER_NO_PHONEThe number was never linked: its phone is unknown.
- 400LINK_FIELD_INVALIDA link field is invalid (details.field, details.reason).
- 403NUMBER_NOT_ALLOWEDThe key is restricted to other numbers.
Try it
Send this request from your browser to the Mursilat API.
documented examplePreview — this copy of the docs isn’t on mursilat.com, so the console shows the documented example instead of calling the API.
Kept only in this tab’s memory: never saved, never put in the URL, sent only to mursilat.com. Reloading the page forgets it.
curl -X POST 'https://mursilat.com/api/v2/links' \
-H "Authorization: Bearer $WASLA_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"name":"Instagram bio","numberId":"cm1abcd2345efgh6789ijkl","message":"عايز أعرف الأسعار","utm":{"source":"instagram","medium":"bio"}}'