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

# Cria um alerta do consumo

> Faz a criação de alertas de um cliente



## OpenAPI

````yaml POST /broker/alert
openapi: 3.0.1
info:
  title: OpenAPI Auth Store
  description: API de exemplo para demonstração de autenticação e obtenção de tokens.
  license:
    name: Allcom Telecom
  version: 1.0.0
servers:
  - url: >-
      https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1
security: []
paths:
  /broker/alert:
    servers:
      - url: >-
          https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1
        description: Faz a busca ou cria alertas de um cliente
    post:
      description: Faz a criação de alertas de um cliente
      parameters:
        - name: Content-Type
          in: header
          required: true
          description: |-
            Define o formato da requisição.

            🔹 **Valor padrão:**
            ```
            application/json
            ```
            📌 **Dica:** Copie e cole esse valor no campo Content-Type.
          schema:
            type: string
            example: application/json
            default: application/json
        - name: client_id
          in: header
          required: true
          schema:
            type: string
            description: Identificador do client id do sensedia
            example: '123'
        - name: access_token
          in: header
          required: true
          schema:
            type: string
            description: Token gerado
            example: Basic MzQ4OSozNDMyLTMOMzItMTIz
      requestBody:
        description: Informações necessárias para fazer a criação de alertas de um cliente.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                field:
                  type: string
                  example: consumptionCurrentDay
                name:
                  type: string
                  example: Teste
                thresholdValue:
                  type: string
                  example: '31457280.000'
                eventType:
                  type: string
                  example: CONSUMPTION
                operator:
                  type: string
                  example: '>'
              required:
                - client_id
                - client_secret
      responses:
        '201':
          description: Request report created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  OK:
                    type: string
                    example:
                      id: 308
                      customerId: 10000
                      terminalId: null
                      contractId: null
                      msisdn: null
                      eventType: CONSUMPTION
                      field: consumptionCurrentDay
                      operator: '>'
                      thresholdValue: 31457280
                      name: Teste
                      active: true
                      createdAt: '2025-01-02T19:10:16.354'
                      createdBy: vanilson_etica
                      updatedAt: null
                      updatedBy: null
              example:
                id: 308
                customerId: 10000
                terminalId: null
                contractId: null
                msisdn: null
                eventType: CONSUMPTION
                field: consumptionCurrentDay
                operator: '>'
                thresholdValue: 31457280
                name: Teste
                active: true
                createdAt: '2025-01-02T19:10:16.354'
                createdBy: vanilson_etica
                updatedAt: null
                updatedBy: null
        '400':
          description: Requisição mal formada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example:
                      errors: Parameter not found
              example:
                error: Requisição mal formada.
        '401':
          description: Requisição requer autenticação.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Requisição requer autenticação.
        '403':
          description: O acesso ao recurso foi negado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: O acesso ao recurso foi negado.
        '404':
          description: URI de API/Recurso inexiste para processamento.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: URI de API/Recurso inexiste para processamento.
        '500':
          description: Erro Interno do servidor.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example:
                      errors: Parameter not found
              example:
                errors: Parameter not found

````