---
title: "Create alert settings"
method: POST
path: "/alerts/setting"
tags: ["AlertSettings"]
---

# Create alert settings

`POST /alerts/setting`

Configure a subscription, line item, or group spend alert.

## Request body

- CreateAlertSettingsRequest
  - `config` TypesAlertSettings, required
    - `alert_enabled` boolean
    - `critical` TypesAlertThreshold
      - `condition` 'above' | 'below'
      - `threshold` string
    - `info` TypesAlertThreshold
      - `condition` 'above' | 'below'
      - `threshold` string
    - `warning` TypesAlertThreshold
      - `condition` 'above' | 'below'
      - `threshold` string
  - `entity_id` string, required — entity_id is the id of the monitored entity: subscription id, subscription_line_item id, or group id, matching entity_type.
  - `entity_type` 'wallet' | 'feature' | 'subscription' | 'subscription_line_item' | 'group' | 'entitlement_grant', required
  - `parent_entity_id` string — parent_entity_id is the subscription id that owns a line-item or group alert. Required when entity_type is "subscription_line_item" or "group"; omitted for subscription-level alerts.
  - `parent_entity_type` 'wallet' | 'feature' | 'subscription' | 'subscription_line_item' | 'group' | 'entitlement_grant'

## Response `201`

Created

- AlertSettingsResponse
  - `config` TypesAlertSettings
    - `alert_enabled` boolean
    - `critical` TypesAlertThreshold
      - `condition` 'above' | 'below'
      - `threshold` string
    - `info` TypesAlertThreshold
      - `condition` 'above' | 'below'
      - `threshold` string
    - `warning` TypesAlertThreshold
      - `condition` 'above' | 'below'
      - `threshold` string
  - `created_at` string, date-time
  - `created_by` string
  - `enabled` boolean
  - `entity_id` string
  - `entity_type` 'wallet' | 'feature' | 'subscription' | 'subscription_line_item' | 'group' | 'entitlement_grant'
  - `environment_id` string
  - `id` string
  - `parent_entity_id` string
  - `parent_entity_type` string
  - `status` 'published' | 'deleted' | 'archived'
  - `tenant_id` string
  - `updated_at` string, date-time
  - `updated_by` string

## Other responses

- `400` — Invalid request
- `500` — Server error

---

[API](https://skmtc.net/flexprice/apis/flexprice-api.md) · [All operations](https://skmtc.net/flexprice/apis/flexprice-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flexprice/flexprice-api/revisions/f0601ed97bd3/schema)
