> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# msg91

> Msg91 Messaging

**Server path:** `/msg91` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                                                  | Description                    |
| --------------------------------------------------------------------- | ------------------------------ |
| [`msg91_get_otp_analytics`](#msg91_get_otp_analytics)                 | Get OTP analytics              |
| [`msg91_get_otp_logs`](#msg91_get_otp_logs)                           | Get OTP delivery logs          |
| [`msg91_get_sms_analytics`](#msg91_get_sms_analytics)                 | Get SMS analytics              |
| [`msg91_get_sms_logs`](#msg91_get_sms_logs)                           | Get SMS delivery logs          |
| [`msg91_get_sms_template_versions`](#msg91_get_sms_template_versions) | Get SMS template versions      |
| [`msg91_list_email_templates`](#msg91_list_email_templates)           | List email templates           |
| [`msg91_retry_otp`](#msg91_retry_otp)                                 | Resend OTP                     |
| [`msg91_send_email`](#msg91_send_email)                               | Send email                     |
| [`msg91_send_otp`](#msg91_send_otp)                                   | Send OTP                       |
| [`msg91_send_sms`](#msg91_send_sms)                                   | Send SMS via flow              |
| [`msg91_send_whatsapp_message`](#msg91_send_whatsapp_message)         | Send WhatsApp outbound message |
| [`msg91_verify_otp`](#msg91_verify_otp)                               | Verify OTP                     |

***

## msg91\_get\_otp\_analytics

Get OTP analytics

**Parameters:**

| Parameter  | Type   | Required | Default | Description                         |
| ---------- | ------ | -------- | ------- | ----------------------------------- |
| `fromDate` | string | No       | —       | Start date (YYYY-MM-DD).            |
| `toDate`   | string | No       | —       | End date (YYYY-MM-DD).              |
| `country`  | string | No       | —       | Filter by destination country code. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "fromDate": {
        "type": "string",
        "description": "Start date (YYYY-MM-DD)."
      },
      "toDate": {
        "type": "string",
        "description": "End date (YYYY-MM-DD)."
      },
      "country": {
        "type": "string",
        "description": "Filter by destination country code."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## msg91\_get\_otp\_logs

Get OTP delivery logs

**Parameters:**

| Parameter   | Type    | Required | Default | Description                                          |
| ----------- | ------- | -------- | ------- | ---------------------------------------------------- |
| `fromDate`  | string  | No       | —       | Start date (YYYY-MM-DD).                             |
| `toDate`    | string  | No       | —       | End date (YYYY-MM-DD).                               |
| `mobile`    | string  | No       | —       | Filter by recipient mobile number.                   |
| `requestId` | string  | No       | —       | Filter by a specific OTP request id.                 |
| `status`    | string  | No       | —       | Filter by status (e.g. delivered, failed, verified). |
| `page`      | integer | No       | —       | Page number for paginated results.                   |
| `limit`     | integer | No       | —       | Maximum number of records per page.                  |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "fromDate": {
        "type": "string",
        "description": "Start date (YYYY-MM-DD)."
      },
      "toDate": {
        "type": "string",
        "description": "End date (YYYY-MM-DD)."
      },
      "mobile": {
        "type": "string",
        "description": "Filter by recipient mobile number."
      },
      "requestId": {
        "type": "string",
        "description": "Filter by a specific OTP request id."
      },
      "status": {
        "type": "string",
        "description": "Filter by status (e.g. delivered, failed, verified)."
      },
      "page": {
        "type": "integer",
        "description": "Page number for paginated results."
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of records per page."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## msg91\_get\_sms\_analytics

Get SMS analytics

**Parameters:**

| Parameter  | Type   | Required | Default | Description                                                      |
| ---------- | ------ | -------- | ------- | ---------------------------------------------------------------- |
| `fromDate` | string | No       | —       | Start date (YYYY-MM-DD) for the analytics window.                |
| `toDate`   | string | No       | —       | End date (YYYY-MM-DD) for the analytics window.                  |
| `route`    | string | No       | —       | Filter analytics by SMS route (e.g. transactional, promotional). |
| `country`  | string | No       | —       | Filter analytics by destination country code.                    |
| `smsType`  | string | No       | —       | Filter by SMS type (e.g. domestic, international).               |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "fromDate": {
        "type": "string",
        "description": "Start date (YYYY-MM-DD) for the analytics window."
      },
      "toDate": {
        "type": "string",
        "description": "End date (YYYY-MM-DD) for the analytics window."
      },
      "route": {
        "type": "string",
        "description": "Filter analytics by SMS route (e.g. transactional, promotional)."
      },
      "country": {
        "type": "string",
        "description": "Filter analytics by destination country code."
      },
      "smsType": {
        "type": "string",
        "description": "Filter by SMS type (e.g. domestic, international)."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## msg91\_get\_sms\_logs

Get SMS delivery logs

**Parameters:**

| Parameter    | Type    | Required | Default | Description                                                          |
| ------------ | ------- | -------- | ------- | -------------------------------------------------------------------- |
| `fromDate`   | string  | No       | —       | Start date (YYYY-MM-DD) for the log window.                          |
| `toDate`     | string  | No       | —       | End date (YYYY-MM-DD) for the log window.                            |
| `mobile`     | string  | No       | —       | Filter logs by recipient mobile number (with country code, no plus). |
| `requestId`  | string  | No       | —       | Filter logs to a specific request id returned by the send call.      |
| `templateId` | string  | No       | —       | Filter logs by SMS template id.                                      |
| `status`     | string  | No       | —       | Filter by delivery status (e.g. delivered, failed, submitted).       |
| `page`       | integer | No       | —       | Page number for paginated results.                                   |
| `limit`      | integer | No       | —       | Maximum number of records per page.                                  |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "fromDate": {
        "type": "string",
        "description": "Start date (YYYY-MM-DD) for the log window."
      },
      "toDate": {
        "type": "string",
        "description": "End date (YYYY-MM-DD) for the log window."
      },
      "mobile": {
        "type": "string",
        "description": "Filter logs by recipient mobile number (with country code, no plus)."
      },
      "requestId": {
        "type": "string",
        "description": "Filter logs to a specific request id returned by the send call."
      },
      "templateId": {
        "type": "string",
        "description": "Filter logs by SMS template id."
      },
      "status": {
        "type": "string",
        "description": "Filter by delivery status (e.g. delivered, failed, submitted)."
      },
      "page": {
        "type": "integer",
        "description": "Page number for paginated results."
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of records per page."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## msg91\_get\_sms\_template\_versions

Get SMS template versions

**Parameters:**

| Parameter     | Type   | Required | Default | Description                                           |
| ------------- | ------ | -------- | ------- | ----------------------------------------------------- |
| `template_id` | string | Yes      | —       | The SMS template id whose versions you want to fetch. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "template_id": {
        "type": "string",
        "description": "The SMS template id whose versions you want to fetch."
      }
    },
    "required": [
      "PCID",
      "template_id"
    ]
  }
  ```
</Expandable>

***

## msg91\_list\_email\_templates

List email templates

**Parameters:**

| Parameter | Type    | Required | Default | Description                           |
| --------- | ------- | -------- | ------- | ------------------------------------- |
| `page`    | integer | No       | —       | Page number for paginated results.    |
| `limit`   | integer | No       | —       | Maximum number of templates per page. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "page": {
        "type": "integer",
        "description": "Page number for paginated results."
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of templates per page."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## msg91\_retry\_otp

Resend OTP

**Parameters:**

| Parameter   | Type   | Required | Default | Description                                                                         |
| ----------- | ------ | -------- | ------- | ----------------------------------------------------------------------------------- |
| `mobile`    | string | Yes      | —       | Mobile number the OTP was originally sent to.                                       |
| `retrytype` | string | No       | —       | Channel for the retry: "text" to resend via SMS, "voice" to deliver via voice call. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "mobile": {
        "type": "string",
        "description": "Mobile number the OTP was originally sent to."
      },
      "retrytype": {
        "type": "string",
        "description": "Channel for the retry: \"text\" to resend via SMS, \"voice\" to deliver via voice call.",
        "enum": [
          "text",
          "voice"
        ]
      }
    },
    "required": [
      "PCID",
      "mobile"
    ]
  }
  ```
</Expandable>

***

## msg91\_send\_email

Send email

**Parameters:**

| Parameter     | Type      | Required | Default | Description                                                                                                                            |
| ------------- | --------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `attachments` | object\[] | No       | —       | Optional file attachments.                                                                                                             |
| `domain`      | string    | No       | —       | Sender domain configured in Msg91 (e.g. mail.example.com).                                                                             |
| `from`        | object    | Yes      | —       | Sender details. Must use a verified Msg91 sender domain.                                                                               |
| `recipients`  | object\[] | Yes      | —       | List of recipients. Each entry has a `to` array of recipient objects and optional per-recipient `variables` for template substitution. |
| `subject`     | string    | No       | —       | Subject line of the email. Optional if a template\_id supplies one.                                                                    |
| `template_id` | string    | No       | —       | Msg91 email template id. Optional if you supply inline subject + body.                                                                 |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "attachments": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "filename": {
              "type": "string",
              "description": "Attachment filename."
            },
            "content": {
              "type": "string",
              "description": "Base64-encoded file content."
            },
            "type": {
              "type": "string",
              "description": "MIME type of the attachment."
            }
          }
        },
        "description": "Optional file attachments."
      },
      "domain": {
        "type": "string",
        "description": "Sender domain configured in Msg91 (e.g. mail.example.com)."
      },
      "from": {
        "type": "object",
        "description": "Sender details. Must use a verified Msg91 sender domain.",
        "properties": {
          "email": {
            "type": "string",
            "description": "Sender email address (must be on a verified domain)."
          },
          "name": {
            "type": "string",
            "description": "Optional sender display name."
          }
        },
        "required": [
          "email"
        ]
      },
      "recipients": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "to": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "description": "Recipient email address."
                  },
                  "name": {
                    "type": "string",
                    "description": "Optional recipient display name."
                  }
                }
              },
              "description": "Recipient address objects."
            },
            "cc": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "description": "CC email address."
                  },
                  "name": {
                    "type": "string",
                    "description": "CC display name."
                  }
                }
              },
              "description": "CC recipients."
            },
            "bcc": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "description": "BCC email address."
                  },
                  "name": {
                    "type": "string",
                    "description": "BCC display name."
                  }
                }
              },
              "description": "BCC recipients."
            },
            "variables": {
              "type": "object",
              "description": "Per-recipient variables to substitute into the email template."
            }
          },
          "required": [
            "to"
          ]
        },
        "description": "List of recipients. Each entry has a `to` array of recipient objects and optional per-recipient `variables` for template substitution."
      },
      "subject": {
        "type": "string",
        "description": "Subject line of the email. Optional if a template_id supplies one."
      },
      "template_id": {
        "type": "string",
        "description": "Msg91 email template id. Optional if you supply inline subject + body."
      }
    },
    "required": [
      "PCID",
      "from",
      "recipients"
    ]
  }
  ```
</Expandable>

***

## msg91\_send\_otp

Send OTP

**Parameters:**

| Parameter     | Type    | Required | Default | Description                                                                                |
| ------------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------ |
| `template_id` | string  | Yes      | —       | Msg91 OTP template id (DLT-approved). Required.                                            |
| `mobile`      | string  | Yes      | —       | Recipient mobile number with country code, no plus sign (e.g. 919XXXXXXXXX). Required.     |
| `otp`         | string  | No       | —       | Specific OTP to send. If omitted, Msg91 generates one based on the template's otp\_length. |
| `otp_length`  | integer | No       | —       | Length of the auto-generated OTP (4-9 digits). Ignored if `otp` is supplied.               |
| `otp_expiry`  | integer | No       | —       | OTP validity period in minutes.                                                            |
| `sender`      | string  | No       | —       | Sender id to use for this OTP send.                                                        |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "template_id": {
        "type": "string",
        "description": "Msg91 OTP template id (DLT-approved). Required."
      },
      "mobile": {
        "type": "string",
        "description": "Recipient mobile number with country code, no plus sign (e.g. 919XXXXXXXXX). Required."
      },
      "otp": {
        "type": "string",
        "description": "Specific OTP to send. If omitted, Msg91 generates one based on the template's otp_length."
      },
      "otp_length": {
        "type": "integer",
        "description": "Length of the auto-generated OTP (4-9 digits). Ignored if `otp` is supplied."
      },
      "otp_expiry": {
        "type": "integer",
        "description": "OTP validity period in minutes."
      },
      "sender": {
        "type": "string",
        "description": "Sender id to use for this OTP send."
      }
    },
    "required": [
      "PCID",
      "template_id",
      "mobile"
    ]
  }
  ```
</Expandable>

***

## msg91\_send\_sms

Send SMS via flow

**Parameters:**

| Parameter          | Type      | Required | Default | Description                                                                                                                                                                                    |
| ------------------ | --------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `realTimeResponse` | string    | No       | —       | Set to "1" to receive a real-time delivery response in the API result, "0" otherwise.                                                                                                          |
| `recipients`       | object\[] | Yes      | —       | List of recipient objects. Each recipient must include a `mobiles` field (E.164-style number with country code, e.g. 919XXXXXXXXX) and any per-recipient template variables (VAR1, VAR2, ...). |
| `sender`           | string    | No       | —       | Sender ID to use for this send. If omitted, the template's default sender is used.                                                                                                             |
| `short_url`        | string    | No       | —       | Set to "1" to enable short-url tracking, "0" to disable. Optional.                                                                                                                             |
| `short_url_expiry` | string    | No       | —       | Expiry for the tracked short URL, e.g. "1 day" or "2 hours". Only relevant when short\_url is enabled.                                                                                         |
| `template_id`      | string    | Yes      | —       | The Msg91 flow / SMS template id (DLT-approved). Find this in the Msg91 dashboard under SMS > Templates.                                                                                       |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "realTimeResponse": {
        "type": "string",
        "description": "Set to \"1\" to receive a real-time delivery response in the API result, \"0\" otherwise.",
        "enum": [
          "0",
          "1"
        ]
      },
      "recipients": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "mobiles": {
              "type": "string",
              "description": "Recipient mobile number with country code, no plus sign. Example: 919XXXXXXXXX."
            }
          },
          "required": [
            "mobiles"
          ]
        },
        "description": "List of recipient objects. Each recipient must include a `mobiles` field (E.164-style number with country code, e.g. 919XXXXXXXXX) and any per-recipient template variables (VAR1, VAR2, ...)."
      },
      "sender": {
        "type": "string",
        "description": "Sender ID to use for this send. If omitted, the template's default sender is used."
      },
      "short_url": {
        "type": "string",
        "description": "Set to \"1\" to enable short-url tracking, \"0\" to disable. Optional.",
        "enum": [
          "0",
          "1"
        ]
      },
      "short_url_expiry": {
        "type": "string",
        "description": "Expiry for the tracked short URL, e.g. \"1 day\" or \"2 hours\". Only relevant when short_url is enabled."
      },
      "template_id": {
        "type": "string",
        "description": "The Msg91 flow / SMS template id (DLT-approved). Find this in the Msg91 dashboard under SMS > Templates."
      }
    },
    "required": [
      "PCID",
      "recipients",
      "template_id"
    ]
  }
  ```
</Expandable>

***

## msg91\_send\_whatsapp\_message

Send WhatsApp outbound message

**Parameters:**

| Parameter           | Type   | Required | Default | Description                                                                             |
| ------------------- | ------ | -------- | ------- | --------------------------------------------------------------------------------------- |
| `content_type`      | string | Yes      | —       | Always "template" for outbound WhatsApp Business messages.                              |
| `integrated_number` | string | Yes      | —       | Your Msg91-registered WhatsApp Business phone number (without plus, with country code). |
| `payload`           | object | Yes      | —       | Message payload describing the template, recipient(s), and template parameters.         |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "content_type": {
        "type": "string",
        "description": "Always \"template\" for outbound WhatsApp Business messages.",
        "enum": [
          "template"
        ]
      },
      "integrated_number": {
        "type": "string",
        "description": "Your Msg91-registered WhatsApp Business phone number (without plus, with country code)."
      },
      "payload": {
        "type": "object",
        "description": "Message payload describing the template, recipient(s), and template parameters.",
        "properties": {
          "to": {
            "type": "string",
            "description": "Recipient WhatsApp number with country code, no plus sign."
          },
          "type": {
            "type": "string",
            "description": "Always \"template\".",
            "enum": [
              "template"
            ]
          },
          "messaging_product": {
            "type": "string",
            "description": "Always \"whatsapp\".",
            "enum": [
              "whatsapp"
            ]
          },
          "template": {
            "type": "object",
            "description": "Approved WhatsApp template details."
          }
        },
        "required": [
          "to",
          "type",
          "template"
        ]
      }
    },
    "required": [
      "PCID",
      "content_type",
      "integrated_number",
      "payload"
    ]
  }
  ```
</Expandable>

***

## msg91\_verify\_otp

Verify OTP

**Parameters:**

| Parameter | Type   | Required | Default | Description                                                          |
| --------- | ------ | -------- | ------- | -------------------------------------------------------------------- |
| `mobile`  | string | Yes      | —       | Mobile number the OTP was sent to (with country code, no plus sign). |
| `otp`     | string | Yes      | —       | OTP value entered by the user, to be verified.                       |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "mobile": {
        "type": "string",
        "description": "Mobile number the OTP was sent to (with country code, no plus sign)."
      },
      "otp": {
        "type": "string",
        "description": "OTP value entered by the user, to be verified."
      }
    },
    "required": [
      "PCID",
      "mobile",
      "otp"
    ]
  }
  ```
</Expandable>
