Skip to content
Last updated

GET Alerts API Developer Guide

Applies to: Listening Alerts API (GET /api/v3/listening/alert)

1. Overview

Use the GET Alerts API to retrieve the configuration and details of existing Listening Alerts, including alert metadata, filter configurations, notification recipients, distribution settings, and alert-specific conditions.

You can retrieve alerts by:

  • Providing a single alert ID.
  • Providing multiple alert IDs as a comma-separated list.
  • Specifying a module name.

The API supports partial-success responses. When a request contains valid and invalid identifiers, successfully retrieved alerts are returned in data, while identifier-specific failures are returned in errors.

2. Base URL and Endpoint

https://api3.sprinklr.com/{env}/api/v3/listening/alert
AttributeValue
HTTP methodGET
Resource path/api/v3/listening/alert
Response formatJSON
AuthenticationOAuth 2.0 bearer token and API key

3. Authentication and Common Headers

HeaderRequiredTypeValueDescription
AcceptYesStringapplication/jsonSpecifies the expected response media type.
AuthorizationYesStringBearer {accessToken}OAuth 2.0 bearer token used to authenticate the request.
KeyYesString{apiKey}API key used to authorize the client application.
CookieNoStringJSESSIONID={sessionId}Session identifier used for browser-based authenticated sessions. Generally unnecessary for OAuth-based integrations.

Security note: Do not publish real access tokens, API keys, or session IDs in API documentation. Use placeholders in all examples.

4. Query Parameters

ParameterRequiredTypeDescription
idConditionalString or comma-separated stringUnique identifier of a Listening Alert. Provide multiple IDs as a comma-separated list.
moduleConditionalStringModule whose alerts should be retrieved. Use instead of id.

Either id or module must be provided.

5. Retrieve an Alert by a Single ID

Retrieves the complete configuration of one Listening Alert.

Example Request

curl --location --globoff '{{baseUrl}}/api/v3/listening/alert?id=6995ba46d7890350f0e0ce12' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Key: {{apiKey}}'

Request Parameters

ParameterSub-ParameterInRequiredTypeDescription
idN/AQueryYesStringUnique identifier of the Listening Alert to retrieve.
AcceptN/AHeaderYesStringExpected response type. Supported value: application/json.
AuthorizationaccessTokenHeaderYesStringOAuth access token prefixed with Bearer.
KeyapiKeyHeaderYesStringAPI key associated with the client application.

Example Response

{
  "data": [
    {
      "id": "6995ba46d7890350f0e0ce12",
      "name": "Test-Alert-Fetch-API",
      "description": "Test-Alert-Fetch-API desc",
      "category": "SMART_ALERT",
      "module": "LISTENING",
      "status": "SUCCESS",
      "filterDimensions": [
        {
          "dimensionName": "QUERY",
          "filterType": "IN",
          "values": ["india"],
          "details": {
            "contentType": "DB_FILTER",
            "DB_FILTER_REPORT_NAME": "SPRINKSIGHTS",
            "OLD_DIM_NAME": "TOPIC_QUERY",
            "INPUT_TYPE": "FREE_TEXT",
            "EXCLUDE_IN_THEME_PREVIEW": "true",
            "displayNameForWarning": "Keyword Query",
            "EXIST_FILTER": false,
            "singleSelect": "true",
            "uniqueId": "D_QUERY"
          }
        }
      ],
      "tags": [],
      "enabled": true,
      "distributionConfig": {
        "userIds": [66006626, 66062939, 66007863],
        "userGroupIds": [],
        "emailIds": [],
        "sendEmailNotification": true,
        "customEmailSubject": "Listening Alert Test "
      },
      "smartAlertConfig": {
        "smartAlertMetrics": ["NEGATIVE_SENTIMENT"],
        "suddenAnomalyEnabled": true,
        "longTermTrendsEnabled": false
      },
      "createdTime": 1771420230634,
      "modifiedTime": 1782478947322,
      "ownerUserId": 66006626,
      "lastModifiedUserId": 0,
      "clientId": 66000002
    }
  ],
  "errors": []
}

6. Retrieve Multiple Alerts by ID

Retrieves multiple Listening Alerts by supplying a comma-separated list of IDs.

Example Request

curl --location --globoff '{{baseUrl}}/api/v3/listening/alert?id=6995ba46d7890350f0e0ce12%2C699588f0bc163922661c691d' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Key: {{apiKey}}'

Request Parameters

ParameterSub-ParameterInRequiredTypeDescription
idN/AQueryYesStringComma-separated list of Listening Alert IDs. %2C is the URL-encoded comma.
AcceptN/AHeaderYesStringExpected response type. Supported value: application/json.
AuthorizationaccessTokenHeaderYesStringOAuth access token prefixed with Bearer.
KeyapiKeyHeaderYesStringAPI key associated with the client application.

Example Response

{
  "data": [
    {
      "id": "6995ba46d7890350f0e0ce12",
      "name": "Test-Alert-Fetch-API",
      "description": "Test-Alert-Fetch-API desc",
      "category": "SMART_ALERT",
      "module": "LISTENING",
      "status": "IN_PROGRESS",
      "filterDimensions": [
        {
          "dimensionName": "QUERY",
          "filterType": "IN",
          "values": ["india"],
          "details": {
            "contentType": "DB_FILTER",
            "DB_FILTER_REPORT_NAME": "SPRINKSIGHTS",
            "OLD_DIM_NAME": "TOPIC_QUERY",
            "INPUT_TYPE": "FREE_TEXT",
            "EXCLUDE_IN_THEME_PREVIEW": "true",
            "displayNameForWarning": "Keyword Query",
            "EXIST_FILTER": false,
            "singleSelect": "true",
            "uniqueId": "D_QUERY"
          }
        }
      ],
      "tags": [],
      "enabled": true,
      "distributionConfig": {
        "userIds": [66006626, 66062939, 66007863],
        "userGroupIds": [],
        "emailIds": [],
        "sendEmailNotification": true,
        "customEmailSubject": "Listening Alert Test "
      },
      "smartAlertConfig": {
        "smartAlertMetrics": ["NEGATIVE_SENTIMENT"],
        "suddenAnomalyEnabled": true,
        "longTermTrendsEnabled": true
      },
      "createdTime": 1771420230634,
      "modifiedTime": 1771420279441,
      "ownerUserId": 66006626,
      "lastModifiedUserId": -100,
      "clientId": 66000002
    },
    {
      "id": "699588f0bc163922661c691d",
      "name": "AlertManagerStatic_011771407491199",
      "description": "Alert Created Via Automation",
      "category": "STATIC_ALERT",
      "module": "LISTENING",
      "status": "SUCCESS",
      "filterDimensions": [
        {
          "dimensionName": "TOPIC_IDS",
          "filterType": "IN",
          "values": ["692feaaab7d0a90babc9f775"],
          "details": {
            "displayNameForWarning": "Topic",
            "USE_SNAPSHOT_VALUE": false,
            "type": "DIMENSION",
            "dF": true,
            "OLD_DIM_NAME": "TOPIC",
            "nameQueryLookupSupported": "true",
            "DRILLDOWN": false,
            "EXIST_FILTER": false,
            "reportName": "SPRINKSIGHTS",
            "reports": ["SPRINKSIGHTS"]
          }
        }
      ],
      "tags": ["testtags"],
      "enabled": true,
      "distributionConfig": {
        "userIds": [],
        "userGroupIds": [],
        "emailIds": ["autouser1@sprinklr.com"],
        "sendEmailNotification": true,
        "customEmailSubject": "Automation Alert",
        "senderAlias": "autouser2@sprinklr.com"
      },
      "volumetricAlertConfig": {
        "alertTriggerConditionType": "ALERT_TRIGGER_TYPE_THRESHOLD",
        "conditions": [
          {
            "dimensionName": "STATIC_ALERT_MENTIONS_VOLUME",
            "filterType": "GT",
            "values": [100],
            "details": {
              "displayNameForWarning": "Volume of Mentions",
              "USE_SNAPSHOT_VALUE": false,
              "type": "DIMENSION",
              "ALLOWED_FILTER_TYPES": ["GT"],
              "MEASUREMENT_NAME": "MENTIONS_COUNT",
              "STATIC_ALERT_TYPE": "STATIC_ALERT_MENTIONS_VOLUME",
              "INPUT_TYPE": "NUMERIC",
              "reportName": "SPRINKSIGHTS",
              "reports": ["SPRINKSIGHTS"],
              "MEASUREMENT_AGG_TYPE": "SUM"
            }
          }
        ]
      },
      "createdTime": 1771407600013,
      "modifiedTime": 1771408982373,
      "ownerUserId": 66070831,
      "lastModifiedUserId": -100,
      "clientId": 66000002
    }
  ],
  "errors": []
}

7. Retrieve Multiple Alerts with Partial Success

Retrieves available alerts while returning identifier-specific errors for empty, malformed, inaccessible, or non-existent values.

Example Request

curl --location --globoff '{{baseUrl}}/api/v3/listening/alert?id=6995ba46d7890350f0e0ce12%2C699588f0bc163922661c691d%2C%2Cinvalid%2Ctest' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Key: {{apiKey}}'

Example Partial-Success Error Fragment

{
  "data": [
    {
      "id": "6995ba46d7890350f0e0ce12",
      "category": "SMART_ALERT"
    },
    {
      "id": "699588f0bc163922661c691d",
      "category": "STATIC_ALERT"
    }
  ],
  "errors": [
    {
      "id": "6995baaef58d8b601be9edb2",
      "code": 400,
      "message": "Invalid id format: ''. Value cannot be empty or blank."
    },
    {
      "id": "6995baaef58d8b601be9edb3",
      "code": 404,
      "message": "Alert not found for id: 'invalid'. Verify the alert exists and you have access permissions."
    },
    {
      "id": "6995baaef58d8b601be9edb4",
      "code": 404,
      "message": "Alert not found for id: 'test'. Verify the alert exists and you have access permissions."
    }
  ]
}

A partial-success response can contain both populated data and errors arrays.

8. Response Parameters

ParameterSub-ParameterTypeDescription
dataN/AArrayListening Alerts successfully returned by the API.
data[]idStringUnique identifier of the alert.
data[]nameStringName of the alert.
data[]descriptionStringDescription of the alert.
data[]categoryStringAlert category, such as SMART_ALERT or STATIC_ALERT.
data[]moduleStringModule associated with the alert, such as LISTENING.
data[]statusStringCurrent processing status, such as IN_PROGRESS or SUCCESS.
data[]filterDimensionsArrayFilters that define the alert criteria.
data[]tagsArrayTags associated with the alert.
data[]enabledBooleanIndicates whether the alert is enabled.
data[]distributionConfigObjectAlert recipient and notification configuration.
data[]smartAlertConfigObjectSmart Alert configuration. Returned for Smart Alerts.
data[]volumetricAlertConfigObjectStatic or volumetric alert configuration. Returned for applicable alerts.
data[]createdTimeLongAlert creation time in epoch milliseconds.
data[]modifiedTimeLongAlert modification time in epoch milliseconds.
data[]ownerUserIdLongUser ID of the alert owner.
data[]lastModifiedUserIdLongUser ID of the last modifier. System-generated updates can use a system identifier.
data[]clientIdLongIdentifier of the client account or workspace.
errorsN/AArrayRequest-item errors. Empty when no item-level errors occur.

8.1 Filter Dimensions

ParameterSub-ParameterTypeDescription
filterDimensions[]dimensionNameStringName of the filter dimension.
filterDimensions[]filterTypeStringFilter operation applied to the dimension.
filterDimensions[]valuesArrayValues used by the filter.
filterDimensions[]detailsObjectAdditional filter metadata.

8.2 Filter Dimension Details

ParameterTypeDescription
contentTypeStringFilter content type.
DB_FILTER_REPORT_NAMEStringReport associated with the database filter.
OLD_DIM_NAMEStringLegacy dimension name.
INPUT_TYPEStringInput type supported by the filter.
EXCLUDE_IN_THEME_PREVIEWStringIndicates whether the filter is excluded from theme preview.
displayNameForWarningStringDisplay label used in warnings.
EXIST_FILTERBooleanIndicates whether the filter is an existence filter.
singleSelectStringIndicates whether only one value can be selected.
uniqueIdStringUnique identifier of the dimension configuration.
USE_SNAPSHOT_VALUEBooleanIndicates whether a snapshot value is used.
typeStringDimension configuration type.
dFBooleanInternal dimension flag returned by the API.
nameQueryLookupSupportedStringIndicates whether name-based lookup is supported.
DRILLDOWNBooleanIndicates whether drill-down is supported.
reportNameStringAssociated report name.
reportsArrayAssociated reports.

8.3 Distribution Configuration

ParameterTypeDescription
userIdsArrayUser IDs configured to receive alert notifications.
userGroupIdsArrayUser group IDs configured to receive notifications.
emailIdsArrayEmail addresses configured as recipients.
sendEmailNotificationBooleanIndicates whether email notifications are enabled.
customEmailSubjectStringCustom subject line for alert emails.
senderAliasStringSender email alias used for notifications.

8.4 Smart Alert Configuration

ParameterTypeDescription
smartAlertMetricsArrayMetrics monitored by the Smart Alert.
suddenAnomalyEnabledBooleanIndicates whether sudden-anomaly detection is enabled.
longTermTrendsEnabledBooleanIndicates whether long-term trend analysis is enabled.

8.5 Volumetric Alert Configuration

ParameterTypeDescription
alertTriggerConditionTypeStringTrigger condition type used by the alert.
conditionsArrayConditions evaluated against the configured threshold.

8.6 Volumetric Condition

ParameterTypeDescription
dimensionNameStringMetric or dimension monitored by the condition.
filterTypeStringComparison operator used to evaluate the condition.
valuesArrayThreshold values used to trigger the alert.
detailsObjectAdditional condition metadata.

8.7 Volumetric Condition Details

ParameterTypeDescription
displayNameForWarningStringUser-friendly metric label.
USE_SNAPSHOT_VALUEBooleanIndicates whether a snapshot value is used.
typeStringCondition dimension type.
ALLOWED_FILTER_TYPESArraySupported filter operators.
MEASUREMENT_NAMEStringMeasurement tracked by the condition.
STATIC_ALERT_TYPEStringStatic alert metric type.
INPUT_TYPEStringInput type supported by the metric.
reportNameStringAssociated report name.
reportsArrayAssociated reports.
MEASUREMENT_AGG_TYPEStringAggregation method applied to the metric.

8.8 Error Object

ParameterTypeDescription
idStringUnique identifier associated with the error record.
codeIntegerHTTP-style error code for the failed item.
messageStringDescription of the validation or retrieval failure.

9. Response Codes

HTTP CodeDescription
200 OKAlerts returned successfully. The body can also contain item-level errors for a partial-success request.
400 Bad RequestOne or more request parameters are invalid, empty, or malformed.
401 UnauthorizedAuthentication failed.
403 ForbiddenThe authenticated user does not have sufficient permission.
404 Not FoundA requested alert cannot be found or accessed.

10. Use Cases

10.1 Retrieve a Specific Alert

Provide a single alert ID to retrieve its complete configuration.

10.2 Retrieve Multiple Alerts

Supply multiple alert IDs as a comma-separated list to fetch several alert definitions in one request.

10.3 Retrieve Alerts by Module

Provide the module parameter to retrieve alerts associated with a module.

10.4 Review Distribution Configuration

Inspect recipients, sender configuration, and email settings before updating alert delivery.

10.5 Audit Alert Conditions

Review Smart Alert and Volumetric Alert conditions to validate anomaly-detection settings and configured thresholds.

All IDs, email addresses, timestamps, and configuration values in this guide are sample values for documentation purposes.