List flow deployment audit logs
const url = 'https://api-dev.mindflow.io/v1/organizations/ORGA-57b858ed-ec60-4507-b2ef-ea58244ac742/environments/ENVI-57b858ed-ec60-4507-b2ef-ea58244ac742/flow-deployments/FLDP-3fa85f64-5717-4562-b3fc-2c963f66afa6/audit-logs?limit=100&cursor=eyJvZmZzZXQiOjEwMH0%3D&actionId=ACTN-9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d&include=data';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api-dev.mindflow.io/v1/organizations/ORGA-57b858ed-ec60-4507-b2ef-ea58244ac742/environments/ENVI-57b858ed-ec60-4507-b2ef-ea58244ac742/flow-deployments/FLDP-3fa85f64-5717-4562-b3fc-2c963f66afa6/audit-logs?limit=100&cursor=eyJvZmZzZXQiOjEwMH0%3D&actionId=ACTN-9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d&include=data' \ --header 'Authorization: Bearer <token>'Returns action audit events for one deployment: runs, deploy lifecycle, and (when filtering by run) step events.
Newest first. This is not the organization-wide export on GET /audit-logs (that route needs viewAuditLogs).
Request
- Method:
GET - Path:
…/flow-deployments/{flowDeploymentId}/audit-logs
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Opaque id of the organization that owns the resource. In a playbook step this can be filled from the current organization when the caller leaves it unset.
Opaque id of the organization. Pass it unchanged.
Example
ORGA-57b858ed-ec60-4507-b2ef-ea58244ac742Opaque id of an environment. In a playbook step this can be filled from the current environment when the caller leaves it unset.
Opaque id of the environment. Pass it unchanged.
Example
ENVI-57b858ed-ec60-4507-b2ef-ea58244ac742Opaque id of a deployment of one flow into one environment. Use it to read its start endpoints, change the version, bind credentials, run, and stop.
Opaque id of the deployment. Pass it unchanged.
Example
FLDP-3fa85f64-5717-4562-b3fc-2c963f66afa6Query Parameters
Section titled “Query Parameters”Maximum number of items in this page. Omit it to use 100. The value must be from 1 to 1000.
A smaller page returns faster. A larger page needs fewer round trips. Some lists can return fewer items than
limit when the caller cannot see every row.
Example
100Opaque token from the previous response pagination.nextCursor. Omit it to read the first page.
Send the token unchanged. Do not combine it with before or after on audit logs.
An unknown or altered token is 400 BAD_REQUEST.
Example
eyJvZmZzZXQiOjEwMH0=Optional run id. When set, returns all events for that run (flow and step). When omitted, returns the deployment
timeline (runs and deploy events, newest first). A cursor issued for one scope cannot be reused with another
actionId → 400 BAD_REQUEST.
Example
ACTN-9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6dOptional data inclusion. Omit for summary fields only.
include=data adds an exported data object on each item. Small values appear inline. Large values appear as a
download-url object with a short-lived HTTPS link (treat the link as secret). At most 15 download links per
response; additional large values use unavailable with reason export-limit. Page size is capped at 20 rows; the
response may shrink when the total size approaches 4 MB. One item that still exceeds 4 MB alone returns 500.
Security: Each downloadUrl works without a Mindflow bearer token until it expires (about 600 seconds). Anyone
who has the URL can fetch the content until then. Use HTTPS only.
Example
?include=dataResponses
Section titled “Responses”One page of action audit events for the deployment. pagination.nextCursor is null on the last page.
object
Action audit event for one deployment. Same summary shape as organization audit export. data appears only when the
caller requested include=data. Exported data may nest AuditLogDataDownloadUrl or AuditLogDataUnavailable
objects inside step I/O. Step I/O may be redacted when the flow hides execution data.
object
Opaque id of this audit record.
The category of the audit log entry, which determines the context and scope of the logged action. Valid categories are: ‘flow’ for flow-related operations, ‘flow-deployment’ for deployment-specific events, ‘credential’ for credential management actions, ‘environment’ for environment management actions, ‘permission’ for permission-related changes, ‘mcp’ for Model Context Protocol (HTTP MCP) activity, ‘relay’ for Relay network register/unbind, ‘team’ for team management actions, ‘organization’ for organization lifecycle operations, ‘database’ for database and database item writes, ‘signup-email-domain’ for signup email domain changes, and ‘authentication’ for sign-up, sign-up confirmation, sign-in, and password reset activity.
The specific type of action or event that was logged. The value of this field is dependent on the category and provides detailed information about the nature of the audit event.
Audit Event Types
Category: flow-deployment
deploy_queued: Flow deployment deploy queueddeploy_started: Flow deployment deploy starteddeploy_completed: Flow deployment deploy completeddeploy_failed: Flow deployment deploy failedrun_queued: Flow deployment run queuedrun_started: Flow deployment run startedrun_completed: Flow deployment run completedrun_failed: Flow deployment run failedstep_run_queued: Flow deployment step run queuedstep_run_started: Flow deployment step run startedstep_run_completed: Flow deployment step run completedstep_run_failed: Flow deployment step run failed
Category: flow
step_create: Creation of a new step in a flowstep_update: Update to an existing step in a flowstep_delete: Deletion of a step from a flowlink_create: Creation of a new link between stepslink_update: Update to an existing link between stepslink_delete: Deletion of a link between stepsflow_create: Creation of a new flowflow_update: Update to an existing flowflow_delete: Deletion of a flowflow_move: Moving a flow between environmentsflow_duplicate: Duplicating a flowflow-deployment_mode: A flow deployment switched between Test and Liveimport_export: Importing entities into the systemai_generate_flow_description: AI generation of a playbook descriptionai_generate_flow: AI generation of a flowrevert: Reverting a changelog action
Category: permission
create_completed: Permission was successfully createdcreate_failed: Failed to create permissionupdate_completed: Permission was successfully updatedupdate_failed: Failed to update permissiondelete_completed: Permission was successfully deleteddelete_failed: Failed to delete permission
Category: credential
create_completed: Credential was successfully createdcreate_failed: Failed to create credentialupdate_completed: Credential was successfully updatedupdate_failed: Failed to update credentialdelete_completed: Credential was successfully deleteddelete_failed: Failed to delete credentialupdate_value_completed: Credential value was successfully updatedupdate_value_failed: Failed to update credential valueget_completed: Credential value was successfully accessed/decryptedget_failed: Failed to access credential value
Category: environment
create_completed: Environment was successfully createdcreate_failed: Failed to create environmentupdate_completed: Environment was successfully updatedupdate_failed: Failed to update environmentdelete_completed: Environment was successfully deleteddelete_failed: Failed to delete environment
Category: mcp
invocation_completed: An MCP JSON-RPC request completed successfullyinvocation_failed: An MCP JSON-RPC request failed with an error
Category: team
create_completed: Team was successfully createdcreate_failed: Failed to create teamupdate_completed: Team was successfully updatedupdate_failed: Failed to update teamdelete_completed: Team was successfully deleteddelete_failed: Failed to delete team
Category: organization
create_completed: Organization was successfully createdcreate_failed: Failed to create organizationupdate_completed: Organization was successfully updatedupdate_failed: Failed to update organizationdelete_completed: Organization was successfully deleteddelete_failed: Failed to delete organization
Category: database
create_completed: Database was successfully createdcreate_failed: Failed to create databaseupdate_completed: Database was successfully updatedupdate_failed: Failed to update databasedelete_completed: Database was successfully deleteddelete_failed: Failed to delete databaseitem_create_completed: Database item was successfully createditem_create_failed: Failed to create database itemitem_update_completed: Database item was successfully updateditem_update_failed: Failed to update database itemitem_delete_completed: Database item was successfully deleteditem_delete_failed: Failed to delete database item
Category: signup-email-domain
add_completed: An email domain was allowed to sign upremove_completed: An email domain was removed from the signup list
Category: authentication
sign_up_accepted: Mindflow accepted a sign-up request (email and password, SSO first sign-in, admin invitation, or magic link); the account is created right aftersign_up_failed: Mindflow rejected a sign-up request;metadata.reasongives the rejection reasonsign_up_confirmation_completed: An account was confirmed (email verification code, admin confirmation, SSO first sign-in, or magic link)sign_in_completed: A user signed in and received new tokens; token refreshes are not loggedsign_in_failed: A user passed their identity check but Mindflow could not complete the sign-in; wrong passwords are not loggedpassword_reset_completed: A user set a new password through the forgot-password flow
The exact date and time when the audited event occurred, recorded in ISO 8601 format (YYYY-MM-DDThh:mm:ss.sssZ). This timestamp is set at the moment the event is logged and is used for chronological ordering and time-based queries.
Time when this audit record was stored, as ISO 8601 UTC. Use timestamp for when the action happened. Use expiresAt for when the record is deleted under retention.
Time when this audit record is automatically deleted, as ISO 8601 UTC. After this instant list and get calls do not include it. Retention uses this field.
Additional context-specific information about the audit event. This flexible object can contain any relevant data that provides more details about the event, such as user information, resource identifiers, or specific parameters of the action. The structure of this object varies depending on the category and type of the audit log.
object
Exported event data when the list request used include=data. Omitted otherwise. Shape varies by event type;
large values appear as download-url links rather than inline content.
object
object
Opaque token for the next page. Send it unchanged as cursor. Null when there are no further items.
The token can be longer than this example and is not a stable document format.
Example
{ "auditLogs": [ { "auditLogId": "AUDI-33090c4f-a7b9-48e0-8a2c-79b79d91dff9", "category": "flow", "type": "step_update", "timestamp": "2025-05-12T14:20:31.702Z", "createdAt": "2025-05-12T14:20:31.800Z", "expiresAt": "2025-05-19T14:20:31.959Z", "metadata": { "stepName": "Run script", "stepId": "STEP-1d03452e-b664-4d30-96b4-6fe90096ef41", "flowId": "PLAY-17a64601-40bb-4304-90f8-08ebf6ae3c19", "principalInfo": { "name": "Example User", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36", "id": "USER-c3545882-60b1-709d-1806-d53d80bfaa22", "type": "user", "email": "john.doe@example.com", "ip": "246.157.181.77" }, "flowName": "Exporting logs" } } ], "pagination": { "nextCursor": "eyJvZmZzZXQiOjEwMH0=" }}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.
The request was invalid. Common causes include:
- Invalid timestamp format.
- Using
cursorwithbeforeorafter. - Missing
limitwhen usingbeforeorafter. - Invalid field names in the
fieldsparameter.
See the error response for specific details about what went wrong.
object
URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.
Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).
HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).
Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).
URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).
Always BAD_REQUEST on this response. Read detail for which value to change, then send a corrected request.
Example
{ "type": "about:blank", "title": "Bad Request", "status": 400, "detail": "The request body or query is invalid.", "code": "BAD_REQUEST"}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.
Authentication failed. The request lacks valid credentials or the provided credentials are invalid.
Ensure you have:
- A valid API key or token.
- Proper authentication headers.
- Required permissions.
object
URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.
Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).
HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).
Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).
URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).
Always MISSING_OR_INVALID_TOKEN on this response. Branch on this value, not on detail.
Example
{ "type": "about:blank", "title": "Unauthorized", "status": 401, "detail": "The bearer token is missing or invalid.", "code": "MISSING_OR_INVALID_TOKEN"}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.
Forbidden. The server understood the request but refuses to authorize it.
For connector APIs, this often indicates insufficient permissions on the remote system (for example SFTP write access denied).
object
URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.
Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).
HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).
Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).
URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).
Always FORBIDDEN on this response. The token was accepted and the action is not allowed.
Example
{ "type": "about:blank", "title": "Forbidden", "status": 403, "detail": "You cannot perform this action.", "code": "FORBIDDEN"}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.
Too many requests. The request rate limit has been exceeded.
Please wait until the rate limit window resets before making additional requests.
object
URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.
Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).
HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).
Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).
URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).
Always RATE_LIMIT_EXCEEDED on this response. Wait Retry-After seconds before retrying.
Example
{ "type": "about:blank", "title": "Too Many Requests", "status": 429, "detail": "The request rate limit has been exceeded.", "code": "RATE_LIMIT_EXCEEDED"}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.
Internal server error. The server encountered an unexpected condition that prevented it from fulfilling the request.
Please try again later or contact support if the problem persists.
object
URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.
Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).
HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).
Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).
URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).
Always INTERNAL_ERROR on this response. Retry later. Do not retry a create in a tight loop.
Example
{ "type": "about:blank", "title": "Internal Server Error", "status": 500, "detail": "The request could not be completed.", "code": "INTERNAL_ERROR"}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.