1. Workflow Builder
Returning.AI
  • Getting Started
  • Users
    • User directory and provisioning
    • Get Users with Filters
    • Create New User
    • Get User Data
    • Manage User Account
    • Get User Milestones
    • Update User Data, Identifier, And Roles
    • Update User XP and Currency
  • Messaging
    • Agent messaging workflow
    • Get Messages
    • Send Message
    • Reply Message
    • React Message
    • Upload message images
  • Gamification
    • Leaderboards
      • Leaderboards
      • List leaderboards with pagination
      • Create a new leaderboard
      • Update an existing leaderboard
      • Get a single leaderboard by ID
      • Delete a leaderboard
    • Streaks & Mini Games
      • Mini-game State and History
      • List user streak logs
      • List mini-game logs by user email
      • Get current mini-game and streak state
      • Update user spin-wheel information
    • Referral
      • Referral Program Integration
      • Get referral programs
      • Get user's referral summary
    • Rolling Data
    • Match Predictions
      • Create match prediction
      • List match predictions
      • Get match prediction
      • Patch match prediction
      • Publish match prediction
      • Settle match prediction
      • Get settlement results
      • Void match prediction
      • Bulk update match predictions
      • Get bulk job status
      • Get bulk job results
    • Loyalty Points
      • Create loyalty points export
      • Get loyalty points export status
      • Get loyalty points export download link
    • Get tier configuration
    • Get daily user XP and coin changes
    • Search user gamification logs
    • Get user activity stats
  • Rewards & Redemptions
    • Store catalog to redemptions
    • List redemption orders by custom-field identifier
    • Update redemption order status or refund
    • Create redemption order status
    • List redemption orders by user email
    • List redemption statuses
    • Get redemption status by ID
    • List redemption orders by community
    • Get redemption order status history
  • Chart Analysis
    • Create Analysis
    • Get Analysis
    • Update Analysis
    • Delete Analysis
    • List Analyses
    • Append Drawings
  • Bulk Operations
    • Bulk user updates
    • List bulk update jobs
    • Get bulk update job status
    • Get bulk update job details
    • Bulk update users from CSV
    • Bulk update premium currency from CSV
  • Channels
    • Iframe
    • List integration channels
  • Events
    • Outgoing webhooks
      • Encryption
      • User Joins Server
      • User Visits server
      • New Message Posted Anywhere
      • New Message Posted To channel
      • Purchased Store Item
    • Incoming webhooks
      • API Keys & Encryption
      • Send message into channels
      • Update Custom User Fields
      • Update In-game currency
  • Widgets
    • Authenticated Widgets
    • Public widgets
    • Channels
    • Leaderboard
    • Milestone
    • Socials
    • Store
  • Store
    • Store catalog
    • Purchase History
      • Archive or restore an order
      • Update redemption instructions or voucher details
    • Categories
      • List Store categories
      • Create Store category
      • Get Store category by ID
      • Update Store category
      • Delete Store category
    • Products
      • List products
      • Update products in bulk
      • Create products in bulk
      • Create product with vouchers
      • Read product
      • Update product and append vouchers
      • Delete product
    • Redemption-transaction
      • Get redemption transaction detail
    • Get Store configuration
    • Update Store configuration
  • Community Analytics
    • Get Loyalty Overview
    • Get Phone Verification Contacts
  • Community
    • Community directory and appearance
    • Appearance
      • Update community theme colors
      • Update community bot profile
      • Update community URL metadata
      • Update community name and URL
    • Community Users
      • Get community users
      • Get user
    • Create community
  • API Keys
    • API key lifecycle
    • Community API Keys
      • Create API key
      • Read API keys
      • Delete API key
      • Update API key
    • User API Keys
      • List user API keys
      • Create user API key
      • Update user API key
      • Delete user API key
      • Get current API key information
  • User Fields
    • User field definitions and history
    • User Field History
      • Get all user field histories in a community
      • Get user field histories for a specific field
      • Get user field histories for a specific user
      • Get user field histories of specific user field and user
      • Update A User Field Value
      • Deprecated Field-First History Write
      • Deprecated Field-First History Read
    • Get A User Field Definition
    • Update A User Field Definition
    • Create A User Field Definition
    • Delete A User Field Definition
    • List User Field Definitions
  • Legacy
    • Servers
      • Create server
      • List servers
      • Update server metadata
    • Bulk Operations
      • Bulk import users from CSV
    • Authentication
      • Secure Auth
      • Register user with password
      • Verify user email
      • Log in user with password
    • Badges
      • List badges
      • Create badge
      • Update badge
      • Delete badge
      • Remove badge from user
      • Award badge to user
    • Messaging
    • Roles & Permissions
      • List server roles
      • Create role
      • Update role
      • Delete role
      • List user roles
      • Add role to user
      • Remove role from user
    • Users
      • Get user
      • Upload user avatar
    • Channels
      • Create channel
      • Update channel
      • Delete channel
    • API Keys
      • List integration API keys
      • Create integration API key
      • Delete integration API key
      • Update integration API key
  • Data Workflows
    • Read event-ingest lifecycle status by trigger and batch ID.
  • Community Logs
    • Retrieve and export community logs
  • Workflow Builder
    • Workflow Builder API overview
    • Connect an AI agent to the Workflow Builder tools
    • Bind step inputs to trigger and earlier-step outputs
    • Code steps through the API
    • Edit safely: revisions, conflicts, export, import and copying a workflow
    • Set up an event-ingest workflow and check batch status
    • Keep a member's tier or role in sync
    • Reversible rewards
    • Test without side effects, then confirm a live run
    • Build a trading-rewards workflow from event ingest
    • Reward members from your own system with a webhook workflow
    • List step types and trigger types
      GET
    • List workflows
      GET
    • Create a workflow
      POST
    • Get a workflow
      GET
    • Rename a workflow or set its failure webhook
      PATCH
    • Delete a workflow
      DELETE
    • Duplicate a workflow
      POST
    • Export a workflow definition
      GET
    • Validate a stored workflow
      POST
    • Create or replace the trigger
      PUT
    • Add a step
      POST
    • Get a step
      GET
    • Update a step
      PATCH
    • Delete a step
      DELETE
    • Reorder a main-line step
      POST
    • Duplicate a step
      POST
    • Add a router branch
      POST
    • Update a router branch
      PATCH
    • Delete a router branch
      DELETE
    • Duplicate a router branch
      POST
    • Test one step
      POST
    • Test a whole workflow
      POST
    • Deploy a workflow
      POST
    • Undeploy a workflow
      POST
    • List the runs of a workflow
      GET
    • Get one run
      GET
    • Retry a failed run
      POST
    • Call the workflow tools over MCP
      POST
  • Schemas
    • Sample Schemas
    • Schemas
    • Outgoing webhooks
    • Analysis
    • Pet
    • Category
    • Tag
    • ValidationError
    • NotFoundError
    • InternalServerError
    • NotImplementedError
    • CreateUserFieldHistoryResponse
    • CreateUserFieldHistorySuccessResponse
    • UserFieldHistoryItem
    • GetUserFieldHistoriesResponse
    • UserFieldHistoriesValidationError
    • UserFieldHistoriesMetaWithValidation
    • UserFieldHistoriesMetaWithPagination
    • GetUserFieldHistoriesSuccessResponse
    • CreateUserFieldResponse
    • CreateUserFieldSuccessResponse
    • DeleteUserFieldResponse
    • DeleteUserFieldSuccessResponse
    • UserFieldCreator
    • GetUserFieldResponse
    • GetUserFieldSuccessResponse
    • ValidationErrorItem
    • GetUserFieldsMetaResponse
    • CreatorInfo
    • UserFieldResponse
    • GetUserFieldsSuccessResponse
    • UpdateUserFieldResponse
    • UpdateUserFieldPayload
    • UpdateUserFieldSuccessResponse
    • MetaResponse
    • GetUserResponse
    • GetUserSuccessResponse
    • Purchased store item
    • ErrorResponse
    • New message posted to channel
    • UpdateAnalysisRequest
    • User visits server
    • AppendDrawingsRequest
    • User join server
    • CreateAnalysisResponse
    • GetAnalysisResponse
    • UpdateAnalysisResponse
    • AppendDrawingsResponse
    • AnalysisMetadata
    • Expiry
    • Levels
    • LevelEntry
    • Drawing
    • HorizontalLineDrawing
    • LineDrawing
    • RectangleDrawing
    • ParallelDrawing
    • FibonacciRetracementDrawing
    • Coordinate
    • DrawingStyle
    • AnalysisDetail
    • AnalysisSummary
    • CreateAnalysisRequest
    • ListAnalysesResponse
    • StandardApiError
    • StandardSuccessEnvelope
    • PurchasedStoreItemEvent
    • ChannelMessagePostedEvent
    • UserVisitedCommunityEvent
    • UserJoinedCommunityEvent
  1. Workflow Builder

List the runs of a workflow

GET
/v1/workflow-builder/data-workflows/{workflowId}/runs
GET /{workflowId}/runs needs workflowBuilder.

What this endpoint does#

Lists the runs of one workflow, newest first, with an optional status filter and paging. A run is one execution of the workflow, whether it was started by a trigger or by a live test.
The list carries no step results, so it never carries member data. Read one run with GET /runs/{runId} for the per-step results.

Quick start#

Authentication and permission#

Authorization: Bearer <API_KEY> with workflowBuilder, on a workflow of the key's community. Runs are scoped to the workflow and to the community, so this route cannot be used to read another community's runs.
FailureMeaningRecovery
403 API_KEY_PERMISSION_DENIEDNo workflowBuilderGrant the permission.
404 WORKFLOW_NOT_FOUNDUnknown id, or another community's workflowUse an id from this community.

Complete examples#

A populated page:
{
  "data": [
    {
      "_id": "65f1a2b3c4d5e6f708192a40",
      "workflowId": "65f1a2b3c4d5e6f708192a3b",
      "communityId": "65f1a2b3c4d5e6f708192a50",
      "status": "success",
      "startTime": "2026-10-24T10:02:14.000Z",
      "endTime": "2026-10-24T10:02:19.000Z",
      "createdAt": "2026-10-24T10:02:13.000Z",
      "updatedAt": "2026-10-24T10:02:19.000Z"
    },
    {
      "_id": "65f1a2b3c4d5e6f708192a45",
      "workflowId": "65f1a2b3c4d5e6f708192a3b",
      "communityId": "65f1a2b3c4d5e6f708192a50",
      "status": "error",
      "startTime": "2026-10-24T09:44:02.000Z",
      "endTime": "2026-10-24T09:44:05.000Z",
      "createdAt": "2026-10-24T09:44:01.000Z",
      "updatedAt": "2026-10-24T09:44:05.000Z"
    }
  ],
  "meta": { "page": 1, "limit": 20, "total": 2, "totalPages": 1 }
}
A workflow that has never run returns an empty page with 200, not an error:
{
  "data": [],
  "meta": { "page": 1, "limit": 20, "total": 0, "totalPages": 0 }
}

Success and readback#

HTTP 200 with data (an array of run summaries) and meta (page, limit, total, totalPages).
status is one of success, error, running, queued or unknown. startTime and endTime are present when the run reached those points. The list is the readback that proves a deploy, a live test or a retried run actually executed.
Paging is by page number, ordered newest first, with the identifier as a tie-break. totalPages is 0 when there are no runs.

Errors and recovery#

Status and codeWhenRecovery
400 VALIDATION_FAILEDlimit above 100, a non-numeric page, or an unknown statusFix the query value.
401 AUTHENTICATION_REQUIREDNo key, or an unknown keySend a valid key.
403 API_KEY_PERMISSION_DENIEDNo workflowBuilderGrant the permission.
404 WORKFLOW_NOT_FOUNDUnknown id, or another community's workflowUse an id from this community.
429 RATE_LIMITEDThe community's API rate limit was reachedWait for the window to reset, then retry.
500 INTERNAL_ERRORUnexpected failureRetry with bounded backoff.

Retry safety#

Safe to retry: it writes nothing. A run can finish between two calls, so a retry can show a run moving from running to success in place. Treat a page as a snapshot and poll for a specific run id rather than comparing whole pages.

Gotchas#

A run's status is the workflow's outcome, not the outcome of every step. A workflow can be success while a step was skipped, and an error run can still have applied some steps. Read the run detail for the step results.
running and queued are transient. Poll with a bounded interval instead of a fixed sleep.
The list has no step results, no member identifiers and no trigger payload. Those arrive with GET /runs/{runId}, redacted.
A run created by a live whole-workflow test is removed after the test, so it does not appear here.
A previously deleted workflow takes its runs with it: this route then answers 404.

Next steps#

GET /runs/{runId} for the per-step results of one run.
POST /runs/{runId}/retry for a failed run.
GET /{workflowId} to check the configuration the run used.

Request

Path Params

Query Params

Header Params

Responses

🟢200200 Success
application/json
One page of runs, newest first.
Bodyapplication/json

🟠400400 VALIDATION_FAILED
🟠401401 AUTHENTICATION_REQUIRED / API_KEY_REQUIRED
🟠403403 API_KEY_PERMISSION_DENIED
🟠404404 WORKFLOW_NOT_FOUND
🟠429429 RATE_LIMITED
🔴500500 INTERNAL_ERROR
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.returning.ai/v1/workflow-builder/data-workflows/65f1a2b3c4d5e6f708192a3b/runs?page=1&limit=20&status=success' \
--header 'Authorization: Bearer <API_KEY>'
Response Response Example
200 - 200 Success
{
  "data": [
    {
      "_id": "65f1a2b3c4d5e6f708192a40",
      "workflowId": "65f1a2b3c4d5e6f708192a3b",
      "communityId": "65f1a2b3c4d5e6f708192a50",
      "status": "success",
      "startTime": "2026-10-24T10:02:14.000Z",
      "endTime": "2026-10-24T10:02:19.000Z",
      "createdAt": "2026-10-24T10:02:13.000Z",
      "updatedAt": "2026-10-24T10:02:19.000Z"
    },
    {
      "_id": "65f1a2b3c4d5e6f708192a45",
      "workflowId": "65f1a2b3c4d5e6f708192a3b",
      "communityId": "65f1a2b3c4d5e6f708192a50",
      "status": "error",
      "startTime": "2026-10-24T09:44:02.000Z",
      "endTime": "2026-10-24T09:44:05.000Z",
      "createdAt": "2026-10-24T09:44:01.000Z",
      "updatedAt": "2026-10-24T09:44:05.000Z"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 20,
    "total": 2,
    "totalPages": 1
  }
}
Modified at 2026-10-28 04:53:02
Previous
Undeploy a workflow
Next
Get one run
Built with