We tried our best, but there was an error processing your request. If this keeps happening, please refresh your browser or contact support.
Runs Endpoint

This endpoint allows you to fetch flow runs. A run represents a single contact's path through a flow and is created each time a contact is started in a flow.

Listing Flow Runs

A GET request returns the flow runs for your organization, filtering them as needed. Each run has the following attributes:

  • uuid - the ID of the run (string), filterable as uuid.
  • flow - the UUID and name of the flow (object), filterable as flow with UUID.
  • contact - the UUID and name of the contact (object), filterable as contact with UUID.
  • start - the UUID of the flow start (object).
  • responded - whether the contact responded (boolean), filterable as responded.
  • values - values generated by rulesets in the flow (array of objects).
  • created_on - the datetime when this run was started (datetime).
  • modified_on - when this run was last modified (datetime), filterable as before and after.
  • exited_on - the datetime when this run exited or null if it is still active (datetime).
  • exit_type - how the run ended, one of interrupted, completed, expired.

Note that you cannot filter by flow and contact at the same time.

Example:

GET /api/v2/runs.json?flow=f5901b62-ba76-4003-9c62-72fdacc1b7b7

Response is the list of runs on the flow, most recently modified first:

{
    "next": "http://example.com/api/v2/runs.json?cursor=cD0yMDE1LTExLTExKzExJTNBM40NjQlMkIwMCUzRv",
    "previous": null,
    "results": [
    {
        "id": 12345678,
        "flow": {"uuid": "f5901b62-ba76-4003-9c62-72fdacc1b7b7", "name": "Favorite Color"},
        "contact": {
            "uuid": "d33e9ad5-5c35-414c-abd4-e7451c69ff1d",
            "urn": "tel:+12065551212",
            "name": "Bob McFlow"
        },
        "responded": true,
        "values": {
            "color": {
                "value": "blue",
                "category": "Blue",
                "node": "fc32aeb0-ac3e-42a8-9ea7-10248fdf52a1",
                "time": "2015-11-11T13:03:51.635662Z",
                "name": "color",
                "input": "it is blue",
            },
            "reason": {
                "value": "Because it's the color of sky",
                "category": "All Responses",
                "node": "4c9cb68d-474f-4b9a-b65e-c2aa593a3466",
                "time": "2015-11-11T13:05:57.576056Z",
                "name": "reason",
                "input" "Because it's the color of sky",
            }
        },
        "created_on": "2015-11-11T13:05:57.457742Z",
        "modified_on": "2015-11-11T13:05:57.576056Z",
        "exited_on": "2015-11-11T13:05:57.576056Z",
        "exit_type": "completed"
    },
    ...
}