Ver .md

flow_runs.list

Listar execuções de flows. Execuções do mais recente para o mais antigo. Filtros: flowId, status, contactId. Use before (o nextBefore anterior) para a página seguinte.

  • Endpoint: POST https://app.atomiks.com.br/api/v1/flow_runs.list (corpo JSON)
  • Quem pode chamar: membro da conta
  • Escopo da chave: automations:read
  • Grava dados: não
  • Pela chave de API: sim
  • Ferramenta MCP: flow_runs_list
  • Ficha em JSON: https://app.atomiks.com.br/api/v1/openapi.json (operationId flow_runs.list)

Entrada

CampoTipoObrigatórioNota
flowIdstring (uuid)não
status"running" | "waiting_reply" | "waiting_delay" | "completed" | "failed" | "canceled" | "expired"não
contactIdstring (uuid)não
limitintegernãopadrão 50
beforestringnão
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "flowId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "status": {
      "type": "string",
      "enum": [
        "running",
        "waiting_reply",
        "waiting_delay",
        "completed",
        "failed",
        "canceled",
        "expired"
      ]
    },
    "contactId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "limit": {
      "default": 50,
      "type": "integer",
      "minimum": 1,
      "maximum": 200
    },
    "before": {
      "type": "string"
    }
  }
}

Exemplo

curl -X POST https://app.atomiks.com.br/api/v1/flow_runs.list \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"failed","limit":50}'

CLI:

node cli/atomiks.mjs flow_runs.list --json '{"status":"failed","limit":50}'

MCP: ferramenta flow_runs_list com a mesma entrada.

Saída

Sucesso: {"data": ...} com o formato abaixo.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "flowId": {
            "type": "string"
          },
          "flowVersionId": {
            "type": "string"
          },
          "contactId": {
            "type": "string"
          },
          "conversationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "channelId": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "currentNodeId": {
            "type": [
              "string",
              "null"
            ]
          },
          "vars": {},
          "lastError": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "finishedAt": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "flowId",
          "flowVersionId",
          "contactId",
          "conversationId",
          "channelId",
          "status",
          "currentNodeId",
          "vars",
          "lastError",
          "createdAt",
          "updatedAt",
          "finishedAt"
        ],
        "additionalProperties": false
      }
    },
    "nextBefore": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "nextBefore"
  ],
  "additionalProperties": false
}

Erros

{"error": {"code", "message", "requestId"}}. Códigos: invalid_input (400), unauthorized (401), forbidden / account_pending / scope_missing (403), not_found (404), limit_reached (409), internal (500).