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

# Registrar conversão

> Registra uma conversão associada a um link curto.



## OpenAPI

````yaml /short-links-api/api-reference/openapi-conversions.json post /v1/conversions
openapi: 3.0.3
info:
  title: Notifique API. Conversões (Smart Links)
  description: >-
    Registrar **conversões** ou pedidos atribuídos a uma mensagem enviada pelo
    Notifique.


    **Autenticação:** `Authorization: Bearer sk_live_xxxxx` ou `x-api-key`.


    **Escopo:** `conversions:manage`.


    Use o `msg_id` da mensagem rastreada (Smart Link / link automático no
    envio). A operação é **idempotente** por `order_id`, repetir o mesmo pedido
    retorna **200** em vez de duplicar.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Produção
security:
  - ntfConversionsBearerAuth: []
  - ntfConversionsApiKeyHeader: []
tags:
  - name: Conversões
    description: Atribuição de pedidos a mensagens rastreadas (`POST /v1/conversions`).
paths:
  /v1/conversions:
    post:
      tags:
        - Conversões
      summary: Registrar conversão
      description: Registra uma conversão associada a um link curto.
      operationId: ntfConversions_postV1Conversions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - msg_id
                - order_id
              properties:
                msg_id:
                  type: string
                  maxLength: 128
                  description: ID da mensagem Notifique associada ao clique (Smart Link).
                order_id:
                  type: string
                  maxLength: 256
                  description: Identificador único do pedido no seu sistema.
                value:
                  type: number
                  description: 'Valor em unidade monetária (ex.: 149.90).'
                valueCents:
                  type: integer
                  description: Valor em centavos (alternativa a `value`).
                currency:
                  type: string
                  default: BRL
                metadata:
                  type: object
                  additionalProperties: true
            example:
              msg_id: msg_abc123
              order_id: ORD-98765
              value: 149.9
              currency: BRL
      responses:
        '200':
          description: Conversão já existia (idempotente).
        '201':
          description: Conversão criada.
        '400':
          description: Corpo inválido.
        '401':
          description: Não autenticado.
        '403':
          description: Escopo `conversions:manage` ausente.
components:
  securitySchemes:
    ntfConversionsBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API Key no header Authorization. Exemplo: `Authorization: Bearer
        sk_live_xxxxx`
    ntfConversionsApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: API Key no header x-api-key.

````