Skip to main content
POST
/
export_data
Export data
curl --request POST \
  --url https://api.gumloop.com/api/v1/export_data \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "user_id": "<string>",
  "export_fields": [
    "<string>"
  ],
  "start_date": "2023-11-07T05:31:56Z",
  "end_date": "2023-11-07T05:31:56Z",
  "data_type": "workflows",
  "category_filter": "<string>",
  "export_level": "organization",
  "include_all_workspaces": false,
  "include_personal_workspaces": false,
  "workspace_ids": [
    "<string>"
  ],
  "entity_ids": [
    "<string>"
  ]
}
'
{
  "success": true,
  "data_export_id": "<string>",
  "state": "REQUESTED",
  "created_ts": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
user_id
string
required

The ID of the user requesting the export.

export_fields
string[]
required

Array of fields to include in the export. The available fields depend on the data_type.

Workflow fields (when data_type is "workflows"):

  • workbook_id - The workbook identifier
  • workbook_name - The workbook name
  • workbook_created_ts - Workbook creation timestamp
  • user_id - The user identifier
  • user_email - The user's email address
  • workspace_id - The workspace identifier
  • workspace_name - The workspace name
  • run_id - The flow run identifier
  • credit_cost - Credits consumed by the run
  • pl_run_created_ts - Flow run creation timestamp
  • pl_run_finished_ts - Flow run completion timestamp
  • pipeline - The full pipeline configuration (JSON)

Agent fields (when data_type is "agents"):

  • agent_id - The agent identifier
  • agent_name - The agent name
  • agent_description - The agent description
  • agent_model - The model used by the agent
  • agent_system_prompt - The agent's system prompt
  • agent_created_ts - Agent creation timestamp
  • agent_tools - Tools configured for the agent (JSON)
  • agent_metadata - Additional agent metadata (JSON)
  • creator_email - Email of the user who created the agent
  • workspace_id - The workspace identifier
  • workspace_name - The workspace name

Credit log fields (when data_type is "credit_logs"):

  • user_email - Email of the user associated with the credit log entry
  • timestamp - When the credit transaction occurred
  • category - The category of the credit log (e.g., PIPELINE_RUN, AGENT_RUN)
  • type - The specific type of credit charge
  • name - Display name of the credit log entry
  • amount - Number of credits charged or adjusted
  • balance - Credit balance after the transaction
  • log_id - Unique identifier for the credit log entry
  • project_id - The project identifier (disabled by default)

Not all combinations of selected fields are guaranteed to produce data for every row.

start_date
string<date-time>
required

Start date for the export in ISO 8601 format (e.g., 2025-01-01T00:00:00Z).

end_date
string<date-time>
required

End date for the export in ISO 8601 format (e.g., 2025-12-31T23:59:59Z).

data_type
enum<string>
default:workflows

The type of data to export. Use "workflows" to export workflow run data, "agents" to export agent configuration data, or "credit_logs" to export credit transaction history. Defaults to "workflows".

Available options:
workflows,
agents,
credit_logs
category_filter
string

Only applicable when data_type is "credit_logs". Optional filter to export only credit logs matching a specific category (e.g., "PIPELINE_RUN", "AGENT_RUN", "CUSTOM_NODE_RD", "EXTERNAL_GUMCP_CALL"). When omitted, all categories are included.

export_level
enum<string>
default:organization

The scope of the export. Use "organization" to export across the entire organization, or "workspace" to export from a single workspace (requires exactly one ID in workspace_ids). Defaults to "organization". Not applicable when data_type is "credit_logs".

Available options:
workspace,
organization
include_all_workspaces
boolean
default:false

Whether to include all workspaces in the organization. When true, also sets include_personal_workspaces to true. Not applicable when data_type is "credit_logs".

include_personal_workspaces
boolean
default:false

Whether to include personal workspaces in the export. Ignored if include_all_workspaces is true. Not applicable when data_type is "credit_logs".

workspace_ids
string[]

An optional array of workspace IDs to include in the export. When export_level is "workspace", exactly one workspace ID is required. Ignored if include_all_workspaces is true. Not applicable when data_type is "credit_logs".

entity_ids
string[]

An optional array of specific entity IDs to filter the export. For workflow exports (data_type: "workflows"), these are workbook IDs. For agent exports (data_type: "agents"), these are agent IDs. When provided, only data for the specified entities will be included. Not applicable when data_type is "credit_logs".

Response

Data export successfully initiated

success
boolean

Indicates whether the export was successfully initiated.

data_export_id
string

Unique identifier for the data export job. Use this with the Get export status endpoint to check progress and download the completed export.

state
enum<string>

The initial state of the export job. Will be REQUESTED upon creation.

Available options:
REQUESTED
created_ts
string<date-time>

Timestamp when the export was created (ISO 8601).