Website button & WhatsApp links
Website button statistics
GET
/v2/widgets/{widgetId}/stats- Scope:
widgets:read - Idempotency-Key:not used
- read only
Impressions (only when enabled, sampled), clicks, attributed conversations and conversion rate — per day, page, utm source / medium, campaign, agent, device and referrer domain. Counts only.
Parameters
Path
| Name | Type | Constraints | Description |
|---|---|---|---|
widgetIdrequired | Typestring | Constraints— | DescriptionWebsite button id (wgt_…). |
Query
| Name | Type | Constraints | Description |
|---|---|---|---|
fromoptional | Typestring | Constraints— | DescriptionYYYY-MM-DD (default: 30 days before to). |
tooptional | Typestring | Constraints— | DescriptionYYYY-MM-DD (default: today); at most 92 days. |
tzoptional | Typestring | Constraints— | DescriptionIANA time zone of the days (default Africa/Cairo). |
Headers
| Name | Type | Constraints | Description |
|---|---|---|---|
X-Request-Idoptional | Typestring | Constraints— | DescriptionOptional: your own request id, echoed back (otherwise we generate req_…). Quote it to support. |
Request
curl -X GET "https://mursilat.com/api/v2/widgets/widgetId/stats?from=2026-10-01&to=2026-10-14" \
-H "Authorization: Bearer $WASLA_API_KEY"const res = await fetch('https://mursilat.com/api/v2/widgets/widgetId/stats?from=2026-10-01&to=2026-10-14', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.WASLA_API_KEY}`,
},
});
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']}"}
res = requests.get(
"https://mursilat.com/api/v2/widgets/widgetId/stats?from=2026-10-01&to=2026-10-14",
headers=headers,
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/widgets/widgetId/stats?from=2026-10-01&to=2026-10-14');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('WASLA_API_KEY'),
],
]);
$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);Response
200Example
{
"range": {
"from": "2026-10-01",
"to": "2026-10-14",
"tz": "Africa/Cairo"
},
"totals": {
"impressions": null,
"clicks": 40,
"conversations": 12,
"conversionRate": 0.3
},
"byDay": [
{
"day": "2026-10-14",
"impressions": 0,
"clicks": 3,
"conversations": 1
}
],
"byPage": [
{
"key": "/products/bag",
"clicks": 10,
"conversations": 3
}
],
"bySource": [
{
"key": "facebook / cpc",
"source": "facebook",
"medium": "cpc",
"clicks": 5,
"conversations": 2
}
],
"byCampaign": [
{
"key": "summer",
"clicks": 4,
"conversations": 1
}
],
"byAgent": [
{
"key": "sales",
"clicks": 4,
"conversations": 1
}
],
"byDevice": [
{
"key": "mobile",
"clicks": 30,
"conversations": 9
}
],
"byReferrer": [
{
"key": "facebook.com",
"clicks": 4,
"conversations": 1
}
]
}Response schema
Fields of the example answer. Expand objects and arrays.
responseobject9 fields
rangeobject3 fields
- fromstring "2026-10-01"
- tostring "2026-10-14"
- tzstring "Africa/Cairo"
totalsobject4 fields
- impressionsnull null
- clicksinteger 40
- conversationsinteger 12
- conversionRatenumber 0.3
byDayarray1 items
[0]object4 fields
- daystring "2026-10-14"
- impressionsinteger 0
- clicksinteger 3
- conversationsinteger 1
byPagearray1 items
[0]object3 fields
- keystring "/products/bag"
- clicksinteger 10
- conversationsinteger 3
bySourcearray1 items
[0]object5 fields
- keystring "facebook / cpc"
- sourcestring "facebook"
- mediumstring "cpc"
- clicksinteger 5
- conversationsinteger 2
byCampaignarray1 items
[0]object3 fields
- keystring "summer"
- clicksinteger 4
- conversationsinteger 1
byAgentarray1 items
[0]object3 fields
- keystring "sales"
- clicksinteger 4
- conversationsinteger 1
byDevicearray1 items
[0]object3 fields
- keystring "mobile"
- clicksinteger 30
- conversationsinteger 9
byReferrerarray1 items
[0]object3 fields
- keystring "facebook.com"
- clicksinteger 4
- conversationsinteger 1
Errors
Besides the authentication, rate-limit and validation errors every endpoint can return:
- 404WIDGET_NOT_FOUNDWebsite button not found.
- 400STATS_RANGE_INVALIDInvalid date range.
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. (read only)
Kept only in this tab’s memory: never saved, never put in the URL, sent only to mursilat.com. Reloading the page forgets it.