Skip to content

Export audit logs

The audit logs Platform API returns a paginated, filterable history of actions in your Mindflow organization—flows, deployments, credentials, permissions, and more. Org Admins copy the organization API Key from Studio, then call GET /v1/audit-logs with that Bearer token. There is no export download button in Studio; use the API (or your SIEM connector) to pull logs before they expire.

  • You need a machine-readable export for compliance, forensics, or a SIEM.
  • You want to filter by category, time range, or selected fields.
  • Prefer Studio run history and designer changelog when you only need interactive debugging inside one flow.

Before you begin, you need Org Admin rights to view the organization API key. Treat the key as an administrative secret—it can perform organization-level API actions, including log export.

The API Key section on the Organization page authenticates organization-level Mindflow API requests.

  1. Open Organization. In Studio, open your profile menu, then choose Organization.

  2. Open API Key. Scroll to API Key and copy the key for use as a Bearer token. Store it in your secret manager—do not commit it to source control.

    Organization API Key section for authenticating Platform API requests

Base URL: https://api-{tenant}.mindflow.io/v1 (replace {tenant} with your tenant slug). Some environments use a different root domain—use the API host Mindflow gave you.

MethodPathPurpose
GET/audit-logsPaginated, filterable list of audit entries.

Every request needs:

Authorization header
Authorization: Bearer YOUR_ORGANIZATION_API_KEY

Requests without a valid token receive 401.

  1. List recent logs. Call the endpoint with your key:

    Basic list
    curl -X GET "https://api-acme-corp.mindflow.io/v1/audit-logs" \
    -H "Authorization: Bearer $API_KEY"
  2. Filter by category (optional). Pass category when you only need one area:

    Filter by category
    curl -X GET "https://api-acme-corp.mindflow.io/v1/audit-logs?category=flow" \
    -H "Authorization: Bearer $API_KEY"
  3. Select fields and a time window (optional). Use fields (max 6), after or before (ISO 8601), and limit (required with before / after):

    Fields and date window
    curl -X GET \
    "https://api-acme-corp.mindflow.io/v1/audit-logs?fields=auditLogId,category,timestamp&after=2024-03-19T00:00:00Z&limit=50" \
    -H "Authorization: Bearer $API_KEY"
ParameterTypeDescription
categoryenumFilter by category. Omit for all.
fieldsstring[]Subset of fields (max 6).
limitint (1–1000, default 100)Page size. Required with before or after.
cursorstring (Base64)Opaque page cursor. Cannot combine with before / after.
beforeISO 8601Events before this time (exclusive). Requires limit.
afterISO 8601Events after this time (exclusive). Requires limit.

Allowed fields values: auditLogId, category, type, timestamp, expiresAt, metadata.

Categories: flow, flow-deployment, credential, environment, permission, mcp, team, organization.

Pagination strategies:

StrategyHowWhen to use
Date window + cursorPass before or after with limit; follow pagination.nextCursor in the same window.Time-bounded export
Pure cursorPass limit and the previous nextCursor.Stream the full history

Results sort by timestamp (newest first). Max page size is 1000. If no logs match for a continuous 72 hours, the API can return an empty page—keep paginating or widen the window.

Response shape
{
"auditLogs": [
{
"auditLogId": "AUDI-57b858ed-ec60-4507-b2ef-ea58244ac742",
"category": "flow",
"type": "step_update",
"timestamp": "2024-03-20T15:30:45.123Z",
"createdAt": "2025-03-13T15:24:22.092Z",
"expiresAt": "2025-03-27T15:24:23.379Z",
"metadata": {}
}
],
"pagination": {
"nextCursor": "eyJsYXN0S2V5IjoiMTIzNCJ9"
}
}
FieldNotes
auditLogIdAUDI-{UUIDv4}
categorySee categories above
typeSnake_case event name for that category
timestampWhen the action occurred
createdAtWhen the log record was written
expiresAtRetention / automatic deletion time
metadataContext (user, IP, flow ids, and similar)
Event types by category
Event typeDescription
deploy_queuedFlow deployment deploy queued
deploy_startedFlow deployment deploy started
deploy_completedFlow deployment deploy completed
deploy_failedFlow deployment deploy failed
run_queuedFlow deployment run queued
run_startedFlow deployment run started
run_completedFlow deployment run completed
run_failedFlow deployment run failed
step_run_queuedFlow deployment step run queued
step_run_startedFlow deployment step run started
step_run_completedFlow deployment step run completed
step_run_failedFlow deployment step run failed
Event typeDescription
step_createCreation of a new step in a flow
step_updateUpdate to an existing step in a flow
step_deleteDeletion of a step from a flow
link_createCreation of a new link between steps
link_updateUpdate to an existing link between steps
link_deleteDeletion of a link between steps
flow_createCreation of a new flow
flow_updateUpdate to an existing flow
flow_deleteDeletion of a flow
flow_moveMoving a flow between environments
flow_duplicateDuplicating a flow
import_exportImporting entities into the system
ai_generate_flow_descriptionAI generation of a playbook description
ai_generate_flowAI generation of a flow
revertReverting a changelog action

permission, credential, environment, team, organization

Section titled “permission, credential, environment, team, organization”

Shared lifecycle types: create_completed, create_failed, update_completed, update_failed, delete_completed, delete_failed. Credentials also include update_value_completed, update_value_failed, get_completed, and get_failed.

Event typeDescription
invocation_completedMCP JSON-RPC request completed successfully
invocation_failedMCP JSON-RPC request failed
StatusWhen
400Invalid parameters (for example cursor + before)
401Missing or incorrect Bearer token
429Rate limit; honor Retry-After
500Unexpected server error—retry later

Rate-limit response headers can include X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and Retry-After. Use backoff or a queue when you stream large exports.

A compliance engineer copies the organization API key, then exports one day of flow events into object storage:

  1. Copy the API key from Organization → API Key into a secret store.
  2. Page with after and limit. Start at midnight UTC; follow nextCursor until it is null.
  3. Write each page to durable storage before the entries hit expiresAt.
  • Pull data before expiresAt if you need long-term retention outside Mindflow.
  • Prefer small date chunks and fields= when you only need ids and timestamps.
  • Audit metadata can include personal or sensitive data—protect the token and the export files.

Related: Monitor quotas, Manage permissions (RBAC).