Website button & WhatsApp links
Update a tracked link
PATCH
/v2/links/{linkId}- Scope:
links:write - Idempotency-Key:optional
- changes settings
Any of name, numberId, message, utm, slug (null = new random slug), attribution, enabled (a disabled link answers 410).
Parameters
Path
| Name | Type | Constraints | Description |
|---|---|---|---|
linkIdrequired | Typestring | Constraints— | DescriptionTracked link id. |
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 PATCH "https://mursilat.com/api/v2/links/linkId" \
-H "Authorization: Bearer $WASLA_API_KEY" \
-H "Idempotency-Key: order-1042-confirm" \
-H "Content-Type: application/json" \
-d '{
"enabled": false
}'const res = await fetch('https://mursilat.com/api/v2/links/linkId', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.WASLA_API_KEY}`,
'Idempotency-Key': 'order-1042-confirm',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"enabled": false
}),
});
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.patch(
"https://mursilat.com/api/v2/links/linkId",
headers=headers,
json={
"enabled": False
},
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/linkId');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('WASLA_API_KEY'),
'Idempotency-Key: order-1042-confirm',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'enabled' => false
], 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);{
"enabled": false
}Response
200Example
{
"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": false,
"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 false
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:
- 404LINK_NOT_FOUNDLink not found.
- 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.
Real requests use your real number and plan: they can send WhatsApp messages, spend quota and delete data. (changes settings)
Kept only in this tab’s memory: never saved, never put in the URL, sent only to mursilat.com. Reloading the page forgets it.