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

# Excluir automação

> Remove uma automação.



## OpenAPI

````yaml /automations-api/api-reference/openapi-automations.json delete /v1/automations/{automationId}
openapi: 3.0.3
info:
  title: 'Notifique API v1: Automações e eventos'
  version: 1.0.0
  description: >-
    Definição de **eventos** (nome + schema opcional do `payload`),
    **automações** em grafo (gatilho por evento ou **mensagem recebida** em
    canal, delays, condições, inclusive com **`source: "message"`** no inbound,
    **`endFlow`** para encerrar um ramo, envios multicanal, atualização de
    contato, etc.) e **disparo** via `POST /v1/events/send`. Autenticação:
    `Authorization: Bearer sk_live_...` ou header `x-api-key`. Todos os corpos
    usam **camelCase**.


    **Escopos:** `events:read` | `events:write` | `automations:read` |
    `automations:write`. O motor de envio dos passos (`sendTemplate`, e-mails
    diretos, etc.) ainda exige as chaves de envio dos canais correspondentes.


    **Paginação:** query `page` (≥1, padrão 1) e `limit` (1 a 100, padrão 20),
    como strings ou números coerentes.


    **Workspace bloqueado** responde **402** com `Payment Required`.


    **Onboarding:** em qualquer rota `/v1`, se a conta ainda não concluiu o
    onboarding, o middleware responde **403** com `code: ONBOARDING_REQUIRED`
    (corpo semelhante aos outros 403).
servers:
  - url: https://api.notifique.dev
    description: Produção
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).
paths:
  /v1/automations/{automationId}:
    delete:
      tags:
        - Automações
      summary: Excluir automação
      description: Remove uma automação.
      operationId: ntfAuto_deleteAutomation
      parameters:
        - $ref: '#/components/parameters/NtfAuto_automationId'
      responses:
        '200':
          $ref: '#/components/responses/NtfAuto_Delete200'
        '401':
          $ref: '#/components/responses/NtfAuto_401'
        '402':
          $ref: '#/components/responses/NtfAuto_402'
        '403':
          $ref: '#/components/responses/NtfAuto_403AutomationsWrite'
        '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_Delete200:
      description: Removido (soft delete).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAuto_DeleteResponse'
          example:
            success: true
            data:
              deleted: true
    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: Plano expirado ou workspace suspenso.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAuto_ErrorPaymentRequired'
          example:
            success: false
            error: Payment Required
            message: Plan expired or suspended
            code: WORKSPACE_BLOCKED
    NtfAuto_403AutomationsWrite:
      description: Sem escopo `automations:write`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAuto_ErrorForbiddenScope'
          example:
            success: false
            error: Forbidden
            message: 'Missing scope: automations:write'
            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_DeleteResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          type: object
          required:
            - deleted
          properties:
            deleted:
              type: boolean
              enum:
                - true
    NtfAuto_ErrorEnvelope401:
      type: object
      required:
        - success
        - error
        - message
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
          example: Unauthorized
        message:
          type: 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
    NtfAuto_ErrorForbiddenScope:
      type: object
      required:
        - success
        - error
        - message
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
          enum:
            - Forbidden
        message:
          type: string
    NtfAuto_ErrorNotFound:
      type: object
      required:
        - success
        - error
        - message
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
          enum:
            - Not Found
        message:
          type: 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.

````