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

# Query alert settings

> List or search alert settings. Returns a paginated list.



## OpenAPI

````yaml /api-reference/openapi.json post /alerts/setting/search
openapi: 3.0.1
info:
  title: Tirdad API
  description: Tirdad API Service
  contact:
    name: API Support
  version: '1.0'
servers:
  - url: https://api.tirdad.ai/v1
    description: Tirdad API
security: []
paths:
  /alerts/setting/search:
    post:
      tags:
        - AlertSettings
      summary: Query alert settings
      description: List or search alert settings. Returns a paginated list.
      operationId: queryAlertSettings
      requestBody:
        description: Filter
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/types.AlertSettingsFilter'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAlertSettingsResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: go
          label: Go
          source: "package main\n\nimport(\n\t\"context\"\n\ttirdad \"github.com/tirdad-billing/go-sdk/v2\"\n\t\"github.com/tirdad-billing/go-sdk/v2/models/types\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := tirdad.New(\n        tirdad.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n    )\n\n    res, err := s.AlertSettings.QueryAlertSettings(ctx, types.AlertSettingsFilter{})\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.ListAlertSettingsResponse != nil {\n        // handle response\n    }\n}"
        - lang: python
          label: Python
          source: |-
            from tirdad_sdk import Tirdad


            with Tirdad(
                api_key_auth="<YOUR_API_KEY_HERE>",
            ) as f_client:

                res = f_client.alert_settings.query_alert_settings()

                # Handle response
                print(res)
        - lang: typescript
          label: TypeScript
          source: |-
            import { Tirdad } from "@tirdad/sdk";

            const tirdad = new Tirdad({
              apiKeyAuth: "<YOUR_API_KEY_HERE>",
            });

            async function run() {
              const result = await tirdad.alertSettings.queryAlertSettings({});

              console.log(result);
            }

            run();
components:
  schemas:
    types.AlertSettingsFilter:
      type: object
      properties:
        enabled:
          type: boolean
        end_time:
          type: string
          format: date-time
        entity_id:
          type: string
        entity_ids:
          type: array
          items:
            type: string
        entity_type:
          $ref: '#/components/schemas/types.AlertEntityType'
        expand:
          type: string
        filters:
          type: array
          description: filters allows complex filtering based on multiple fields
          items:
            $ref: '#/components/schemas/types.FilterCondition'
        limit:
          maximum: 1000
          minimum: 1
          type: integer
        offset:
          minimum: 0
          type: integer
        order:
          type: string
          enum:
            - asc
            - desc
        parent_entity_id:
          type: string
        parent_entity_ids:
          type: array
          items:
            type: string
        parent_entity_type:
          $ref: '#/components/schemas/types.AlertEntityType'
        sort:
          type: array
          items:
            $ref: '#/components/schemas/types.SortCondition'
        start_time:
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/types.Status'
      x-speakeasy-name-override: AlertSettingsFilter
    ListAlertSettingsResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/AlertSettingsResponse'
        pagination:
          $ref: '#/components/schemas/types.PaginationResponse'
    errors.ErrorResponse:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/errors.ErrorCode'
        http_status_code:
          type: integer
        message:
          type: string
      x-speakeasy-name-override: ErrorResponse
    types.AlertEntityType:
      type: string
      enum:
        - wallet
        - feature
        - subscription
        - subscription_line_item
        - group
        - entitlement_grant
      x-enum-varnames:
        - AlertEntityTypeWallet
        - AlertEntityTypeFeature
        - AlertEntityTypeSubscription
        - AlertEntityTypeSubscriptionLineItem
        - AlertEntityTypeGroup
        - AlertEntityTypeEntitlementGrant
      x-speakeasy-name-override: AlertEntityType
    types.FilterCondition:
      type: object
      properties:
        data_type:
          $ref: '#/components/schemas/types.DataType'
        field:
          type: string
        operator:
          $ref: '#/components/schemas/types.FilterOperatorType'
        value:
          $ref: '#/components/schemas/types.Value'
      x-speakeasy-name-override: FilterCondition
    types.SortCondition:
      type: object
      properties:
        direction:
          $ref: '#/components/schemas/types.SortDirection'
        field:
          type: string
      x-speakeasy-name-override: SortCondition
    types.Status:
      type: string
      enum:
        - published
        - deleted
        - archived
      x-enum-varnames:
        - StatusPublished
        - StatusDeleted
        - StatusArchived
      x-speakeasy-name-override: Status
    AlertSettingsResponse:
      type: object
      properties:
        config:
          $ref: '#/components/schemas/types.AlertSettings'
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        enabled:
          type: boolean
        entity_id:
          type: string
        entity_type:
          $ref: '#/components/schemas/types.AlertEntityType'
        environment_id:
          type: string
        id:
          type: string
        parent_entity_id:
          type: string
        parent_entity_type:
          type: string
        status:
          $ref: '#/components/schemas/types.Status'
        tenant_id:
          type: string
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
    types.PaginationResponse:
      type: object
      properties:
        limit:
          type: integer
        offset:
          type: integer
        total:
          type: integer
      x-speakeasy-name-override: PaginationResponse
    errors.ErrorCode:
      type: string
      enum:
        - http_client_error
        - system_error
        - internal_error
        - not_found
        - already_exists
        - version_conflict
        - validation_error
        - invalid_operation
        - permission_denied
        - database_error
        - service_unavailable
        - too_many_requests
        - not_implemented
      x-enum-varnames:
        - ErrCodeHTTPClient
        - ErrCodeSystemError
        - ErrCodeInternalError
        - ErrCodeNotFound
        - ErrCodeAlreadyExists
        - ErrCodeVersionConflict
        - ErrCodeValidation
        - ErrCodeInvalidOperation
        - ErrCodePermissionDenied
        - ErrCodeDatabase
        - ErrCodeServiceUnavailable
        - ErrCodeTooManyRequests
        - ErrCodeNotImplemented
      x-speakeasy-name-override: ErrorCode
    types.DataType:
      type: string
      enum:
        - string
        - number
        - date
        - array
      x-enum-varnames:
        - DataTypeString
        - DataTypeNumber
        - DataTypeDate
        - DataTypeArray
      x-speakeasy-name-override: DataType
    types.FilterOperatorType:
      type: string
      enum:
        - eq
        - contains
        - not_contains
        - gt
        - lt
        - gte
        - in
        - not_in
        - before
        - after
      x-enum-varnames:
        - EQUAL
        - CONTAINS
        - NOT_CONTAINS
        - GREATER_THAN
        - LESS_THAN
        - GREATER_THAN_EQUAL
        - IN
        - NOT_IN
        - BEFORE
        - AFTER
      x-speakeasy-name-override: FilterOperatorType
    types.Value:
      type: object
      properties:
        array:
          type: array
          items:
            type: string
        boolean:
          type: boolean
        date:
          type: string
        number:
          type: number
        string:
          type: string
      x-speakeasy-name-override: Value
    types.SortDirection:
      type: string
      enum:
        - asc
        - desc
      x-enum-varnames:
        - SortDirectionAsc
        - SortDirectionDesc
      x-speakeasy-name-override: SortDirection
    types.AlertSettings:
      type: object
      properties:
        alert_enabled:
          type: boolean
        alert_threshold_type:
          $ref: '#/components/schemas/types.AlertThresholdType'
        critical:
          $ref: '#/components/schemas/types.AlertThreshold'
        info:
          $ref: '#/components/schemas/types.AlertThreshold'
        warning:
          $ref: '#/components/schemas/types.AlertThreshold'
      x-speakeasy-name-override: AlertSettings
    types.AlertThresholdType:
      type: string
      enum:
        - absolute
        - percentage
      x-enum-varnames:
        - AlertThresholdTypeAbsolute
        - AlertThresholdTypePercentage
      x-speakeasy-name-override: AlertThresholdType
    types.AlertThreshold:
      type: object
      properties:
        condition:
          $ref: '#/components/schemas/types.AlertCondition'
        threshold:
          type: string
      x-speakeasy-name-override: AlertThreshold
    types.AlertCondition:
      type: string
      enum:
        - above
        - below
      x-enum-varnames:
        - AlertConditionAbove
        - AlertConditionBelow
      x-speakeasy-name-override: AlertCondition
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: Enter your API key in the format *x-api-key &lt;api-key&gt;**
      name: x-api-key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.