AiSensy MCP by usefulapi is an MCP server published by io.usefulapi, hosted at aisensy.usefulapi.io. When last checked on 2026-11-23 it was working: it answers and lists its tools. It declares 17 tools, including aisensy_get_project, aisensy_list_templates, aisensy_get_template, aisensy_list_campaigns, aisensy_list_api_campaigns.
Read AiSensy contacts, templates and campaigns; add contacts, send WhatsApp messages on approval.
4,413 connections through 5 shared values. Tap any node.
Squares are this server's values; dots are other servers sharing them. A shared address or publisher is a lead, not proof of a common operator.
Inferred from the host name and headers: what a server runs on, not who runs it.
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}.
No parameters.
{
"name": "aisensy_get_project",
"title": "Get project",
"description": "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}.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {}
},
"annotations": {
"title": "Get project",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}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. |
| limit | integer | Templates per page, 1-100 (default 10). |
| before | string | Return records before this template id (exclusive). |
{
"name": "aisensy_list_templates",
"title": "List WhatsApp templates",
"description": "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/.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"after": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,64}$",
"description": "Return records after this template id (exclusive); use the previous reply's next_after."
},
"limit": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Templates per page, 1-100 (default 10)."
},
"before": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,64}$",
"description": "Return records before this template id (exclusive)."
}
}
},
"annotations": {
"title": "List WhatsApp templates",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}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). |
{
"name": "aisensy_get_template",
"title": "Get WhatsApp template",
"description": "One WhatsApp template by id, with status, rejection reason, buttons and text. GET /project/{project_id}/wa_template/{id}.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"template_id"
],
"properties": {
"template_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,64}$",
"description": "AiSensy record id (as returned by the list tools)."
}
}
},
"annotations": {
"title": "Get WhatsApp template",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}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 |
|---|---|---|
| skip | integer | Campaigns to skip (default 0). |
| limit | integer | Campaigns per page, 1-100 (default 20). |
| campaign_type | string | Which campaigns (default ALL). |
{
"name": "aisensy_list_campaigns",
"title": "List campaigns",
"description": "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).",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"skip": {
"type": "integer",
"maximum": 100000,
"minimum": 0,
"description": "Campaigns to skip (default 0)."
},
"limit": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Campaigns per page, 1-100 (default 20)."
},
"campaign_type": {
"enum": [
"API",
"BROADCAST",
"ALL"
],
"type": "string",
"description": "Which campaigns (default ALL)."
}
}
},
"annotations": {
"title": "List campaigns",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}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.
No parameters.
{
"name": "aisensy_list_api_campaigns",
"title": "List API campaigns",
"description": "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.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {}
},
"annotations": {
"title": "List API campaigns",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}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). |
{
"name": "aisensy_get_api_campaign",
"title": "Get API campaign",
"description": "One API campaign by id: status, template, parameters and counts. GET /project/{project_id}/campaign/api/{campaign_id}.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"campaign_id"
],
"properties": {
"campaign_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,64}$",
"description": "AiSensy record id (as returned by the list tools)."
}
}
},
"annotations": {
"title": "Get API campaign",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}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 |
|---|---|---|
| end_date | string | Last day, yyyy-mm-dd. |
| start_date | string | First day, yyyy-mm-dd. |
| campaign_id * | string | AiSensy record id (as returned by the list tools). |
{
"name": "aisensy_get_campaign_analytics",
"title": "Get campaign analytics",
"description": "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).",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"campaign_id"
],
"properties": {
"end_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Last day, yyyy-mm-dd."
},
"start_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "First day, yyyy-mm-dd."
},
"campaign_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,64}$",
"description": "AiSensy record id (as returned by the list tools)."
}
}
},
"annotations": {
"title": "Get campaign analytics",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}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 |
|---|---|---|
| sort | string | one of ["asc","desc"] |
| after | string | Cursor from the previous reply's next_after. |
| limit | integer | Recipients per page, 1-1000 (default 20). |
| category | string | Only recipients with this outcome. |
| end_date | string | Latest day, yyyy-mm-dd. |
| start_date | string | Earliest day, yyyy-mm-dd. |
| campaign_id * | string | AiSensy record id (as returned by the list tools). |
{
"name": "aisensy_list_campaign_audience",
"title": "List campaign audience",
"description": "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}.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"campaign_id"
],
"properties": {
"sort": {
"enum": [
"asc",
"desc"
],
"type": "string"
},
"after": {
"type": "string",
"maxLength": 500,
"minLength": 1,
"description": "Cursor from the previous reply's next_after."
},
"limit": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Recipients per page, 1-1000 (default 20)."
},
"category": {
"enum": [
"SENT",
"DELIVERED",
"READ",
"FAILED",
"REPLIED",
"CLICKED"
],
"type": "string",
"description": "Only recipients with this outcome."
},
"end_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Latest day, yyyy-mm-dd."
},
"start_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Earliest day, yyyy-mm-dd."
},
"campaign_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,64}$",
"description": "AiSensy record id (as returned by the list tools)."
}
}
},
"annotations": {
"title": "List campaign audience",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}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). |
{
"name": "aisensy_create_api_campaign",
"title": "Create API campaign",
"description": "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.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"campaign_name",
"template_name"
],
"properties": {
"campaign_name": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Name of the new campaign."
},
"template_name": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Exact name of an APPROVED template (see aisensy_list_templates)."
}
}
},
"annotations": {
"title": "Create API campaign",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": false
}
}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). |
{
"name": "aisensy_find_contact",
"title": "Find contact by phone number",
"description": "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=.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"phone_number"
],
"properties": {
"phone_number": {
"type": "string",
"description": "Phone number with country code, e.g. 919876543210 (digits; a leading + is dropped)."
}
}
},
"annotations": {
"title": "Find contact by phone number",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}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). |
{
"name": "aisensy_get_contact",
"title": "Get contact",
"description": "One contact by id: name, phone number, tags, attributes, chat state and last activity. GET /project/{project_id}/contact/{contact_id}.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"contact_id"
],
"properties": {
"contact_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,64}$",
"description": "AiSensy record id (as returned by the list tools)."
}
}
},
"annotations": {
"title": "Get contact",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}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). |
{
"name": "aisensy_create_contact",
"title": "Create contact",
"description": "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.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"name",
"phone_number"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1
},
"phone_number": {
"type": "string",
"description": "Phone number with country code, e.g. 919876543210 (digits; a leading + is dropped)."
}
}
},
"annotations": {
"title": "Create contact",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": false
}
}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 |
|---|---|---|
| name | string | |
| blocked | boolean | Whether the contact is blocked. |
| opted_in | boolean | Whether the contact accepts WhatsApp notifications. |
| attributes | object | Contact attributes as name → text value. AiSensy ignores attribute names that do not exist in the project. |
| contact_id * | string | AiSensy record id (as returned by the list tools). |
{
"name": "aisensy_update_contact",
"title": "Update contact",
"description": "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}.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"contact_id"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1
},
"blocked": {
"type": "boolean",
"description": "Whether the contact is blocked."
},
"opted_in": {
"type": "boolean",
"description": "Whether the contact accepts WhatsApp notifications."
},
"attributes": {
"type": "object",
"description": "Contact attributes as name → text value. AiSensy ignores attribute names that do not exist in the project.",
"propertyNames": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"additionalProperties": {
"type": "string",
"maxLength": 1000
}
},
"contact_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,64}$",
"description": "AiSensy record id (as returned by the list tools)."
}
}
},
"annotations": {
"title": "Update contact",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": true
}
}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 fields come back in not_applied and the row is partial. Re-running the same rows changes nothing. AiSensy opts NEW contacts in to WhatsApp notifications automatically (opted_in=false on the row opts them out right after creation), so only add people who agreed to be messaged. Tags cannot be set here: the AiSensy Project API has no tag write for contacts. Uses GET/POST /project/{project_id}/contact and PATCH /project/{project_id}/contact/{contact_id}.
| Parameter | Type | Description |
|---|---|---|
| confirm | boolean | Leave out (or false) to preview. Set true only after the user has seen the preview and approved the changes. |
| contacts * | array | 1-50 contacts, one row per phone number. |
{
"name": "aisensy_upsert_contacts",
"title": "Create or update contacts in bulk",
"description": "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 fields come back in not_applied and the row is partial. Re-running the same rows changes nothing. AiSensy opts NEW contacts in to WhatsApp notifications automatically (opted_in=false on the row opts them out right after creation), so only add people who agreed to be messaged. Tags cannot be set here: the AiSensy Project API has no tag write for contacts. Uses GET/POST /project/{project_id}/contact and PATCH /project/{project_id}/contact/{contact_id}.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"contacts"
],
"properties": {
"confirm": {
"type": "boolean",
"description": "Leave out (or false) to preview. Set true only after the user has seen the preview and approved the changes."
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"required": [
"phone_number"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Contact name; required when the number is not a contact yet."
},
"opted_in": {
"type": "boolean",
"description": "Whether the contact accepts WhatsApp notifications."
},
"attributes": {
"type": "object",
"description": "Contact attributes as name → text value. AiSensy ignores attribute names that do not exist in the project.",
"propertyNames": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"additionalProperties": {
"type": "string",
"maxLength": 1000
}
},
"phone_number": {
"type": "string",
"description": "Phone number with country code, e.g. 919876543210 (digits; a leading + is dropped)."
}
},
"additionalProperties": false
},
"maxItems": 50,
"minItems": 1,
"description": "1-50 contacts, one row per phone number."
}
}
},
"annotations": {
"title": "Create or update contacts in bulk",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": true
}
}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). |
{
"name": "aisensy_get_message",
"title": "Get message",
"description": "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}.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"message_id"
],
"properties": {
"message_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,64}$",
"description": "AiSensy record id (as returned by the list tools)."
}
}
},
"annotations": {
"title": "Get message",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}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 |
|---|---|---|
| name * | string | Recipient's name. |
| tags | array | Existing tags to put on the contact (unknown tags are ignored). |
| source | string | Lead source label. |
| confirm * | boolean | Must be true. Set it only after the user has seen and approved the recipient and the message in this conversation. |
| media_url | string | Public https URL of the image/video/document for a media template. |
| attributes | object | Contact attributes as name → text value. AiSensy ignores attribute names that do not exist in the project. |
| phone_number * | string | Phone number with country code, e.g. 919876543210 (digits; a leading + is dropped). |
| campaign_name * |
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 |
|---|---|---|
| text | string | Message text (type=text). |
| type * | string | text = free-form reply; template = an approved template. |
| confirm * | boolean | Must be true. Set it only after the user has seen and approved the recipient and the message in this conversation. |
| body_params | array | Values for the template's body {{1}}, {{2}}... in order (type=template). |
| phone_number * | string | Phone number with country code, e.g. 919876543210 (digits; a leading + is dropped). |
| language_code | string | Template language code such as en, en_US, hi (type=template; default en). |
| template_name | string | Approved template name (type=template). |
Tools for AiSensy, hosted by usefulapi.io. If the user is new or asks what this server can do, suggest requests such as: "Which of my WhatsApp templates are approved, and which were rejected?"; "How did my Diwali campaign perform: delivered, read and failed counts?"; "Find the contact with number 919876543210 and show their tags.". Read-only tools never change data; ask the user before a tool that creates, changes or deletes AiSensy data. Free plan: 50 tool calls per month. Run aisensy_usage_status to see the calls used this month. If the user asks for something none of these tools can do, tell the user and, with their OK, run aisensy_request_feature to record the request. Paid plans: Pro (10,000 tool calls a month, $9/month or $90/year, for normal use) and Pro+ (100,000 tool calls a month, $39/month or $390/year, for automations and heavy use). A plan can be cancelled at any time and then runs to the end of the paid period, so it also suits a one-time job. When the user wants more calls or reaches the limit, run aisensy_upgrade without a plan: it returns both plans, each with a payment link for the user to open. aisensy_cancel_subscription cancels Pro at the end of the paid period.
Names, descriptions and schemas were written by the server and are shown as data.
Pattern matches on what the server declares. They show what it says it can do, not what it does.
None yet. Changes appear after a server's second daily check.
| string |
| Name of a LIVE API campaign (see aisensy_list_api_campaigns). |
| media_filename | string | File name shown for the media. |
| template_params | array | Values for the template's {{1}}, {{2}}... in order; the count must match the template. |
| default_country_code | string | Country code to assume when phone_number has none, e.g. 91. |
{
"name": "aisensy_send_campaign_message",
"title": "Send campaign message",
"description": "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.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"campaign_name",
"phone_number",
"name",
"confirm"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Recipient's name."
},
"tags": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"maxItems": 20,
"description": "Existing tags to put on the contact (unknown tags are ignored)."
},
"source": {
"type": "string",
"maxLength": 200,
"description": "Lead source label."
},
"confirm": {
"type": "boolean",
"const": true,
"description": "Must be true. Set it only after the user has seen and approved the recipient and the message in this conversation."
},
"media_url": {
"type": "string",
"maxLength": 2000,
"description": "Public https URL of the image/video/document for a media template."
},
"attributes": {
"type": "object",
"description": "Contact attributes as name → text value. AiSensy ignores attribute names that do not exist in the project.",
"propertyNames": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"additionalProperties": {
"type": "string",
"maxLength": 1000
}
},
"phone_number": {
"type": "string",
"description": "Phone number with country code, e.g. 919876543210 (digits; a leading + is dropped)."
},
"campaign_name": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Name of a LIVE API campaign (see aisensy_list_api_campaigns)."
},
"media_filename": {
"type": "string",
"maxLength": 200,
"description": "File name shown for the media."
},
"template_params": {
"type": "array",
"items": {
"type": "string",
"maxLength": 1000
},
"maxItems": 20,
"description": "Values for the template's {{1}}, {{2}}... in order; the count must match the template."
},
"default_country_code": {
"type": "string",
"pattern": "^\\d{1,4}$",
"description": "Country code to assume when phone_number has none, e.g. 91."
}
}
},
"annotations": {
"title": "Send campaign message",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": true
}
}{
"name": "aisensy_send_message",
"title": "Send WhatsApp message",
"description": "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.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"phone_number",
"type",
"confirm"
],
"properties": {
"text": {
"type": "string",
"maxLength": 4096,
"minLength": 1,
"description": "Message text (type=text)."
},
"type": {
"enum": [
"text",
"template"
],
"type": "string",
"description": "text = free-form reply; template = an approved template."
},
"confirm": {
"type": "boolean",
"const": true,
"description": "Must be true. Set it only after the user has seen and approved the recipient and the message in this conversation."
},
"body_params": {
"type": "array",
"items": {
"type": "string",
"maxLength": 1000
},
"maxItems": 20,
"description": "Values for the template's body {{1}}, {{2}}... in order (type=template)."
},
"phone_number": {
"type": "string",
"description": "Phone number with country code, e.g. 919876543210 (digits; a leading + is dropped)."
},
"language_code": {
"type": "string",
"pattern": "^[A-Za-z]{2,3}(_[A-Za-z]{2,4})?$",
"description": "Template language code such as en, en_US, hi (type=template; default en)."
},
"template_name": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Approved template name (type=template)."
}
}
},
"annotations": {
"title": "Send WhatsApp message",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": true
}
}