> ## 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.

# Get automation

> Get an automation.



## OpenAPI

````yaml /en/automations-api/api-reference/openapi-automations.json get /v1/automations/{automationId}
openapi: 3.0.3
info:
  title: 'Notifique API v1: Automations and events'
  version: 1.0.0
  description: >-
    Definition of **events** (name + optional `payload` schema), **automations**
    as a graph (trigger by event or **inbound message** on a channel, delays,
    conditions, including **`source: "message"`** on inbound, **`endFlow`** to
    end a branch, multi-channel sends, contact updates, etc.) and **trigger**
    via `POST /v1/events/send`. Auth: `Authorization: Bearer sk_live_...` or
    `x-api-key` header. All bodies use **camelCase**.


    **Scopes:** `events:read` | `events:write` | `automations:read` |
    `automations:write`. Send steps (`sendTemplate`, direct emails, etc.) still
    require the matching channel send keys.


    **Pagination:** query `page` (≥1, default 1) and `limit` (1 to 100, default
    20), as strings or coherent numbers.


    **Blocked workspace** returns **402** with `Payment Required`.


    **Onboarding:** on any `/v1` route, if onboarding is incomplete, middleware
    returns **403** with `code: ONBOARDING_REQUIRED` (body similar to other
    403s).


    **Escopos adicionais:** `assistants:read` | `assistants:write` |
    `assistants:invoke` | `knowledge_bases:read` | `knowledge_bases:write` |
    `mcp_connections:read` | `mcp_connections:write` | `http_tools:read` |
    `http_tools:write`.
servers:
  - url: https://api.notifique.dev
    description: Production
security:
  - ntfAutoBearerAuth: []
  - ntfAutoApiKeyHeader: []
tags:
  - name: Eventos
    description: CRUD de definições de evento + disparo `POST /v1/events/send`.
  - name: Automações
    description: CRUD de automações, stop e listagem de runs.
  - name: Runs
    description: Histórico e detalhe de execuções (`AutomationRun` + passos).
  - name: Assistentes
    description: CRUD de WorkspaceAssistant, invoke de teste e bindings MCP/HTTP.
  - name: Bases de conhecimento
    description: CRUD de bases RAG e documentos.
  - name: MCP
    description: Conexões MCP do workspace (CUSTOM_URL via API; OAuth curado no painel).
  - name: HTTP tools
    description: Ferramentas REST allowlist para assistentes.
  - name: Inbox
    description: Unified conversations and metrics (premium feature).
paths:
  /v1/automations/{automationId}:
    get:
      tags:
        - Automações
      summary: Get automation
      description: Get an automation.
      operationId: ntfAuto_getAutomation
      parameters:
        - $ref: '#/components/parameters/NtfAuto_automationId'
      responses:
        '200':
          $ref: '#/components/responses/NtfAuto_AutomationGet200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ntfAuto_GetAutomationResponse'
        '401':
          $ref: '#/components/responses/NtfAuto_401'
        '402':
          $ref: '#/components/responses/NtfAuto_402'
        '403':
          $ref: '#/components/responses/NtfAuto_403AutomationsRead'
        '404':
          $ref: '#/components/responses/NtfAuto_AutomationNotFound'
components:
  parameters:
    NtfAuto_automationId:
      name: automationId
      in: path
      required: true
      schema:
        type: string
      description: Cuid da automação.
  responses:
    NtfAuto_AutomationGet200:
      description: Registro completo incluindo `graphJson`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAuto_AutomationFullResponse'
          example:
            success: true
            data:
              id: clxx...
              workspaceId: clxx...
              name: Exemplo
              status: ENABLED
              triggerEventName: string
              graphJson:
                steps:
                  - stepKey: string
                    stepType: trigger
                connections:
                  - from: '5511999999999'
                    to: '5511999999999'
                    branch: 'true'
                nodeLayout: {}
              graphVersion: 1
              createdAt: '2025-02-10T14:00:00.000Z'
              updatedAt: '2025-02-10T14:00:00.000Z'
              triggerKind: EVENT
              triggerChannel: WHATSAPP
              triggerInstanceId: clxx...
              triggerAiWebWidgetId: clxx...
              deletedAt: '2025-02-10T14:00:00.000Z'
    NtfAuto_401:
      description: >-
        Chave ausente ou inválida. No middleware global de `/v1` também ocorre
        quando não há API Key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAuto_ErrorEnvelope401'
          examples:
            route:
              value:
                success: false
                error: Unauthorized
                message: Invalid or missing API Key
                code: UNAUTHORIZED
            middleware:
              value:
                success: false
                error: Unauthorized
                message: >-
                  API Key is required. Provide Authorization: Bearer <key> or
                  x-api-key header.
                code: UNAUTHORIZED
    NtfAuto_402:
      description: >-
        Expired plan or suspended workspace (`WORKSPACE_BLOCKED`), plan
        automation limit (`PLAN_LIMIT_AUTOMATIONS`), or plan/trial without
        balance for automations/events
        (`PREMIUM_FEATURE_REQUIRES_PLAN_OR_BALANCE`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAuto_ErrorPaymentRequired'
          examples:
            workspaceBlocked:
              value:
                success: false
                error: Payment Required
                message: Plan expired or suspended
                code: WORKSPACE_BLOCKED
            premiumFeature:
              value:
                success: false
                error: Payment Required
                message: Premium automations require an active plan, trial, or balance
                code: PREMIUM_FEATURE_REQUIRES_PLAN_OR_BALANCE
    NtfAuto_403AutomationsRead:
      description: Sem escopo `automations:read`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAuto_ErrorForbiddenScope'
          example:
            success: false
            error: Forbidden
            message: 'Missing scope: automations:read'
            code: FORBIDDEN
    NtfAuto_AutomationNotFound:
      description: Automação inexistente ou excluída.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAuto_ErrorNotFound'
          example:
            success: false
            error: Not Found
            message: Automation not found
            code: NOT_FOUND
  schemas:
    ntfAuto_GetAutomationResponse:
      type: object
      additionalProperties: false
      description: Resposta JSON vazia (sucesso sem payload).
      properties:
        success:
          type: boolean
          example: true
      example:
        success: true
    NtfAuto_AutomationFullResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          $ref: '#/components/schemas/NtfAuto_AutomationRowFull'
      example:
        success: true
        data:
          id: clxx...
          workspaceId: clxx...
          name: Exemplo
          status: ENABLED
          triggerEventName: string
          graphJson:
            steps:
              - stepKey: string
                stepType: trigger
            connections:
              - from: '5511999999999'
                to: '5511999999999'
                branch: 'true'
            nodeLayout: {}
          graphVersion: 1
          createdAt: '2025-02-10T14:00:00.000Z'
          updatedAt: '2025-02-10T14:00:00.000Z'
          triggerKind: EVENT
          triggerChannel: WHATSAPP
          triggerInstanceId: clxx...
          triggerAiWebWidgetId: clxx...
          deletedAt: '2025-02-10T14:00:00.000Z'
    NtfAuto_ErrorEnvelope401:
      type: object
      required:
        - success
        - error
        - message
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
          example: Unauthorized
        message:
          type: string
        code:
          type: string
          example: VALIDATION_ERROR
      example:
        success: false
        error: Unauthorized
        message: string
    NtfAuto_ErrorPaymentRequired:
      type: object
      required:
        - success
        - error
        - message
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
          enum:
            - Payment Required
        message:
          type: string
          example: Plan expired or suspended
        code:
          type: string
          enum:
            - WORKSPACE_BLOCKED
            - PLAN_LIMIT_AUTOMATIONS
            - PREMIUM_FEATURE_REQUIRES_PLAN_OR_BALANCE
      example:
        success: false
        error: Payment Required
        message: Plan expired or suspended
        code: WORKSPACE_BLOCKED
    NtfAuto_ErrorForbiddenScope:
      type: object
      required:
        - success
        - error
        - message
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
          enum:
            - Forbidden
        message:
          type: string
        code:
          type: string
          example: FORBIDDEN
      example:
        success: false
        error: Forbidden
        message: string
    NtfAuto_ErrorNotFound:
      type: object
      required:
        - success
        - error
        - message
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
          enum:
            - Not Found
        message:
          type: string
        code:
          type: string
          example: NOT_FOUND
      example:
        success: false
        error: Not Found
        message: string
    NtfAuto_AutomationRowFull:
      type: object
      required:
        - id
        - workspaceId
        - name
        - status
        - triggerEventName
        - graphJson
        - graphVersion
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
        workspaceId:
          type: string
        name:
          type: string
        status:
          type: string
          enum:
            - ENABLED
            - DISABLED
        triggerEventName:
          type: string
        triggerKind:
          type: string
          enum:
            - EVENT
            - CHANNEL_INBOUND
            - WEBHOOK
            - WHATSAPP_CALL
        triggerChannel:
          nullable: true
          type: string
          enum:
            - WHATSAPP
            - TELEGRAM
            - SMS
            - WEB_WIDGET
            - INSTAGRAM
        triggerInstanceId:
          type: string
          nullable: true
        triggerAiWebWidgetId:
          type: string
          nullable: true
        graphJson:
          $ref: '#/components/schemas/NtfAuto_AutomationGraph'
        graphVersion:
          type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          nullable: true
          type: string
          format: date-time
      example:
        id: clxx...
        workspaceId: clxx...
        name: Exemplo
        status: ENABLED
        triggerEventName: string
        graphJson:
          steps:
            - stepKey: string
              stepType: trigger
          connections:
            - from: '5511999999999'
              to: '5511999999999'
              branch: 'true'
          nodeLayout: {}
        graphVersion: 1
        createdAt: '2025-02-10T14:00:00.000Z'
        updatedAt: '2025-02-10T14:00:00.000Z'
        triggerKind: EVENT
        triggerChannel: WHATSAPP
        triggerInstanceId: clxx...
        triggerAiWebWidgetId: clxx...
        deletedAt: '2025-02-10T14:00:00.000Z'
    NtfAuto_AutomationGraph:
      type: object
      required:
        - steps
        - connections
      properties:
        steps:
          type: array
          minItems: 2
          items:
            $ref: '#/components/schemas/NtfAuto_GraphStep'
        connections:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/NtfAuto_GraphConnection'
        nodeLayout:
          type: object
          additionalProperties:
            type: object
            required:
              - x
              - 'y'
            properties:
              x:
                type: number
              'y':
                type: number
          description: 'Opcional: posições do editor visual (`stepKey` → coordenadas).'
          properties: {}
      description: >-
        Grafo acíclico (DAG) com exatamente um `trigger`. Arestas a partir de
        `condition` exigem `branch`: `true` | `false`.
      example:
        steps:
          - stepKey: string
            stepType: trigger
        connections:
          - from: '5511999999999'
            to: '5511999999999'
            branch: 'true'
        nodeLayout: {}
    NtfAuto_GraphStep:
      oneOf:
        - $ref: '#/components/schemas/NtfAuto_StepTrigger'
        - $ref: '#/components/schemas/NtfAuto_StepDelay'
        - $ref: '#/components/schemas/NtfAuto_StepCondition'
        - $ref: '#/components/schemas/NtfAuto_StepSendTemplate'
        - $ref: '#/components/schemas/NtfAuto_StepSendEmail'
        - $ref: '#/components/schemas/NtfAuto_StepSendWhatsapp'
        - $ref: '#/components/schemas/NtfAuto_StepSendSms'
        - $ref: '#/components/schemas/NtfAuto_StepSendTelegram'
        - $ref: '#/components/schemas/NtfAuto_StepSendPush'
        - $ref: '#/components/schemas/NtfAuto_StepSendRcs'
        - $ref: '#/components/schemas/NtfAuto_StepUpdateContact'
        - $ref: '#/components/schemas/NtfAuto_StepDeleteContact'
        - $ref: '#/components/schemas/NtfAuto_StepCreateContact'
        - $ref: '#/components/schemas/NtfAuto_StepEndFlow'
      discriminator:
        propertyName: stepType
        mapping:
          trigger:
            $ref: '#/components/schemas/NtfAuto_StepTrigger'
          delay:
            $ref: '#/components/schemas/NtfAuto_StepDelay'
          condition:
            $ref: '#/components/schemas/NtfAuto_StepCondition'
          sendTemplate:
            $ref: '#/components/schemas/NtfAuto_StepSendTemplate'
          sendEmail:
            $ref: '#/components/schemas/NtfAuto_StepSendEmail'
          sendWhatsapp:
            $ref: '#/components/schemas/NtfAuto_StepSendWhatsapp'
          sendSms:
            $ref: '#/components/schemas/NtfAuto_StepSendSms'
          sendTelegram:
            $ref: '#/components/schemas/NtfAuto_StepSendTelegram'
          sendPush:
            $ref: '#/components/schemas/NtfAuto_StepSendPush'
          sendRcs:
            $ref: '#/components/schemas/NtfAuto_StepSendRcs'
          updateContact:
            $ref: '#/components/schemas/NtfAuto_StepUpdateContact'
          deleteContact:
            $ref: '#/components/schemas/NtfAuto_StepDeleteContact'
          createContact:
            $ref: '#/components/schemas/NtfAuto_StepCreateContact'
          endFlow:
            $ref: '#/components/schemas/NtfAuto_StepEndFlow'
    NtfAuto_GraphConnection:
      type: object
      required:
        - from
        - to
      properties:
        from:
          type: string
          minLength: 1
          maxLength: 128
        to:
          type: string
          minLength: 1
          maxLength: 128
        branch:
          type: string
          enum:
            - 'true'
            - 'false'
          description: Obrigatório apenas saindo de `condition`.
      example:
        from: '5511999999999'
        to: '5511999999999'
        branch: 'true'
    NtfAuto_StepTrigger:
      type: object
      required:
        - stepKey
        - stepType
        - config
      properties:
        stepKey:
          type: string
          minLength: 1
          maxLength: 128
        stepType:
          type: string
          enum:
            - trigger
        config:
          oneOf:
            - $ref: '#/components/schemas/NtfAuto_TriggerConfigEvent'
            - $ref: '#/components/schemas/NtfAuto_TriggerConfigChannelInbound'
            - $ref: '#/components/schemas/NtfAuto_TriggerConfigWebhook'
            - $ref: '#/components/schemas/NtfAuto_TriggerConfigWhatsappCall'
          discriminator:
            propertyName: triggerKind
            mapping:
              event:
                $ref: '#/components/schemas/NtfAuto_TriggerConfigEvent'
              channelInbound:
                $ref: '#/components/schemas/NtfAuto_TriggerConfigChannelInbound'
              webhook:
                $ref: '#/components/schemas/NtfAuto_TriggerConfigWebhook'
              whatsappCall:
                $ref: '#/components/schemas/NtfAuto_TriggerConfigWhatsappCall'
      example:
        stepKey: string
        stepType: trigger
    NtfAuto_StepDelay:
      type: object
      required:
        - stepKey
        - stepType
        - config
      properties:
        stepKey:
          type: string
          minLength: 1
          maxLength: 128
        stepType:
          type: string
          enum:
            - delay
        config:
          type: object
          required:
            - durationMs
          properties:
            durationMs:
              type: integer
              minimum: 0
              maximum: 2592000000
              description: >-
                Máximo 30 dias em ms. Para persistir: `durationMs` > 0 e não
                usar só `editorDraft`.
            editorPlaceholder:
              type: boolean
            editorDraft:
              type: boolean
      example:
        stepKey: string
        stepType: delay
        config:
          durationMs: 1
          editorPlaceholder: true
          editorDraft: true
    NtfAuto_StepCondition:
      type: object
      required:
        - stepKey
        - stepType
        - config
      properties:
        stepKey:
          type: string
          minLength: 1
          maxLength: 128
        stepType:
          type: string
          enum:
            - condition
        config:
          type: object
          required:
            - source
            - operator
          properties:
            source:
              type: string
              enum:
                - event
                - contact
                - message
              description: >-
                `event` ou `contact` quando o gatilho é evento da API. `message`
                é **obrigatório** quando o gatilho é mensagem recebida em canal
                (compara texto inbound: body → bodyPreview → preview).
            propertyKey:
              type: string
              maxLength: 256
              nullable: true
              description: >-
                Obrigatório para `source` `event` ou `contact`: path no payload
                (pontos permitidos) ou campo do contato. Omitir para `message`.
            operator:
              type: string
              enum:
                - equals
                - notEquals
                - exists
                - isEmpty
                - contains
                - startsWith
                - endsWith
                - gt
                - lt
                - gte
                - lte
            compareValue:
              type: string
              nullable: true
              description: >-
                Obrigatório (não vazio) para operadores exceto `exists` e
                `isEmpty`. Para `gt`, `lt`, `gte` e `lte`, o valor da esquerda e
                o `compareValue` são interpretados como números (string numérica
                ou número JSON); se algum não for número finito, a condição é
                falsa.
      example:
        stepKey: string
        stepType: condition
        config:
          source: event
          operator: equals
          propertyKey: string
          compareValue: string
    NtfAuto_StepSendTemplate:
      type: object
      required:
        - stepKey
        - stepType
        - config
      properties:
        stepKey:
          type: string
        stepType:
          type: string
          enum:
            - sendTemplate
        config:
          type: object
          required:
            - templateId
            - channels
          properties:
            templateId:
              type: string
            channels:
              type: array
              minItems: 1
              items:
                type: string
                enum:
                  - whatsapp
                  - sms
                  - email
                  - telegram
            fromEmail:
              type: string
              nullable: true
            instanceId:
              type: string
              nullable: true
            telegramInstanceId:
              type: string
              nullable: true
            variables:
              type: object
              additionalProperties:
                type: string
      example:
        stepKey: string
        stepType: sendTemplate
        config:
          templateId: clxx...
          channels:
            - whatsapp
          fromEmail: string
          instanceId: clxx...
          telegramInstanceId: clxx...
          variables: {}
    NtfAuto_StepSendEmail:
      type: object
      required:
        - stepKey
        - stepType
        - config
      properties:
        stepKey:
          type: string
        stepType:
          type: string
          enum:
            - sendEmail
        config:
          type: object
          required:
            - subject
            - htmlBody
          properties:
            htmlBody:
              type: string
              maxLength: 100000
            fromEmail:
              type: string
              nullable: true
      example:
        stepKey: string
        stepType: sendEmail
        config:
          htmlBody: string
          fromEmail: string
    NtfAuto_StepSendWhatsapp:
      type: object
      required:
        - stepKey
        - stepType
        - config
      properties:
        stepKey:
          type: string
        stepType:
          type: string
          enum:
            - sendWhatsapp
        config:
          type: object
          required:
            - instanceId
            - body
          properties:
            instanceId:
              type: string
      example:
        stepKey: string
        stepType: sendWhatsapp
        config:
          instanceId: clxx...
    NtfAuto_StepSendSms:
      type: object
      required:
        - stepKey
        - stepType
        - config
      properties:
        stepKey:
          type: string
        stepType:
          type: string
          enum:
            - sendSms
        config:
          type: object
          required:
            - body
          properties: {}
      example:
        stepKey: string
        stepType: sendSms
        config: {}
    NtfAuto_StepSendTelegram:
      type: object
      required:
        - stepKey
        - stepType
        - config
      properties:
        stepKey:
          type: string
        stepType:
          type: string
          enum:
            - sendTelegram
        config:
          type: object
          required:
            - instanceId
            - body
          properties:
            instanceId:
              type: string
      example:
        stepKey: string
        stepType: sendTelegram
        config:
          instanceId: clxx...
    NtfAuto_StepSendPush:
      type: object
      required:
        - stepKey
        - stepType
        - config
      properties:
        stepKey:
          type: string
        stepType:
          type: string
          enum:
            - sendPush
        config:
          type: object
          required:
            - pushAppId
            - title
            - body
          properties:
            pushAppId:
              type: string
      example:
        stepKey: string
        stepType: sendPush
        config:
          pushAppId: clxx...
    NtfAuto_StepSendRcs:
      type: object
      required:
        - stepKey
        - stepType
        - config
      properties:
        stepKey:
          type: string
        stepType:
          type: string
          enum:
            - sendRcs
        config:
          type: object
          required:
            - body
          properties: {}
      example:
        stepKey: string
        stepType: sendRcs
        config: {}
    NtfAuto_StepUpdateContact:
      type: object
      required:
        - stepKey
        - stepType
        - config
      properties:
        stepKey:
          type: string
        stepType:
          type: string
          enum:
            - updateContact
        config:
          type: object
          properties:
            name:
              type: string
              nullable: true
            email:
              type: string
              nullable: true
            phone:
              type: string
              nullable: true
            url:
              type: string
              nullable: true
            custom:
              type: object
              additionalProperties:
                type: string
            actions:
              type: array
              maxItems: 50
              items:
                $ref: '#/components/schemas/NtfAuto_UpdateContactAction'
              description: >-
                Lista preferida. Se presente e não vazia, validação extra
                aplica-se (não misturar `clear` com `custom:`).
          description: 'Legado: campos planos + `custom`. Novo fluxo: `actions`.'
      example:
        stepKey: string
        stepType: updateContact
        config:
          name: Exemplo
          email: string
          phone: string
          url: https://example.com/resource
          custom: {}
          actions:
            - fieldKey: string
              intent: clear
              literal: string
              eventPath: string
    NtfAuto_StepDeleteContact:
      type: object
      required:
        - stepKey
        - stepType
        - config
      properties:
        stepKey:
          type: string
        stepType:
          type: string
          enum:
            - deleteContact
        config:
          type: object
          additionalProperties: false
      example:
        stepKey: string
        stepType: deleteContact
        config: {}
    NtfAuto_StepCreateContact:
      type: object
      required:
        - stepKey
        - stepType
        - config
      properties:
        stepKey:
          type: string
        stepType:
          type: string
          enum:
            - createContact
        config:
          type: object
          properties:
            name:
              type: string
              nullable: true
            email:
              type: string
              nullable: true
            phone:
              type: string
              nullable: true
          description: Pelo menos um de `email` ou `phone` não vazio após trim.
      example:
        stepKey: string
        stepType: createContact
        config:
          name: Exemplo
          email: string
          phone: string
    NtfAuto_StepEndFlow:
      type: object
      required:
        - stepKey
        - stepType
        - config
      properties:
        stepKey:
          type: string
          minLength: 1
          maxLength: 128
        stepType:
          type: string
          enum:
            - endFlow
        config:
          type: object
          description: >-
            Terminator: no outgoing connections; engine completes with no side
            effects.
          additionalProperties: false
      example:
        stepKey: string
        stepType: endFlow
        config: {}
    NtfAuto_TriggerConfigEvent:
      type: object
      required:
        - triggerKind
        - eventName
      properties:
        triggerKind:
          type: string
          enum:
            - event
        eventName:
          type: string
          minLength: 1
          maxLength: 256
          description: >-
            Name registered via `POST /v1/events`. Must not start with
            `notifique:` (case-insensitive), except allowlisted internal events.
      example:
        triggerKind: event
        eventName: string
    NtfAuto_TriggerConfigChannelInbound:
      type: object
      required:
        - triggerKind
        - channel
      properties:
        triggerKind:
          type: string
          enum:
            - channelInbound
        channel:
          type: string
          enum:
            - WHATSAPP
            - TELEGRAM
            - SMS
            - WEB_WIDGET
            - INSTAGRAM
        inboundKind:
          type: string
          enum:
            - dm
            - comment
          default: dm
          description: 'INSTAGRAM: DM or post comment. Other channels ignore.'
        instanceId:
          type: string
          nullable: true
          maxLength: 128
          description: >-
            WA/TG/SMS/INSTAGRAM: specific instance; omit or `null` = any
            instance of that channel in the workspace.
        webWidgetId:
          type: string
          nullable: true
          maxLength: 128
          description: >-
            WEB_WIDGET: specific widget; omit or `null` = any widget in the
            workspace.
        conversationSessionPolicy:
          type: object
          description: >-
            Optional inbound session policy (inactivity, post-close cooldown,
            keywords, assistant debounce).
      example:
        triggerKind: channelInbound
        channel: WHATSAPP
        inboundKind: dm
        instanceId: clxx...
        webWidgetId: clxx...
        conversationSessionPolicy: {}
    NtfAuto_TriggerConfigWebhook:
      type: object
      required:
        - triggerKind
      properties:
        triggerKind:
          type: string
          enum:
            - webhook
        payloadMappings:
          type: array
          maxItems: 40
          items:
            type: object
            required:
              - alias
              - jsonPath
            properties:
              alias:
                type: string
                maxLength: 64
              jsonPath:
                type: string
                maxLength: 512
          default: []
        contactIdPath:
          type: string
          nullable: true
          maxLength: 512
        emailPath:
          type: string
          nullable: true
          maxLength: 512
        phonePath:
          type: string
          nullable: true
          maxLength: 512
      example:
        triggerKind: webhook
        payloadMappings: []
        contactIdPath: clxx...
        emailPath: string
        phonePath: string
    NtfAuto_TriggerConfigWhatsappCall:
      type: object
      required:
        - triggerKind
        - callPhase
      properties:
        triggerKind:
          type: string
          enum:
            - whatsappCall
        callPhase:
          type: string
          enum:
            - initiated
            - answered
            - completed
            - hung_up
            - failed
            - no_answer
            - rejected
        instanceId:
          type: string
          nullable: true
          maxLength: 128
          description: >-
            Specific WhatsApp instance; omit or `null` = any instance in the
            workspace.
      example:
        triggerKind: whatsappCall
        callPhase: initiated
        instanceId: clxx...
    NtfAuto_UpdateContactAction:
      type: object
      required:
        - fieldKey
        - intent
      properties:
        fieldKey:
          type: string
          minLength: 1
          maxLength: 128
          description: >-
            `name` | `email` | `phone` | `url` | `custom:chave`. Com `intent:
            clear`, não use `custom:`.
        intent:
          type: string
          enum:
            - clear
            - set
        literal:
          type: string
          nullable: true
          description: Valor fixo ou placeholders; usado com `set`.
        eventPath:
          type: string
          nullable: true
          description: Chave no payload do evento (com `set`).
      example:
        fieldKey: string
        intent: clear
        literal: string
        eventPath: string
  securitySchemes:
    ntfAutoBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: '`Authorization: Bearer sk_live_...`'
    ntfAutoApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: Mesmo valor da chave, sem prefixo Bearer.

````