Test Flows and Read Runs

Test a flow before you switch it on, then watch what it does. Every run, live or test, is kept in run history step by step: what each step did, what it returned, and why a run failed.

Test a Flow

Runs a saved flow once, straight away, and answers with every step. It works on a paused flow. Test runs do not count toward your monthly flow runs. Scope flows:write.

POST/v2.0/flows/{flowId}/test

Test Body

ParameterTypeDescription
modestringdry: a practice run. Steps that send, write or charge are only pretended. test: a real run. Everything the steps do is done: messages go outDefault: dry
inputobjectWhat the trigger would bring in. ai_tool flows: the inputs by key. Event flows: the event's fields. Webhook flows: { body: { ... } }. Payment flows: the payment fields
phonestringRun as this customer: their number with country code (919876543210), so {{ contact.* }} is filled. Anything but digits is removed
platformstringThe customer's channel: whatsapp, instagram or messengerDefault: whatsapp
StepPractice run (dry)Real run (test)
Send a message, Update the customer, Update the chatPretendedDone
Razorpay and Cashfree payment linksPretendedCreated
Google Sheets: add or update a rowPretendedDone
Google Sheets: find or read rowsDoneDone
Google Calendar: book, move or cancelPretendedDone
Google Calendar: check free times, find appointmentsDoneDone
Call an APIGET is done; other methods are pretendedDone
If / else, Choose a path, Save a value, Reply to the AIDoneDone
WaitSkipped: the run carries straight onSkipped: the run carries straight on
curl -X POST "https://api.sendiee.com/v2.0/flows/6741a2b39d2b4e0011ac1101/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": { "category": "Hot", "previousCategory": "Warm" },
    "phone": "919876543210"
  }'
{
  "success": true,
  "data": {
    "mode": "dry",
    "status": "success",
    "runId": "6741c5d29d2b4e0011ac3301",
    "output": {
      "simulated": true,
      "to": "919800000000",
      "from": "917012345678",
      "kind": "template",
      "templateName": "hot_lead_alert",
      "bodyParameters": [
        "Meera Nair",
        "919876543210"
      ]
    },
    "error": null,
    "steps": [
      {
        "id": "alert",
        "type": "send_message",
        "label": "Tell the owner",
        "status": "simulated",
        "branch": null,
        "error": null,
        "output": {
          "simulated": true,
          "to": "919800000000",
          "from": "917012345678",
          "kind": "template",
          "templateName": "hot_lead_alert",
          "bodyParameters": [
            "Meera Nair",
            "919876543210"
          ]
        }
      }
    ],
    "note": "Practice run: messages, sheet and calendar changes and payment links were simulated, not made."
  }
}

Test Result

ParameterTypeDescription
modestringdry or test
statusstringsuccess, failed or timeout
runIdstringThe run in run history
outputanyWhat the flow handed back: the Reply to the AI step's { message, data }, or the last step's result
errorstring | nullWhy the run failed
stepsarray[{ id, type, label, status, branch, error, output }] in the order they ran. branch is the path an If / else or Choose a path step took
notestringSays whether anything was really done

A failed step stops the run, unless it has continueOnError: true:

  • Test runs are limited to 60 an hour per account, shared with the assistant test chat in the dashboard. Over the limit the answer is 429 RATE_LIMIT.
  • A test run is not part of a chat. {{ contact.* }} is filled from phone, but there is no number the customer wrote to and no inbox chat. Set from on WhatsApp message steps for a test run. An Update the chat step is pretended in a practice run and fails in a test run.
  • A test run may take up to 120 seconds. The call answers when it ends.
  • A missing flow answers 404 NOT_FOUND.

List Runs

Recent runs of all your flows, or of one, newest first. Scope flows:read.

GET/v2.0/flows/runs

Query Parameters

ParameterTypeDescription
flowIdstringOnly this flow's runs. Not a valid id: 400 BAD_FLOW_ID
statusstringOnly runs with this status, such as failed
modestringlive, test or dry
pagenumberPage numberDefault: 1
limitnumber1 to 50 runs a pageDefault: 20
# Failed live runs of one flow
curl "https://api.sendiee.com/v2.0/flows/runs?flowId=6741a2b39d2b4e0011ac1102&status=failed&mode=live" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "success": true,
  "data": [
    {
      "runId": "6741c5d29d2b4e0011ac3310",
      "flowId": "6741a2b39d2b4e0011ac1102",
      "flowName": "Book a store visit",
      "status": "failed",
      "mode": "live",
      "startedBy": "ai",
      "error": "Could not understand the time \"after lunch\". Use 10:00 or 10 AM.",
      "createdAt": "2026-11-30T04:58:19.000Z",
      "durationMs": 412
    },
    {
      "runId": "6741c5d29d2b4e0011ac3309",
      "flowId": "6741a2b39d2b4e0011ac1101",
      "flowName": "Hot lead alert",
      "status": "success",
      "mode": "live",
      "startedBy": "event",
      "error": null,
      "createdAt": "2026-11-30T04:41:02.000Z",
      "durationMs": 918
    }
  ],
  "pagination": {
    "total": 2,
    "page": 1,
    "limit": 20,
    "keptForDays": 15
  }
}

Run Row

ParameterTypeDescription
runIdstringThe run's id
flowId, flowNamestringThe flow, with its name when it ran
statusstringSee Run statuses below
modestringlive, test or dry
startedBystringWhat started it. See below
errorstring | nullWhy it failed
createdAtstring (ISO 8601)When it started
durationMsnumber | nullHow long it took. null while it runs or waits
pagination.keptForDaysnumberHow many days runs are kept

Try It — List Runs

Try it — API Playground

Get a Run, Step by Step

One run with every step it took: its status, the path it chose, its result and its error. Use it to see why a run failed and which step to fix. Scope flows:read.

GET/v2.0/flows/runs/{runId}
cURL
curl "https://api.sendiee.com/v2.0/flows/runs/6741c5d29d2b4e0011ac3312" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "success": true,
  "data": {
    "runId": "6741c5d29d2b4e0011ac3312",
    "flowId": "6741a2b39d2b4e0011ac1102",
    "flowName": "Book a store visit",
    "flowVersion": 5,
    "status": "success",
    "mode": "live",
    "startedBy": "ai",
    "error": null,
    "failedStepId": null,
    "output": {
      "message": "Booked Tue 1 Dec, 11:30 AM for Meera Nair. Confirm the time and share the store address.",
      "data": null
    },
    "createdAt": "2026-11-30T05:02:44.000Z",
    "durationMs": 2261,
    "steps": [
      {
        "id": "slot",
        "type": "google_calendar",
        "label": "Is that time free?",
        "status": "success",
        "branch": null,
        "error": null,
        "durationMs": 702,
        "output": {
          "timezone": "Asia/Kolkata",
          "requested": {
            "start": "2026-12-01T11:30:00+05:30",
            "end": "2026-12-01T12:15:00+05:30",
            "label": "Tue 1 Dec, 11:30 AM",
            "free": true,
            "conflicts": 0
          },
          "available": true,
          "slots": [
            {
              "start": "2026-12-01T12:15:00+05:30",
              "end": "2026-12-01T13:00:00+05:30",
              "label": "Tue 1 Dec, 12:15 PM",
              "date": "2026-12-01",
              "time": "12:15 PM",
              "weekday": "Tuesday"
            }
          ],
          "slotCount": 1,
          "busyCount": 2,
          "summary": "Tue 1 Dec, 11:30 AM is available."
        }
      },
      {
        "id": "is_free",
        "type": "condition",
        "label": "Free?",
        "status": "success",
        "branch": "yes",
        "error": null,
        "durationMs": 1,
        "output": {
          "result": true,
          "matched": [
            0
          ]
        }
      },
      {
        "id": "book",
        "type": "google_calendar",
        "label": "Book the visit",
        "status": "success",
        "branch": null,
        "error": null,
        "durationMs": 1288,
        "output": {
          "booked": true,
          "eventId": "4k2m9q7r1t3v5x8z0b6d",
          "htmlLink": "https://www.google.com/calendar/event?eid=NGsybTlxN3IxdDN2NXg4ejBiNmQ",
          "meetLink": null,
          "start": "2026-12-01T11:30:00+05:30",
          "end": "2026-12-01T12:15:00+05:30",
          "label": "Tue 1 Dec, 11:30 AM",
          "title": "Store visit: Meera Nair",
          "timezone": "Asia/Kolkata"
        }
      },
      {
        "id": "tag_visit",
        "type": "update_contact",
        "label": "Tag the customer",
        "status": "success",
        "branch": null,
        "error": null,
        "durationMs": 214,
        "output": {
          "updated": true,
          "contactId": "6722e1f09d2b4e0011ab8801",
          "fields": {},
          "addedTags": [
            "Store visit"
          ],
          "removedTags": []
        }
      },
      {
        "id": "booked",
        "type": "return",
        "label": "Tell the AI",
        "status": "success",
        "branch": null,
        "error": null,
        "durationMs": 1,
        "output": {
          "message": "Booked Tue 1 Dec, 11:30 AM for Meera Nair. Confirm the time and share the store address.",
          "data": null
        }
      }
    ]
  }
}

Run Object

ParameterTypeDescription
runId, flowId, flowName, status, mode, startedBy, error, createdAt, durationMsvariousAs in the list
flowVersionnumberThe flow version the run used
failedStepIdstring | nullThe id of the step that failed
outputanyWhat the flow handed back
stepsarray[{ id, type, label, status, branch, error, output, durationMs }] in the order they ran

Values that look like credentials are shown as ••••••, and very long values are cut short. A run that is older than the history keeps, or not on your account, answers 404 RUN_NOT_FOUND.

Run statuses

StatusMeaning
queuedWaiting for a worker to start it
runningRunning now
waitingStopped at a Wait step. It carries on by itself
resumingThe customer replied or the time came, and it is about to carry on
successFinished
failedA step failed. error and failedStepId say which and why
cancelledThe flow was switched off while the run was waiting
timeoutThe run took longer than it was allowed

Step statuses

StatusMeaning
successThe step ran
simulatedPractice run: the step would have sent, written or charged, and did not. Also every Wait in a test or practice run
failedThe step failed. error says why
skippedThe step is switched off (enabled: false)
waitingThe run is stopped at this Wait step

Modes

  • live: a real run started by the flow’s trigger, or a rerun of one. It counts toward your monthly flow runs.
  • test: a real run started as a test. Not counted.
  • dry: a practice run. Nothing was sent, written or charged. Not counted.

startedBy

ValueStarted by
aiAn AI assistant called the flow in a live chat
previewThe assistant test chat in the dashboard (a practice run)
eventA Sendiee event
webhookA request to the flow's web address
paymentA Razorpay or Cashfree report
scheduleIts schedule
testA test or practice run from the API, the MCP server or the flow editor
step_testOne step tested on its own in the flow editor
rerunA past run started again from run history in the dashboard

How long runs are kept

Runs are kept for 15 days by default. pagination.keptForDays in List Runs gives the number for your account. A run that stops at a Wait step is kept until its wait ends, plus the same number of days. Deleting a flow does not delete its runs; they expire on their own.