---
title: AlertsPanel APIs
slug: alertspanel-apis
createdAt: 2025-04-10T10:55:43.198Z
---

# <font color="#f6b32a">**Inroduction** </font>

AlertsPanel APIs allow you to integrate with the platform and create useful functionality around the platform.&#x20;

The APIs are REST-based using JSON as the standard response type.

**Headers&#x20;**

API Keys need to be added to the Authorization header as follows –

`Authorization : Basic <Authorization Key> `

- The API Keys can be generated by going to [Alertspanel API](https://app.alertspanel.com/admin/integrations/platform-api) section.&#x20;
- AlertsPanel APIs follow basic authentication utilizing API Keys to authenticate the API calls.&#x20;

- The API Keys can be revoked or regenerated at any point in time and would throw authentication errors for the API calls made using them.

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://api.alertspanel.com",
  "name": "Alertspanel APIs",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "keltcMNS8tbZ5b30BmdY-",
        "code": "{\n    \"responseObject\": true\n}",
        "language": "200",
        "customLabel": ""
      },
      {
        "id": "AW-Tt2Mo1dwCGf_4c9XWP",
        "code": "{\n    \"message\": \"Ain't no cake like that.\"\n  }",
        "language": "404",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "keltcMNS8tbZ5b30BmdY-"
  },
  "examples": {
    "languages": [
      {
        "id": "S6zZPicp_Khm_KLwsHa4f",
        "language": "curl",
        "code": "curl --location --request GET 'https://api.alertspanel.com/bot-api/v1.0/customer/61179/bot/bb67e0773bed4c7e/users?attribute_name=opt1&attribute_value=yes' \\\n--header 'Authorization: Basic 2082e8f4-0011-479b-9edb-74293c62d91b-GkOuZiq' \\\n--header 'Content-Type: application/json' \\\n--data-raw ''",
        "customLabel": "Users"
      },
      {
        "id": "ATvKD-tpYG-DOQFOF92bZ",
        "language": "curl",
        "code": "curl --location --request GET 'https://api.alertspanel.com/bot-api/v1.0/customer/61179/bot/bb67e0773bed4c7e/channel-user/919565428256/conversations' \\\n--header 'Authorization: Basic 2082e8f4-0011-479b-9edb-74293c62d91b-GkOuZiq' \\\n--header 'Content-Type: application/json' \\\n--data-raw ''",
        "customLabel": "Conversation History"
      },
      {
        "id": "YbcwzhFmluYXoAdHW1AP-",
        "language": "curl",
        "code": "curl --location --request POST 'https://api.alertspanel.com/whatsapp-api/v1.0/customer/49373/bot/f5afdd1c000742f0/template' \\\n--header 'Authorization: Basic 1b051089-77b5-4a97-ad8e-f3186a6a7532-FqXcFmW' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"phoneNumber\": \"+919019486731\",\n    \"payload\": {\n        \"components\": [\n      {\n        \"type\": \"header\",\n        \"parameters\": [\n          {\n            \"type\": \"document\",\n            \"document\": {\n              \"filename\": \"uribapplicationform_82121086.pdf\",\n              \"link\": \"https://s3.ap-south-1.amazonaws.com/file-upload-public/prod/61179/BROADCAST_TEMPLATE_ATTACHMENT/75549-uribapplicationform_82121086.pdf\"\n            }\n          }\n        ]\n      },\n      {\n        \"type\": \"body\",\n        \"parameters\": [\n          {\n            \"type\": \"text\",\n            \"text\": \"John\"\n          },{\n            \"type\": \"text\",\n            \"text\": \"John\"\n          },{\n            \"type\": \"text\",\n            \"text\": \"John\"\n          }\n        ]\n      },\n      {\n        \"index\": 0,\n        \"parameters\": [\n          {\n            \"payload\": \"flow_7BBB608C3B4B4E848F36CD2CCD7CFA35||data_PersonX_response=Declined_Invoice_no_12345\",\n            \"type\": \"payload\"\n          }\n        ],\n        \"sub_type\": \"quick_reply\",\n        \"type\": \"button\"\n      },\n      {\n        \"index\": 1,\n        \"parameters\": [\n          {\n            \"payload\": \"flow_E30D44BCCA4C49D49976D3AC0416C405||data_PersonX_response=Approved_Invoice_no_12345\",\n            \"type\": \"payload\"\n          }\n        ],\n        \"sub_type\": \"quick_reply\",\n        \"type\": \"button\"\n      }\n    ],\n        \"namespace\": \"980c3243_2d2a_4d2d_a572_b2a50552cb04\",\n        \"name\": \"renuka_sugars_paytest\",\n        \"language\": {\n            \"policy\": \"deterministic\",\n            \"code\": \"en\"\n        }\n    }\n}\n}'",
        "customLabel": "Whatsapp Broadcast"
      },
      {
        "id": "FIZ3QaXXVF4ApScOdBx9A",
        "language": "curl",
        "code": "curl --location --request POST 'https://api.engati.com/bot-api/v1.0/customer/61179/bot/bb67e0773bed4c7e/flow/default_fallback_msg_74963' \\\n--header 'Authorization: Basic 2082e8f4-0011-479b-9edb-74293c62d91b-GkOuZiq' \\\n--header 'Content-Type: application/json' \\\n--data-raw ''",
        "customLabel": "API Triggers"
      },
      {
        "id": "Sje6Oda1qufYdEJy-h0y5",
        "language": "curl",
        "code": "curl --location 'https://api.alertspanel.com/bot-api/v1.0/customer/61179/bot/0ab20e4b037345d0/broadcast' \\\n--header 'Authorization: Basic 000b0a2a-0231-41ce-81b3-55a6de06fb65-GthkWxy' \\\n--header 'Content-Type: application/json' \\\n--data '{\n    \"broadcastId\": null,\n    \"broadcastTitle\": \"f1\",\n    \"publishedOn\": \"2023-04-04T10:54:00.000Z\",\n    \"audience\": {\n        \"rule\": {\n            \"userIds\": [],\n            \"channelUserIds\": [\n                \"9178921978038123\",\"9190193486731\"\n            ],\n            \"channels\": [\n                \"whatsapp\"\n            ]\n        }\n    },\n    \"payload\": {\n        \"type\": \"WHATSAPP_TEMPLATE\",\n        \"campaignKey\": null,\n        \"content\": [\n            {\n                \"type\": \"TEMPLATE\",\n                \"data\": null,\n                \"template\": {\n                    \"payload\": {\n                        \"namespace\": \"980c3243_2d2a_4d2d_a572_b2a50552cb04\",\n                        \"name\": \"diwali_offer\",\n                        \"components\": [\n                            {\n                                \"type\": \"body\",\n                                \"parameters\": [\n                                    {\n                                        \"type\": \"text\",\n                                        \"text\": \"John \"\n                                    },\n                                    {\n                                        \"type\": \"text\",\n                                        \"text\": \"Adam\"\n                                    }\n                                ]\n                            },\n                            {\n                                \"index\": 0,\n                                \"parameters\": [\n                                    {\n                                        \"payload\": \"flow_welcome_88601\",\n                                        \"type\": \"payload\"\n                                    }\n                                ],\n                                \"sub_type\": \"quick_reply\",\n                                \"type\": \"button\"\n                            },\n                            {\n                                \"index\": 1,\n                                \"parameters\": [\n                                    {\n                                        \"payload\": \"flow_greetings_88601\",\n                                        \"type\": \"payload\"\n                                    }\n                                ],\n                                \"sub_type\": \"quick_reply\",\n                                \"type\": \"button\"\n                            }\n                        ],\n                        \"namespace\": \"980c3243_2d2a_4d2d_a572_b2a50552cb04\",\n                        \"name\": \"diwali_offer\",\n                        \"language\": {\n                            \"code\": \"en_US\",\n                            \"policy\": \"deterministic\"\n                        }\n                    },\n                    \"targetWhatsAppNumber\":\"{{phone_no}}\"\n                },\n                \"flowKey\": null,\n                \"attributes\": null\n            }\n        ]\n    },\n    \"status\": \"SCHEDULED\"\n}'",
        "customLabel": "Broadcast Wrapper API"
      },
      {
        "id": "Ypuxm7-6ubF7E2QOkoKz9",
        "language": "yaml",
        "code": ""
      },
      {
        "id": "7iTUYyEDB6LFgEpcfhn1s",
        "language": "xml",
        "code": ""
      },
      {
        "id": "jojt-0ihHDGgHJ7FXxONp",
        "language": "windows",
        "code": ""
      },
      {
        "id": "metGRLWkAdwMvaiTuRotT",
        "language": "vb",
        "code": ""
      },
      {
        "id": "WeBPBfnbdRyWoRwiYa3C7",
        "language": "typescript",
        "code": ""
      },
      {
        "id": "xBirC_bCl5ylliIeqUcGb",
        "language": "text",
        "code": ""
      },
      {
        "id": "zR_VLVGk-1IufE6mJM-vj",
        "language": "tex",
        "code": ""
      },
      {
        "id": "0-oNvO8rpP8COY7gCq_pr",
        "language": "tcl",
        "code": ""
      },
      {
        "id": "mWnFltARzLkiwbjE9CpXm",
        "language": "swift",
        "code": ""
      },
      {
        "id": "Odk2V0QAkVnZWT3DhVQIk",
        "language": "st",
        "code": ""
      },
      {
        "id": "mUAbc6r8wVtbmP7-exHWc",
        "language": "sql",
        "code": ""
      },
      {
        "id": "dalp3bVpfNi7qoi4Qydkc",
        "language": "solidity",
        "code": ""
      },
      {
        "id": "BpaAKqkS0hX3E4rQri37k",
        "language": "shell",
        "code": ""
      },
      {
        "id": "4KlTVJ8kkvtjUs6C_MlKq",
        "language": "scheme",
        "code": ""
      },
      {
        "id": "JaUCh3kRwrHeKbfTHxT0R",
        "language": "sb",
        "code": ""
      },
      {
        "id": "WWnnhBFueCspzMwUzHq_c",
        "language": "rust",
        "code": ""
      },
      {
        "id": "cE8kZMRJLydZwcQQgK-TD",
        "language": "ruby",
        "code": ""
      },
      {
        "id": "u8GPQQ1EBgTwA_73rkv8v",
        "language": "redshift",
        "code": ""
      },
      {
        "id": "D3lT9ePXHnULzqE5SdRnj",
        "language": "redis",
        "code": ""
      },
      {
        "id": "ggpLBa6p_5srQwtJtp-E-",
        "language": "razor",
        "code": ""
      },
      {
        "id": "25onU28GjNEBs2L1kNGyu",
        "language": "r",
        "code": ""
      },
      {
        "id": "U82MRKqU71Ak68mYbLkiQ",
        "language": "python",
        "code": ""
      },
      {
        "id": "_eEi3oeIPWVfaUr2CnMBC",
        "language": "csharp",
        "code": ""
      },
      {
        "id": "MJS2JX2J-rwgozt1kxnNj",
        "language": "csp",
        "code": ""
      },
      {
        "id": "IX9aZkXMsxcol63ygknYS",
        "language": "css",
        "code": ""
      },
      {
        "id": "S8JXqtKGqzTmVZ6orpOEi",
        "language": "pug",
        "code": ""
      },
      {
        "id": "XFAlKpun-7HlgaK_zEiZI",
        "language": "curl",
        "code": "curl --location --request POST 'https://api.alertspanel.com' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json'",
        "customLabel": ""
      },
      {
        "id": "7xnRCvCp6cSzA48YcVn52",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'POST',\n   'url': 'https://api.alertspanel.com',\n   'headers': {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n   }\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "EKhzm5dZl6Kj7WW-U04OX",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.alertspanel.com\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "RhGOms_Qa2pRYg9XE-QMz",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://api.alertspanel.com\"\n\npayload = {}\nheaders = {\n   'Accept': 'application/json',\n   'Content-Type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "XlyYAh6K0cN8IV-3Q3qSJ",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.alertspanel.com\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Accept\"] = \"application/json\"\nrequest[\"Content-Type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "uf1DN9BvhzPpaFW_qXiaF",
        "language": "curl",
        "code": "curl --location --request POST 'https://api.alertspanel.com' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json'",
        "customLabel": ""
      },
      {
        "id": "q87PApr5nNt2q_j3yY0Um",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'POST',\n   'url': 'https://api.alertspanel.com',\n   'headers': {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n   }\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "wObG6PEAkqeeXkLpR_Gz8",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.alertspanel.com\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "pSoq5zdmZIiN7EOQ-zGXu",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://api.alertspanel.com\"\n\npayload = {}\nheaders = {\n   'Accept': 'application/json',\n   'Content-Type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "MTwAIKZthP2YtqewLoNv-",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.alertspanel.com\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Accept\"] = \"application/json\"\nrequest[\"Content-Type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "S6zZPicp_Khm_KLwsHa4f"
  },
  "description": "",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "hasTryItOut": false,
  "response": [
    {
      "name": "id",
      "kind": "optional",
      "type": "string",
      "description": "ID of the cake retrieved"
    }
  ],
  "autoGeneratedAnchorSlug": "alertspanel-apis",
  "legacyHash": "-ETyBcOcDIP0WuuiMNw69"
}
```
:::

## <font color="#f6b32a">**Users API** </font>

An API to fetch users who match the value specified for the attribute.

Example : To get list of users who have feedback with 1 star.&#x20;

List of required parameters for this API call

| **Parameter**    | **Description**                                     | **Type** |
| ---------------- | --------------------------------------------------- | -------- |
| attribute\_name  | The name of the attribute associated with the user  | String   |
| attribute\_value | The value of the attribute associated with the user | String   |

## <font color="#f6b32a">**Conversations API** </font>

An API to fetch a user conversation via user id

Example : To store conversation data in CRM.&#x20;

Parameters you can pass to filter the API response

| Parameter                | Description                                                                                           | Type    |
| ------------------------ | ----------------------------------------------------------------------------------------------------- | ------- |
| userId \[Path parameter] | The user identifier. Retrieved from users list API                                                    | String  |
| start\_date \[Optional]  | Start Date (UTC time in milliseconds), If blank, all records will be considered.                      | long    |
| end\_date \[Optional]    | End Date (UTC time in milliseconds), If blank, the current UTC time will be considered.               | long    |
| page\_number \[Optional] | The number of pages for which the data should be displayed. By default, the first page will be shown. | integer |
| Page\_size \[Optional]   | Total number of records to be shown in the API call, the default value is set to 500                  | integer |

## Whatsapp Template Broadcasting&#x20;

For template broadcasting to bulk users on Whatsapp.&#x20;

**Note** : Only Templates can be sent to users as per Whatsapp Policy beyond the time limts.


&#x20;                                                                Example APIs                                                                             &#x20;

::Image[]{src="https://api.archbee.com/api/optimize/OU5UdaMPxQUGPsWA2FL92/rleMovHSp85BR6hxhndch_image.png" size="46" width="800" height="750" position="center" showCaption="false"}

## <font color="#f6b32a">**Broadcast API** </font>

**To enable and use Broadcast Wrapper API please contact support\@moplet.com.&#x20;**

For all channels including Whatsapp with users within time limit.&#x20;

For broadcast a simple text message or interactive messages to bulk users.

Example : Marketing & Advertisments, Survey and Promotion.

Broadcast will be published based on the time mentioned in UTC,

Immediate broadcasts will be sent for expired time.&#x20;

Multiple Numbers in list Format&#x20;

`"channelUserIds": [`

`                "9178921978038123","9190193486731"`

`            ]`

## <font color="#f6b32a">**API Trigger** </font>

To trigger automations build on Alertspanel Platform for external usecases.&#x20;

Example : Sending an email to a customer who fills an external website form.&#x20;

Learn more about Broadcasts in depth via [API Trigger](https://help.alertspanel.com/api-triggers) document.&#x20;

**Error Scenarios**

Error codes you might get while making the API call.

| Error Codes | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 400         | *Error Code*: 1002,*Error Message*: INVALID\_BOT\_OR\_CUSTOMER\_ID,*Error Details*: The bot id/customer id/user id provided is invalid *Error Code*: 1003, *Error Message*: INVALID\_INPUT\_DATE\_VALUE, *Error Details*: The start\_date and end\_date values are the time in milliseconds and the end\_date should be greater than start\_date. *Error Code*: 1004, *Error Message*: INVALID\_PAGE\_NUMBER, *Error Details*: Please enter the correct page number. The page number in the API is a positive integer value starting with 1. |
| 401         | Unauthorized                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| 403         | Forbidden                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 500         | Server-side API failure                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

