protogrid

Search / kz.wapi/whatsapp

wapi.kz: WhatsApp attribution and API

R1· needs a key

WhatsApp with ad attribution: which ad, link or site brought each chat, and did it sell

v0.5.1 · active · repository · website · descriptor JSON · versions

An agent can connect on its own if it already holds WHATSAPP_TOKEN.Remote endpoint behind a static API key or header. The registry never sees the value; the agent fills the placeholder.
Quality83new
Trust95of 100
Uptime, 30 days96%
Latency p501228 msp95 1782 ms

Connect

8 clients · secrets stay placeholders
{
  "mcpServers": {
    "whatsapp": {
      "type": "http",
      "url": "https://wapi.kz/api/mcp",
      "headers": {
        "Authorization": "Bearer ${WHATSAPP_TOKEN}"
      }
    }
  }
}
claude mcp add --transport http whatsapp https://wapi.kz/api/mcp --header "Authorization: Bearer ${WHATSAPP_TOKEN}"
[mcp_servers.whatsapp]
url = "https://wapi.kz/api/mcp"
bearer_token_env_var = "WHATSAPP_TOKEN"
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "whatsapp": {
      "type": "remote",
      "url": "https://wapi.kz/api/mcp",
      "enabled": true,
      "headers": {
        "Authorization": "Bearer {env:WHATSAPP_TOKEN}"
      }
    }
  }
}
{
  "mcpServers": {
    "whatsapp": {
      "type": "http",
      "url": "https://wapi.kz/api/mcp",
      "headers": {
        "Authorization": "Bearer ${WHATSAPP_TOKEN}"
      }
    }
  },
  "deeplink": "cursor://anysphere.cursor-deeplink/mcp/install?name=whatsapp&config=eyJ0eXBlIjoiaHR0cCIsInVybCI6Imh0dHBzOi8vd2FwaS5rei9hcGkvbWNwIiwiaGVhZGVycyI6eyJBdXRob3JpemF0aW9uIjoiQmVhcmVyICR7V0hBVFNBUFBfVE9LRU59In19"
}
{
  "servers": {
    "whatsapp": {
      "type": "http",
      "url": "https://wapi.kz/api/mcp",
      "headers": {
        "Authorization": "Bearer ${WHATSAPP_TOKEN}"
      }
    }
  },
  "deeplink": "vscode:mcp/install?%7B%22name%22%3A%22whatsapp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fwapi.kz%2Fapi%2Fmcp%22%2C%22headers%22%3A%7B%22Authorization%22%3A%22Bearer%20%24%7BWHATSAPP_TOKEN%7D%22%7D%7D"
}
{
  "mcpServers": {
    "whatsapp": {
      "httpUrl": "https://wapi.kz/api/mcp",
      "headers": {
        "Authorization": "Bearer ${WHATSAPP_TOKEN}"
      }
    }
  }
}
extensions:
  "whatsapp":
    enabled: true
    name: "whatsapp"
    type: streamable_http
    uri: "https://wapi.kz/api/mcp"
    headers:
      "Authorization": "Bearer ${WHATSAPP_TOKEN}"
    timeout: 300

Placeholders to fill from your own secret store: ${WHATSAPP_TOKEN}. The registry never accepts secret values.

Quality 83 / 100new

protocol75 · weight 25
  • warn
    protocol.modernnewest supported version is 2025-11-25; 2026-07-28 not supported, older versions are deprecated until 2027-07-28
  • n/a
    protocol.statelessonly applies to 2026-07-28 servers
  • pass
    protocol.transportstreamable HTTP
  • n/a
    protocol.list_ttlonly applies to 2026-07-28 servers
authorizationn/a · weight 15
  • n/a
    auth.prm, auth.as_metadata, auth.cimdno remote uses OAuth
  • n/a
    auth.secret_in_urlno templated URL
tool hygiene89 · weight 30
  • pass
    tools.descriptionsevery tool has a description
  • warn
    tools.description_length2 tools have descriptions over 1,024 characters, which crowds the context
  • pass
    tools.schemasevery tool has an object input schema
  • pass
    tools.annotations33 of 33 tools declare readOnlyHint or destructiveHint
  • pass
    tools.directory_hintsevery tool declares readOnlyHint, destructiveHint, idempotentHint and openWorldHint
  • warn
    tools.token_costabout 8,148 tokens to load every tool
  • pass
    tools.api_dumptools are not a one-to-one API dump
  • pass
    tools.hidden_textno hidden text in tool names, descriptions, schemas or annotations
  • pass
    tools.poisoningno instructions aimed at the model in tool definitions
stabilityn/a · weight 15
  • n/a
    stability.changes, stability.rug_pull, stability.new_linkstool history recorded for 5 of the 7 days needed
dependenciesn/a · weight 15
  • n/a
    deps.known_vulns, deps.mcp_sdk_version, deps.resolvableno npm or PyPI package

33 tools, about 8,148 tokens to load them all · tool set 5e1f30e692e8 · tools last changed 2026-11-26 · checked 2026-11-29 14:15 UTC

Definition changes

  • update_leadchangeddescription, input schemano new version
    before

    Change a lead's stage and/or record a sale. The lead — by id or by the customer's phone (their latest lead is used). Examples: "sale of 45,000 ₸ to customer 77011234567" → phone=77011234567, stage=won, value=45000; "the customer is qualified" → stage=qualified; "lost" → stage=lost. A stage or amount change is sent as a lead.updated event to the number's webhook.

    after · 80% of words in common

    Change a lead's stage and/or record a sale. The lead — by id or by the customer's phone (their latest lead is used). Examples: "sale of 45,000 ₸ to customer 77011234567" → phone=77011234567, stage=won, value=45000; "they bought on November 20" → won_at=2026-11-20; "the customer is qualified" → stage=qualified; "lost" → stage=lost. A stage, amount or sale date change is sent as a lead.updated event to the number's webhook.

  • list_leadschangeddescription, input schemano new version
    before

    Leads — people who wrote to a WhatsApp number for the first time, each with the source that brought the chat: channel = ctwa (Meta click-to-WhatsApp ad: ad.ad_id, adset_id, campaign_id, ad text and link), link (tracking link wapi.kz/go/…: click.utm_*, fbclid, gclid), organic (came on their own). match_method — how the chat was matched to the link: hidden_code (invisible marker in the text), visible_code, time_window (by time after the click). stage — stage, value — sale amount. device — the person's device (ios, android, web — computer, unknown). first_reply — our first reply: at, seconds (seconds after the first message), source (phone — from the phone, api, mcp), answered_by (human — a person from the phone, program — a program); null — not replied yet. Newest first; next_cursor — for the next page (pass it as cursor).

    after · 89% of words in common

    Leads — people who wrote to a WhatsApp number for the first time, each with the source that brought the chat: channel = ctwa (Meta click-to-WhatsApp ad: ad.ad_id, adset_id, campaign_id, ad text and link), link (tracking link wapi.kz/go/…: click.utm_*, fbclid, gclid), organic (came on their own). match_method — how the chat was matched to the link: hidden_code (invisible marker in the text), visible_code, time_window (by time after the click). stage — stage, value — sale amount, won_at — sale date (when it was marked as a sale). won_since/won_until — only sales marked in that range, whenever the lead first wrote. device — the person's device (ios, android, web — computer, unknown). first_reply — our first reply: at, seconds (seconds after the first message), source (phone — from the phone, api, mcp), answered_by (human — a person from the phone, program — a program); null — not replied yet. Newest first; next_cursor — for the next page (pass it as cursor).

  • get_analyticschangeddescription, input schemano new version
    before

    End-to-end WhatsApp attribution: ad spend → leads → sales for a period — shows which ad, link or website brought each WhatsApp chat and whether it turned into a sale. group — row breakdown: campaign (campaigns), adset (ad sets), ad (ads), source (source: meta_ctwa — Meta click-to-WhatsApp ads, link:<utm_source> — tracking links, organic — people who wrote on their own), link (tracking links: clicks and leads), day (by day), device (the person's device: ios — iPhone, android, web — computer, unknown). Each row: spend — spend in the ad account currency, spend_kzt — in tenge at the National Bank of Kazakhstan rate, impressions, clicks, conversations (conversations according to Meta), leads, ad_leads (of them from ads), qualified, won (sales), revenue (₸; null — a sale in a currency without an exchange rate), cpl (cost per ad lead, ₸), cost_per_won (cost per sale, ₸), romi (%), conv_rate (sales/leads, %). Lead response speed: answered (how many got a reply), reply_median_seconds (median seconds to the first reply), no_reply_15m_rate and no_reply_1h_rate (% of leads with no reply within 15 minutes and within an hour), no_reply_rate (% of leads never replied to; leads younger than an hour are not counted in these rates until they are overdue). null — cannot be computed (no spend or division by zero). totals — total for the period. Examples: "cost per lead by campaign for the week" → group=campaign, since=2026-10-31; "how fast do we reply to leads" → totals.reply_median_seconds and no_reply_15m_rate; "which phones do people write from" → group=device.

    after · 85% of words in common

    End-to-end WhatsApp attribution: ad spend → leads → sales for a period — shows which ad, link or website brought each WhatsApp chat and whether it turned into a sale. group — row breakdown: campaign (campaigns), adset (ad sets), ad (ads), source (source: meta_ctwa — Meta click-to-WhatsApp ads, link:<utm_source> — tracking links, organic — people who wrote on their own), link (tracking links: clicks and leads), day (by day), device (the person's device: ios — iPhone, android, web — computer, unknown). Each row: spend — spend in the ad account currency, spend_kzt — in tenge at the National Bank of Kazakhstan rate, impressions, clicks, ctr (clicks / impressions, %), conversations (messaging conversations started according to Meta — usually more than leads: Meta also counts people who wrote before and repeat conversations), leads, ad_leads (of them from ads), qualified, won (sales), revenue (₸; null — a sale in a currency without an exchange rate), ad_won and ad_revenue (sales and revenue in ₸ from ads only — cost_per_won and romi are based on them), cpl (cost per ad lead, ₸), cost_per_won (cost per sale, ₸), romi (%), conv_rate (sales/leads, %). Lead response speed: answered (how many got a reply), reply_median_seconds (median seconds to the first reply), no_reply_15m_rate and no_reply_1h_rate (% of leads with no reply within 15 minutes and within an hour), no_reply_rate (% of leads never replied to; leads younger than an hour are not counted in these rates until they are overdue). null — cannot be computed (no spend or division by zero). totals — total for the period. sales_by — which sales count in the period: lead (default) — sales of leads who wrote in the period, whenever they bought (ROI of the period's ads); sale — sales marked in the period by sale date (won_at), whoever they came from ("revenue for November"). Examples: "cost per lead by campaign for the week" → group=campaign, since=2026-10-31; "how fast do we reply to leads" → totals.reply_median_seconds and no_reply_15m_rate; "which phones do people write from" → group=device; "revenue in November by sale date" → since=2026-11-01, until=2026-11-30, group=source, sales_by=sale.

  • set_webhookchangeddescriptionno new version
    before

    Set the webhook URL (https) where wapi immediately sends events: message (incoming, with a lead field), message.out (sent by a person from the phone), message.ack (delivered/read), session.status (connection), lead.created / lead.updated. With from — the webhook of one number, without from — for all numbers of the account. url: null or empty string — remove. Requests are signed with the X-Wapi-Signature header (secret — in the dashboard or via wapi webhook secret).

    after · 60% of words in common

    Set the webhook URL (https) where wapi immediately sends events: message (incoming, with a lead field; location, contact cards and polls parsed into wapi.details), message.out (sent by a person from the phone), message.ack (delivered/read), session.status (connection; on FAILED the reason is in wapi.reason: banned, logged_out, self), message.reaction, message.edited, message.revoked, call.received / call.accepted / call.rejected, poll.vote, group.v2.* (group join/leave/participants/update), lead.created / lead.updated. The contract version is in the X-Wapi-Webhook-Version header (2); skip unknown events with 200. With from — the webhook of one number, without from — for all numbers of the account. url: null or empty string — remove. Requests are signed with the X-Wapi-Signature header (secret — in the dashboard or via wapi webhook secret).

  • add_numberchangedtitle, description, annotationsmeaning changedno new version
    before

    Add a WhatsApp number to the account — PAID: 330 ₸ (KZT) per day; the first day is charged immediately, then daily until the number is deleted. Without confirm=true it changes nothing and returns the price and balance: ask the human first. After adding — connect_number to link WhatsApp.

    after · 35% of words in common

    Add a WhatsApp number to the account — PAID: 330 ₸ (KZT) per day; the first day is charged immediately (refunded automatically if the human deletes the number within 10 minutes without linking WhatsApp), then daily until the number is deleted. FREE TRIAL: an account without payments and with less than 330 ₸ gets its first number as a 60-minute trial (trial: true, trial_ends_at in the response; nothing is charged; limits: 20 outgoing actions (messages, reactions, edits, deletes), 20 number checks, first messages to at most 3 new people, no groups, files up to 5 MB — error code trial_limit; link WhatsApp within 15 minutes or the trial number is removed); one trial per account and per WhatsApp phone, at most 4 trial numbers service-wide (trial_slots_full — retry later or top up). If the human tops up at least 1000 ₸ before trial_ends_at, the number stays linked (first day charged at top-up); otherwise it is unlinked and deleted. Without confirm=true it changes nothing and returns the price (or the trial terms) and balance: ask the human first. After adding — connect_number to link WhatsApp.

  • get_messageschangeddescriptionno new version
    before

    Latest messages from the log (incoming and outgoing, newest first). source: contact — written by the other party, phone — sent by a person from the phone, api/mcp — sent by a program. chat — the other party's phone or chat_id, to get a single conversation. Messages with a file have media {id, kind, mimetype, filename, size, url} (the link is valid for 15 minutes; get a fresh one with get_media). name — contact name or group name, author — who wrote in a group.

    after · 67% of words in common

    Latest messages from the log (incoming and outgoing, newest first). source: contact — written by the other party, phone — sent by a person from the phone, api/mcp — sent by a program. chat — the other party's phone or chat_id, to get a single conversation. Messages with a file have media {id, kind, mimetype, filename, size, url} (the link is valid for 15 minutes; get a fresh one with get_media). name — contact name or group name, author — who wrote in a group. type location / contact / poll / call — parsed content in details (coordinates and map link; names and phones from contact cards; poll question, options and votes; call status) and a short summary in text. reactions — emoji reactions; edited_at / deleted_at — the message was edited / deleted for everyone.

  • get_groupaddedno new version

    One group of the number and its participants: jid, phone (null if hidden), name, admin.

  • list_groupsaddedno new version

    WhatsApp groups the number is a member of: id (chat_id for send_message to), name, participants count, admins_only (only admins can write), is_admin. The list is cached for 5 minutes.

  • delete_messageaddedno new version

    Delete your own message for everyone in WhatsApp (within about 2 days after sending). The record stays in the history with deleted_at.

  • edit_messageaddedno new version

    Edit the text of your own text message (WhatsApp allows it within 15 minutes after sending).

Showing the latest 10. Full history: list_changes · trend: quality JSON.

Checks run on what our credential-free, read-only probes observe; tools are never called and no code audit is performed. How it is computed.

Trust 95 / 100

provenance85
liveness98
freshness100
hygiene100

+repository +dns-namespace +website +reachable +uptime-96% +updated-6d-ago

Derived from observable signals (official registry feed and our own credential-free probes); no code audit performed. How it is computed.

Endpoints

Last 30 days96% of probes answered
remoteauthreachableuptime 30dp50p95protocollast ok
https://wapi.kz/api/mcp streamable-httpapi_key ${WHATSAPP_TOKEN}yes96%1228 ms1782 ms2025-11-252026-11-29

Tools (33)

add_numberAdd a WhatsApp number to the account — PAID: 330 ₸ (KZT) per day; the first day is charged immediately (refunded automatically if the human deletes the number within 10 minutes without linking WhatsApp), then daily until the number is deleted. FREE TRIAL: an account without payments and with less than 330 ₸ gets its first number as a 60-minute trial (trial: true, trial_ends_at in the response; nothing is charged; limits: 20 outgoing actions (messages, reactions, edits, deletes), 20 number checks, first messages to at most 3 new people, no groups, files up to 5 MB — error code trial_limit; link WhatsApp within 15 minutes or the trial number is removed); one trial per account and per WhatsApp phone, at most 4 trial numbers service-wide (trial_slots_full — retry later or top up). If the human tops up at least 1000 ₸ before trial_ends_at, the number stays linked (first day charged at top-up); otherwise it is unlinked and deleted. Without confirm=true it changes nothing and returns the price (or the trial terms) and balance: ask the human first. After adding — connect_number to link WhatsApp.
check_numberread-onlyCheck whether a phone number is on WhatsApp before sending. phone — digits with country code (77011234567). Limit: 200 checks per day per number.
connect_numberLink WhatsApp to a wapi number (or reconnect it if it dropped). With phone — a pairing code like ABCD-EFGH: the human opens WhatsApp → Linked devices → Link a device → "Link with phone number instead" and enters the code (the most convenient option for an agent; at most 4 codes per 10 minutes). Without phone — a QR image: scan it in WhatsApp → Linked devices (the QR lives ~20 s — request it again). Check the status afterwards with list_numbers (WORKING = connected); poll no more than once every 5–10 seconds.
create_exportBuild a ZIP archive: files and chat history (messages.json + messages.csv) for a period. Built in the background (usually minutes) — get_export returns the status and the link. At most 2 at a time and 10 per day.
create_linkCreate a tracking link to a WhatsApp number — to see which ad, post or website brought each chat: the person taps → lands in WhatsApp with prefilled text that carries an invisible click marker — and their first message is matched to the click (utm, fbclid, gclid). Without the marker (the person erased the text) — matching by time: a new chat within 15 minutes after the click. Returns url (for ads, bio, QR), wa_url and a snippet for the website. Example: name="Instagram bio", text="Hello! I'd like to book", utm_source=instagram.
delete_messagedestructiveDelete your own message for everyone in WhatsApp (within about 2 days after sending). The record stays in the history with deleted_at.
edit_messageEdit the text of your own text message (WhatsApp allows it within 15 minutes after sending).
get_analyticsread-onlyEnd-to-end WhatsApp attribution: ad spend → leads → sales for a period — shows which ad, link or website brought each WhatsApp chat and whether it turned into a sale. group — row breakdown: campaign (campaigns), adset (ad sets), ad (ads), source (source: meta_ctwa — Meta click-to-WhatsApp ads, link:<utm_source> — tracking links, organic — people who wrote on their own), link (tracking links: clicks and leads), day (by day), device (the person's device: ios — iPhone, android, web — computer, unknown). Each row: spend — spend in the ad account currency, spend_kzt — in tenge at the National Bank of Kazakhstan rate, impressions, clicks, ctr (clicks / impressions, %), conversations (messaging conversations started according to Meta — usually more than leads: Meta also counts people who wrote before and repeat conversations), leads, ad_leads (of them from ads), qualified, won (sales), revenue (₸; null — a sale in a currency without an exchange rate), ad_won and ad_revenue (sales and revenue in ₸ from ads only — cost_per_won and romi are based on them), cpl (cost per ad lead, ₸), cost_per_won (cost per sale, ₸), romi (%), conv_rate (sales/leads, %). Lead response speed: answered (how many got a reply), reply_median_seconds (median seconds to the first reply), no_reply_15m_rate and no_reply_1h_rate (% of leads with no reply within 15 minutes and within an hour), no_reply_rate (% of leads never replied to; leads younger than an hour are not counted in these rates until they are overdue). null — cannot be computed (no spend or division by zero). totals — total for the period. sales_by — which sales count in the period: lead (default) — sales of leads who wrote in the period, whenever they bought (ROI of the period's ads); sale — sales marked in the period by sale date (won_at), whoever they came from ("revenue for November"). Examples: "cost per lead by campaign for the week" → group=campaign, since=2026-10-31; "how fast do we reply to leads" → totals.reply_median_seconds and no_reply_15m_rate; "which phones do people write from" → group=device; "revenue in November by sale date" → since=2026-11-01, until=2026-11-30, group=source, sales_by=sale.
get_balanceread-onlyAccount balance in tenge (KZT), the daily charge (330 ₸ per active number) and how many days it will last.
get_exportread-onlyExport status (queued, running, done, failed, expired), progress and the archive link when ready (the link is valid for 15 minutes — request it again; the archive is kept for 24 hours).
get_groupread-onlyOne group of the number and its participants: jid, phone (null if hidden), name, admin.
get_leadread-onlyLead card: source (ad or link), first message, device, first reply (first_reply), stage and amount; conversation — the chat from the log: messages, incoming, outgoing, last_at, incoming_after_reply (how many messages the person sent after our first reply — whether the conversation continued), outgoing_after_reply; all touches (repeat visits from ads/links; raw holds the raw ad data, and the first touch has first_message — the raw first WhatsApp message without files or keys) and the stage history (who changed it and when).
get_limitsread-onlyThe number's limits for today and its trust score (0–100): how many messages, and first messages to new people, can still be sent.
get_link_clicksread-onlyTracking link clicks (newest first): time, IP, geo (country, region, city), device, OS, browser or app (Instagram, TikTok…), source, language, visitor (visitor; returning — clicked before), utm, fbclid/gclid, website page, and the lead the click was matched to (lead: id, phone, stage; null — the person did not write). lead=none — clicked but did not write on WhatsApp. Without code — clicks on all links of the account (or of number from), each with the link code and name.
get_link_statsread-onlyTracking link click stats for a period — which sources, campaigns and pages bring WhatsApp chats and sales: clicks, unique clicks, visitors and returning visitors, how many reached a WhatsApp chat (leads, conversion %), sales and revenue, clicks without a lead, median minutes from click to message, bots; by day and breakdowns by: country, city, device, os, browser (and apps), source, lang, utm_source, utm_campaign, link, hour. code — one link, without code — all links of the account (or of number from).
get_mediaread-onlyA message's file (photo, video, voice message, document, sticker) by media.id from get_messages: type, name, size and a fresh download link (valid for 15 minutes).
get_messagesread-onlyLatest messages from the log (incoming and outgoing, newest first). source: contact — written by the other party, phone — sent by a person from the phone, api/mcp — sent by a program. chat — the other party's phone or chat_id, to get a single conversation. Messages with a file have media {id, kind, mimetype, filename, size, url} (the link is valid for 15 minutes; get a fresh one with get_media). name — contact name or group name, author — who wrote in a group. type location / contact / poll / call — parsed content in details (coordinates and map link; names and phones from contact cards; poll question, options and votes; call status) and a short summary in text. reactions — emoji reactions; edited_at / deleted_at — the message was edited / deleted for everyone.
get_statusread-onlySummary: numbers (connected or not) and balance.
list_ad_accountsread-onlyConnected Meta ad accounts (Facebook / Instagram ads) and the connections to them. For each ad account: id (for the account parameter), external_id (act_…), name, currency, enabled — whether it is synced, synced_at — when data was last fetched, error — what went wrong, capi_enabled — whether conversions are sent to Meta (beta). A connection has status: active, expired (the token expired — the human needs to reconnect the ad account at wapi.kz/app/integrations). An ad account can only be connected in the wapi.kz dashboard (Facebook login).
list_ad_changesread-onlyLog of ad changes made through wapi (dashboard, API, MCP, CLI): what changed (field: status, daily_budget, lifetime_budget), before → after (budget in the ad account currency), who (by), whether Meta accepted it (ok) and its response. Newest first.
list_ad_objectsread-onlyCampaigns, ad sets and ads from connected Meta ad accounts (data from the last sync, hourly). Fields: external_id (the Meta id — for set_ad_status / set_ad_budget), level (campaign | adset | ad), name, status (what is set: ACTIVE / PAUSED), effective_status (what is actually happening: ACTIVE, CAMPAIGN_PAUSED, ADSET_PAUSED, DISAPPROVED, WITH_ISSUES, ARCHIVED…), objective (campaign objective; for an ad set — the optimization goal), destination (where it leads: WHATSAPP, MESSENGER, WEBSITE…), parent_id, campaign_id, daily_budget / lifetime_budget (in the ad account currency, e.g. 5000 = 5,000 ₸; null — the budget is set at another level), currency. Spend, leads and sales for these objects — the get_analytics tool. Example: all ad sets of a campaign — {level: "adset", parent: "<campaign id>"}.
list_groupsread-onlyWhatsApp groups the number is a member of: id (chat_id for send_message to), name, participants count, admins_only (only admins can write), is_admin. The list is cached for 5 minutes.
list_leadsread-onlyLeads — people who wrote to a WhatsApp number for the first time, each with the source that brought the chat: channel = ctwa (Meta click-to-WhatsApp ad: ad.ad_id, adset_id, campaign_id, ad text and link), link (tracking link wapi.kz/go/…: click.utm_*, fbclid, gclid), organic (came on their own). match_method — how the chat was matched to the link: hidden_code (invisible marker in the text), visible_code, time_window (by time after the click). stage — stage, value — sale amount, won_at — sale date (when it was marked as a sale). won_since/won_until — only sales marked in that range, whenever the lead first wrote. device — the person's device (ios, android, web — computer, unknown). first_reply — our first reply: at, seconds (seconds after the first message), source (phone — from the phone, api, mcp), answered_by (human — a person from the phone, program — a program); null — not replied yet. Newest first; next_cursor — for the next page (pass it as cursor).
list_linksread-onlyTracking links wapi.kz/go/<code>: where they lead (from — number id, phone), first message text, default utm, number of clicks and leads. url — the link for ads, bio, QR; snippet — script code for a website (routes the site's WhatsApp buttons through this link with utm and fbclid).
list_numbersread-onlyThe account's WhatsApp numbers: id (for the from parameter), phone, whether it is connected (connected), status (active / paused — balance ran out).
react_messageReact to a message with an emoji (or remove the reaction with an empty emoji). message_id — id from get_messages (or wa_message_id). Works for incoming and own messages.
send_messageSend a WhatsApp message from a connected number: text, image (image_url, JPEG/PNG/WebP), file (file_url), voice message (voice_url — MP3/M4A/WAV/OGG, converted to a WhatsApp voice message), video (video_url — MP4; MOV/WebM are converted), location, contact card or poll. Size — up to the WhatsApp limit (2 GB). to — recipient: phone digits with country code (77011234567) or a chat_id from get_messages / list_groups: …@c.us (personal), …@lid (hidden number), …@g.us (a group the number is a member of; at most 100 group messages per day per number). With an attachment, text is the caption (optional; voice messages have no caption). reply_to quotes an earlier message (then to may be omitted). By default the number first marks the chat as read and shows "typing…" for up to ~2.5 s (human-like, lowers the ban risk); set typing/mark_read to false to skip. Pass idempotency_key when retrying: the same key within 24 h returns the first result instead of sending again.
set_ad_budgetChange the daily (daily_budget) or lifetime (lifetime_budget) budget of a campaign or ad set in Meta. WARNING: this spends the client's money — raising the budget immediately increases spend charged to their card/account in Meta. Change it only if the human asked for it or explicitly agreed. The amount is in the ad account currency, in regular units (5000 = 5,000 ₸ or $5000 — see currency in list_ad_objects), not in cents. Only an already set budget can be changed: if an ad set has no budget, it is set on the campaign (CBO) — change the campaign budget. Safeguard: one call changes the budget by at most 3x; more — only with force: true after the human confirms. Meta limits the frequency: an ad set budget — no more than 4 times per hour. The change is logged (list_ad_changes).
set_ad_statusPause or launch a campaign, ad set or ad in Meta. status: PAUSED — pause (the ad stops showing and spending money), ACTIVE — launch (the ad starts spending the client's budget). Pausing a campaign stops all its ad sets and ads. The change is logged (list_ad_changes). Before launching, make sure the human wants it.
set_number_leadsTurn counting of organic leads on a number on or off: when on, every new contact who came without an ad or link becomes a lead (organic). Existing contacts do not become leads. Leads from ads and links are always counted.
set_webhookSet the webhook URL (https) where wapi immediately sends events: message (incoming, with a lead field; location, contact cards and polls parsed into wapi.details), message.out (sent by a person from the phone), message.ack (delivered/read), session.status (connection; on FAILED the reason is in wapi.reason: banned, logged_out, self), message.reaction, message.edited, message.revoked, call.received / call.accepted / call.rejected, poll.vote, group.v2.* (group join/leave/participants/update), lead.created / lead.updated. The contract version is in the X-Wapi-Webhook-Version header (2); skip unknown events with 200. With from — the webhook of one number, without from — for all numbers of the account. url: null or empty string — remove. Requests are signed with the X-Wapi-Signature header (secret — in the dashboard or via wapi webhook secret).
sync_adsFetch fresh data from Meta now: campaigns, ad sets, ads, budgets and stats for today and yesterday (on the first run of the day — for 30 days). Normally this happens automatically (structure hourly, stats every 30 minutes) — call it if you have just changed something in Ads Manager. No more than 3 times per 10 minutes. The response — per ad account: how many objects and stats rows were fetched, or an error.
update_leadChange a lead's stage and/or record a sale. The lead — by id or by the customer's phone (their latest lead is used). Examples: "sale of 45,000 ₸ to customer 77011234567" → phone=77011234567, stage=won, value=45000; "they bought on November 20" → won_at=2026-11-20; "the customer is qualified" → stage=qualified; "lost" → stage=lost. A stage, amount or sale date change is sent as a lead.updated event to the number's webhook.

Schemas: list_tools.

Similar MCP servers

Official server.json
{
  "name": "kz.wapi/whatsapp",
  "icons": [
    {
      "src": "https://wapi.kz/icon-512.png",
      "sizes": [
        "512x512"
      ],
      "mimeType": "image/png"
    }
  ],
  "title": "wapi.kz: WhatsApp attribution and API",
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
  "remotes": [
    {
      "url": "https://wapi.kz/api/mcp",
      "type": "streamable-http",
      "headers": [
        {
          "name": "Authorization",
          "isSecret": true,
          "isRequired": true,
          "description": "Your wapi.kz API key as 'Bearer <key>'. Free sandbox key after sign-up at https://wapi.kz/register"
        }
      ]
    }
  ],
  "version": "0.5.1",
  "repository": {
    "url": "https://github.com/wapi-kz/wapi-mcp",
    "source": "github"
  },
  "websiteUrl": "https://wapi.kz/guides/whatsapp-ai-agent-mcp",
  "description": "WhatsApp with ad attribution: which ad, link or site brought each chat, and did it sell"
}