AiSensy MCP by usefulapi
v1.21.1Read AiSensy contacts, templates and campaigns; add contacts, send WhatsApp messages on approval.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
aisensy_get_project Get project
The AiSensy project (WhatsApp account) this key belongs to: name, status, plan and renewal date, monthly active user quota and usage, credit balance (raw units as AiSensy reports them), WhatsApp number, display name status, quality rating and messaging tier. GET /project/{project_id}.
aisensy_list_templates List WhatsApp templates
List the WhatsApp template messages of the project with name, language, status (PENDING, APPROVED, REJECTED), category, text and parameter count. Only APPROVED templates can be sent. Pages by record id: pass next_after from the previous reply as `after`. GET /project/{project_id}/wa_template/.
| Parameter | Type | Description |
|---|---|---|
after | string | Return records after this template id (exclusive); use the previous reply's next_after. |
before | string | Return records before this template id (exclusive). |
limit | integer | Templates per page, 1-100 (default 10). |
aisensy_get_template Get WhatsApp template
One WhatsApp template by id, with status, rejection reason, buttons and text. GET /project/{project_id}/wa_template/{id}.
| Parameter | Type | Description |
|---|---|---|
template_id * | string | AiSensy record id (as returned by the list tools). |
aisensy_list_campaigns List campaigns
List campaigns (API campaigns, broadcasts or both) with name, type, status, audience size, submitted count, template and creation time. Pages with skip + limit. POST /project/{project_id}/campaigns (a read: it only queries).
| Parameter | Type | Description |
|---|---|---|
campaign_type | string | Which campaigns (default ALL). |
limit | integer | Campaigns per page, 1-100 (default 10; campaign records are large). |
skip | integer | Campaigns to skip (default 0). |
aisensy_list_api_campaigns List API campaigns
List the project's API campaigns (the campaigns messages can be sent through) with status and template. A campaign must be LIVE to send. GET /project/{project_id}/campaign/api.
aisensy_get_api_campaign Get API campaign
One API campaign by id: status, template, parameters and counts. GET /project/{project_id}/campaign/api/{campaign_id}.
| Parameter | Type | Description |
|---|---|---|
campaign_id * | string | AiSensy record id (as returned by the list tools). |
aisensy_get_campaign_analytics Get campaign analytics
Daily delivery and credit-usage statistics of one campaign (sent, delivered, read, failed counts and message credit usage), optionally within a date range. POST /project/{project_id}/campaign/analytics/{campaign_id} (a read: it only queries).
| Parameter | Type | Description |
|---|---|---|
campaign_id * | string | AiSensy record id (as returned by the list tools). |
end_date | string | Last day, yyyy-mm-dd. |
start_date | string | First day, yyyy-mm-dd. |
aisensy_list_campaign_audience List campaign audience
Who a campaign was sent to, with name, number and sent/delivered/read times, optionally filtered by outcome (SENT, DELIVERED, READ, FAILED, REPLIED, CLICKED) and date range. Pages by cursor: pass next_after from the previous reply as `after`. GET /project/{project_id}/campaign/audience/{campaign_id}.
| Parameter | Type | Description |
|---|---|---|
campaign_id * | string | AiSensy record id (as returned by the list tools). |
after | string | Cursor from the previous reply's next_after. |
category | string | Only recipients with this outcome. |
end_date | string | Latest day, yyyy-mm-dd. |
limit | integer | Recipients per page, 1-1000 (default 20). |
sort | string | |
start_date | string | Earliest day, yyyy-mm-dd. |
aisensy_create_api_campaign Create API campaign
WRITE: create an API campaign that binds a name to an APPROVED WhatsApp template. It sends nothing; messages go out only when aisensy_send_campaign_message is called for it. Not idempotent: calling twice with the same name may create two campaigns or fail. POST /project/{project_id}/campaign/api.
| Parameter | Type | Description |
|---|---|---|
campaign_name * | string | Name of the new campaign. |
template_name * | string | Exact name of an APPROVED template (see aisensy_list_templates). |
aisensy_find_contact Find contact by phone number
Look up a contact by phone number: id, name, tags, attributes, opt-in/chat state and last activity. 404 means no such contact. GET /project/{project_id}/contact?action=FetchContact&mobile_number=.
| Parameter | Type | Description |
|---|---|---|
phone_number * | string | Phone number with country code, e.g. 919876543210 (digits; a leading + is dropped). |
aisensy_get_contact Get contact
One contact by id: name, phone number, tags, attributes, chat state and last activity. GET /project/{project_id}/contact/{contact_id}.
| Parameter | Type | Description |
|---|---|---|
contact_id * | string | AiSensy record id (as returned by the list tools). |
aisensy_create_contact Create contact
WRITE: add a contact (name and phone number with country code). AiSensy opts new contacts in to WhatsApp notifications automatically, so only add people who agreed to be messaged. A number that already exists returns a 409 conflict. POST /project/{project_id}/contact.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
phone_number * | string | Phone number with country code, e.g. 919876543210 (digits; a leading + is dropped). |
aisensy_update_contact Update contact
WRITE: change a contact's name, custom attributes, WhatsApp opt-in status or blocked status. Setting opted_in=false stops campaign messages to that person; blocked=true blocks them. Only the fields you pass change. PATCH /project/{project_id}/contact/{contact_id}.
| Parameter | Type | Description |
|---|---|---|
contact_id * | string | AiSensy record id (as returned by the list tools). |
attributes | object | Contact attributes as name → text value. AiSensy ignores attribute names that do not exist in the project. |
blocked | boolean | Whether the contact is blocked. |
name | string | |
opted_in | boolean | Whether the contact accepts WhatsApp notifications. |
aisensy_upsert_contacts Create or update contacts in bulk
WRITE (bulk): create or update up to 50 contacts by phone number in one call. Each row: phone_number, and optionally name (needed to create a new contact), attributes and opted_in. Without confirm=true it only PREVIEWS: it looks up every number and returns what would be created, updated (with the exact changes) or left unchanged. With confirm=true it looks each number up again and applies the rows one by one; a failed row does not stop the others, and every row reports its outcome (created, updated, unchanged, partial or failed). AiSensy ignores attribute names the project does not have: such…
| Parameter | Type | Description |
|---|---|---|
contacts * | array | 1-50 contacts, one row per phone number. |
confirm | boolean | Leave out (or false) to preview. Set true only after the user has seen the preview and approved the changes. |
aisensy_get_message Get message
One WhatsApp message by id: status (SENT, DELIVERED, READ), sent/delivered/read times, sender, campaign, content and price. GET /project/{project_id}/messages/{message_id}.
| Parameter | Type | Description |
|---|---|---|
message_id * | string | AiSensy record id (as returned by the list tools). |
aisensy_send_campaign_message Send campaign message
WRITE, SENDS A WHATSAPP MESSAGE TO A CUSTOMER AND SPENDS AISENSY CREDIT: send the template of a LIVE API campaign to one phone number (a new contact is created if the number is unknown). Not idempotent: every call sends again. template_params must match the template's parameter count. Show the user the recipient and the template first and set confirm=true only after they approve. POST /project/{project_id}/campaign/api/send.
| Parameter | Type | Description |
|---|---|---|
campaign_name * | string | Name of a LIVE API campaign (see aisensy_list_api_campaigns). |
confirm * | boolean | Must be true. Set it only after the user has seen and approved the recipient and the message in this conversation. |
name * | string | Recipient's name. |
phone_number * | string | Phone number with country code, e.g. 919876543210 (digits; a leading + is dropped). |
attributes | object | Contact attributes as name → text value. AiSensy ignores attribute names that do not exist in the project. |
default_country_code | string | Country code to assume when phone_number has none, e.g. 91. |
media_filename | string | File name shown for the media. |
media_url | string | Public https URL of the image/video/document for a media template. |
source | string | Lead source label. |
tags | array | Existing tags to put on the contact (unknown tags are ignored). |
template_params | array | Values for the template's {{1}}, {{2}}... in order; the count must match the template. |
aisensy_send_message Send WhatsApp message
WRITE, SENDS A WHATSAPP MESSAGE TO A CUSTOMER AND MAY SPEND AISENSY CREDIT: send either a free-text message (type=text; WhatsApp only delivers it inside the 24-hour window after the customer last wrote) or an approved template (type=template with template_name, language_code and body_params). Not idempotent. Show the user the recipient and the text first and set confirm=true only after they approve. POST /project/{project_id}/messages.
| Parameter | Type | Description |
|---|---|---|
confirm * | boolean | Must be true. Set it only after the user has seen and approved the recipient and the message in this conversation. |
phone_number * | string | Phone number with country code, e.g. 919876543210 (digits; a leading + is dropped). |
type * | string | text = free-form reply; template = an approved template. |
body_params | array | Values for the template's body {{1}}, {{2}}... in order (type=template). |
language_code | string | Template language code such as en, en_US, hi (type=template; default en). |
template_name | string | Approved template name (type=template). |
text | string | Message text (type=text). |