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

# Listar ejecuciones

> Lista ejecuciones de una automatización.



## OpenAPI

````yaml /es/automations-api/api-reference/openapi-automations.json get /v1/automations/{automationId}/runs
openapi: 3.0.3
info:
  title: 'Notifique API v1: Automatizaciones y eventos'
  version: 1.0.0
  description: >-
    Definición de **eventos** (nombre + esquema `payload` opcional),
    **automatizaciones** como gráfico (activador por evento o **mensaje
    entrante** en un canal, retrasos, condiciones, incluido **`source:
    "message"`** en entrante, **`endFlow`** para finalizar una sucursal, envíos
    multicanal, actualizaciones de contactos, etc.) y **activador** mediante
    `POST /v1/events/send`. Autenticación: encabezado `Authorization: Bearer
    sk_live_...` o `x-api-key`. Todos los cuerpos usan **camelCase**.


    **Alcances:** `events:read` | `events:write` | `automations:read` |
    `automations:write`. Los pasos de envío (`sendTemplate`, correos
    electrónicos directos, etc.) aún requieren las claves de envío del canal
    correspondiente.


    **Paginación:** consulta `page` (≥1, predeterminado 1) y `limit` (1 a 100,
    predeterminado 20), como cadenas o números coherentes.


    **Espacio de trabajo bloqueado** devuelve **402** con `Payment Required`.


    **Incorporación:** en cualquier ruta `/v1`, si la incorporación está
    incompleta, el middleware devuelve **403** con `code: ONBOARDING_REQUIRED`
    (cuerpo similar a otros 403).


    **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: Producción
security:
  - ntfAutoBearerAuth: []
  - ntfAutoApiKeyHeader: []
tags:
  - name: Eventos
    description: CRUD de configuración de eventos + disparador `POST /v1/events/send`.
  - name: Automatizaciones
    description: CRUD de automatizaciones, listado de parada y ejecución.
  - name: Runs
    description: Historial y detalles de ejecuciones (`AutomationRun` + pasos).
  - 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: Conversaciones unificadas y métricas (recurso premium).
paths:
  /v1/automations/{automationId}/runs:
    get:
      tags:
        - Runs
      summary: Listar ejecuciones
      description: Lista ejecuciones de una automatización.
      operationId: ntfAuto_listRuns
      parameters:
        - $ref: '#/components/parameters/NtfAuto_automationId'
        - name: page
          in: query
          schema:
            type: string
        - name: limit
          in: query
          schema:
            type: string
        - name: status
          in: query
          description: >-
            Filtro opcional. Valores: `QUEUED`, `RUNNING`, `COMPLETED`,
            `FAILED`, `CANCELLED`.
          schema:
            type: string
            enum:
              - QUEUED
              - RUNNING
              - COMPLETED
              - FAILED
              - CANCELLED
      responses:
        '200':
          $ref: '#/components/responses/NtfAuto_RunList200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ntfAuto_ListRunsResponse'
        '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: Cuida la automatización.
  responses:
    NtfAuto_RunList200:
      description: Lista de rones.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAuto_RunListResponse'
          example:
            success: true
            data:
              items:
                - id: clxx...
                  status: QUEUED
                  eventName: string
                  contactId: clxx...
                  createdAt: '2025-02-10T14:00:00.000Z'
                  startedAt: '2025-02-10T14:00:00.000Z'
                  completedAt: '2025-02-10T14:00:00.000Z'
                  errorMessage: string
              page: 1
              limit: 1
              total: 1
    NtfAuto_401:
      description: >-
        Clave faltante o no válida. En el middleware global de `/v1` también
        ocurre cuando no hay una clave API.
      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: >-
        Plan expirado o workspace suspendido (`WORKSPACE_BLOCKED`), límite de
        automatizaciones del plan (`PLAN_LIMIT_AUTOMATIONS`) o plan/trial sin
        saldo para automatizaciones/eventos
        (`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: Sin alcance `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: Automatización inexistente o excluida.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfAuto_ErrorNotFound'
          example:
            success: false
            error: Not Found
            message: Automation not found
            code: NOT_FOUND
  schemas:
    ntfAuto_ListRunsResponse:
      type: object
      additionalProperties: false
      description: Resposta JSON vazia (sucesso sem payload).
      properties:
        success:
          type: boolean
          example: true
      example:
        success: true
    NtfAuto_RunListResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          type: object
          required:
            - items
            - page
            - limit
            - total
          properties:
            items:
              type: array
              items:
                $ref: '#/components/schemas/NtfAuto_AutomationRunSummary'
            page:
              type: integer
            limit:
              type: integer
            total:
              type: integer
      example:
        success: true
        data:
          items:
            - id: clxx...
              status: QUEUED
              eventName: string
              contactId: clxx...
              createdAt: '2025-02-10T14:00:00.000Z'
              startedAt: '2025-02-10T14:00:00.000Z'
              completedAt: '2025-02-10T14:00:00.000Z'
              errorMessage: string
          page: 1
          limit: 1
          total: 1
    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_AutomationRunSummary:
      type: object
      required:
        - id
        - status
        - eventName
        - contactId
        - createdAt
      properties:
        id:
          type: string
        status:
          $ref: '#/components/schemas/NtfAuto_AutomationRunStatus'
        eventName:
          type: string
        contactId:
          type: string
        startedAt:
          nullable: true
          type: string
          format: date-time
        completedAt:
          nullable: true
          type: string
          format: date-time
        errorMessage:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
      example:
        id: clxx...
        status: QUEUED
        eventName: string
        contactId: clxx...
        createdAt: '2025-02-10T14:00:00.000Z'
        startedAt: '2025-02-10T14:00:00.000Z'
        completedAt: '2025-02-10T14:00:00.000Z'
        errorMessage: string
    NtfAuto_AutomationRunStatus:
      type: string
      enum:
        - QUEUED
        - RUNNING
        - COMPLETED
        - FAILED
        - CANCELLED
  securitySchemes:
    ntfAutoBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: '`Authorization: Bearer sk_live_...`'
    ntfAutoApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: Mismo valor de clave, sin prefijo de portador.

````