Flows

The Flow is the primary unit of work in LeadConduit. When a lead is submitted to LeadConduit, the flow ID is specified and the lead is processed according to the instructions in that flow.

List all flows

Returns all the flows associated to an account

Responses
200

OK

401

Authorization information is missing or invalid.

get/flows
Request samples
curl -i -X GET \
  https://app.leadconduit.com/flows
Response samples
application/json
[
  • {
    • "id": "5fd4371e940df5a34a3888b2",
    • "name": "Web Leads",
    • "errors": { },
    • "enabled": true,
    • "fields": [
      • "first_name",
      • "last_name",
      • "email",
      • "phone_1",
      • "address_1",
      • "city",
      • "state",
      • "postal_code",
      • "trustedform_cert_url"
      ],
    • "caps": [
      • {
        • "id": "string",
        • "cap_ids": [
          • "string"
          ],
        • "caps": [
          • { }
          ],
        • "count": 0,
        • "duration": 1,
        • "duration_units": "month",
        • "expires_at": "2020-11-23T11:41:52Z",
        • "failed_count": 0,
        • "flow_id": "string",
        • "maximum": 1200,
        • "name": "Monthly leads from TX",
        • "source_id": "string",
        • "started_at": "2020-11-23T11:41:52Z",
        • "step_id": "string",
        • "time_zone": "America/New_York",
        • "type": "volume",
        • "updated_at": "2020-11-23T11:41:52Z"
        }
      ],
    • "acceptance_criteria": {
      • "rule_set": {
        • "id": "string",
        • "op": "and",
        • "rules": [
          • {
            • "id": "string",
            • "lhv": "lead.state",
            • "op": "is equal to",
            • "rhv": "TX",
            • "rule_set": { }
            }
          ]
        },
      • "outcome": "string",
      • "reason": "string"
      },
    • "pricing": {
      • "override": true,
      • "prices": [
        • {
          • "id": { },
          • "amount": 0,
          • "rule_set": {
            • "id": "string",
            • "op": "and",
            • "rules": [
              • {
                • "id": null,
                • "lhv": null,
                • "op": null,
                • "rhv": null,
                • "rule_set": null
                }
              ]
            }
          }
        ]
      },
    • "sources": [
      • {
        • "id": "string",
        • "integration": {
          • "module_id": "string",
          • "mappings": [
            • {
              • "id": "string",
              • "property": "string",
              • "value": "string",
              • "rule_set": {
                • "id": null,
                • "op": null,
                • "rules": [ ]
                }
              }
            ]
          },
        • "entity": {
          • "id": "5fd439f49734e9858b20cef9",
          • "name": "string",
          • "time_zone": "string"
          },
        • "acceptance_criteria": {
          • "rule_set": {
            • "id": "string",
            • "op": "and",
            • "rules": [
              • {
                • "id": null,
                • "lhv": null,
                • "op": null,
                • "rhv": null,
                • "rule_set": null
                }
              ]
            },
          • "outcome": "string",
          • "reason": "string"
          },
        • "feedback": {
          • "rule_set": {
            • "id": "string",
            • "op": "and",
            • "rules": [
              • {
                • "id": null,
                • "lhv": null,
                • "op": null,
                • "rhv": null,
                • "rule_set": null
                }
              ]
            },
          • "integration": {
            • "module_id": "string",
            • "mappings": [
              • {
                • "id": null,
                • "property": null,
                • "value": [ ],
                • "rule_set": null
                }
              ]
            }
          },
        • "caps": [
          • {
            • "id": "string",
            • "cap_ids": [
              • "string"
              ],
            • "caps": [
              • { }
              ],
            • "count": 0,
            • "duration": 1,
            • "duration_units": "month",
            • "expires_at": "2020-11-23T11:41:52Z",
            • "failed_count": 0,
            • "flow_id": "string",
            • "maximum": 1200,
            • "name": "Monthly leads from TX",
            • "source_id": "string",
            • "started_at": "2020-11-23T11:41:52Z",
            • "step_id": "string",
            • "time_zone": "America/New_York",
            • "type": "volume",
            • "updated_at": "2020-11-23T11:41:52Z"
            }
          ],
        • "credential_id": "5fd43a1e627715453aaafff1",
        • "pricing": {
          • "override": true,
          • "prices": [
            • {
              • "id": { },
              • "amount": 0,
              • "rule_set": {
                • "id": null,
                • "op": null,
                • "rules": [ ]
                }
              }
            ]
          },
        • "enabled": true
        }
      ],
    • "steps": [
      • {
        • "type": "filter",
        • "id": "string",
        • "description": "string",
        • "notes": "string",
        • "reason": "string",
        • "outcome": "string",
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          },
        • "enabled": true
        }
      ],
    • "ping_enabled": false,
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z",
    • "firehose": {
      • "credential_id": "5fd43a1e627715453aaafff1",
      • "bucket": "string",
      • "prefix": "string",
      • "enabled": true
      }
    }
]

Create a new flow

Create a new flow, adding it to the list of all flows in the account. The caller may specify an ID for a flow, provided it is a valid BSON ID

Request
Request Body schema: application/json

Create a new flow

name
required
string non-empty
enabled
required
boolean
fields
required
Array of strings
Array of objects or null (Caps) non-empty
object or null (AcceptanceCriteria)

Acceptance criteria specifies the kinds of leads that a source or sources must provide in a flow. Acceptance criteria can be configured at both a flow level and a source level. When a source submits a lead, the flow-level acceptance criteria's rule set is evaluated first, then any source-level acceptance criteria. If the rule sets pass, then the lead is allowed to progress on in the flow. But if either rule set fails, then the source is immediately given a response and no further processing takes place in the flow for that lead.

object (Pricing)

A pricing configuration determines the value of the purchase_price property on source events or the value of the sale_price property on recipient events. Consequently, it also determines the cost and revenue properties on source and recipient events. These properties can be reported on via the statistics API and the reporting API. If no pricing is configured, then the purchase_price and sale_price properties will be set to 0.

Pricing can be set on sources in a flow, the flow itself, or on any recipient step in a flow.

A pricing is primarily an array of prices. Each price is evaluated and the last price for which all rules match will determine the amount used for the purchase_price or sale_price. If no prices match for a particular lead, the price properties will be set to 0.

If you wish the source or recipient to specify the price, then override property on the pricing must be set to true. When override: true, the price properties on the associated event will be set to whatever amount is provided by the source or recipient. The prices array must be empty, null, or undefined if override: true.

required
Array of objects non-empty
required
Array of FilterStep (object) or RecipientStep (object)
ping_enabled
boolean
Default: false
created_at
string <date-time> (Timestamp)
updated_at
string <date-time> (Timestamp)
object
Responses
201

Created

post/flows
Request samples
application/json
{
  • "name": "Web Leads",
  • "enabled": true,
  • "fields": [
    • "first_name",
    • "last_name",
    • "email",
    • "phone_1",
    • "address_1",
    • "city",
    • "state",
    • "postal_code",
    • "trustedform_cert_url"
    ],
  • "caps": [
    • {
      • "cap_ids": [
        • "string"
        ],
      • "caps": [
        • { }
        ],
      • "count": 0,
      • "duration": 1,
      • "duration_units": "month",
      • "expires_at": "2020-11-23T11:41:52Z",
      • "failed_count": 0,
      • "maximum": 1200,
      • "name": "Monthly leads from TX",
      • "started_at": "2020-11-23T11:41:52Z",
      • "step_id": "string",
      • "time_zone": "America/New_York",
      • "type": "volume",
      • "updated_at": "2020-11-23T11:41:52Z"
      }
    ],
  • "acceptance_criteria": {
    • "rule_set": {
      • "id": "string",
      • "op": "and",
      • "rules": [
        • {
          • "id": "string",
          • "lhv": "lead.state",
          • "op": "is equal to",
          • "rhv": "TX",
          • "rule_set": { }
          }
        ]
      },
    • "outcome": "string",
    • "reason": "string"
    },
  • "pricing": {
    • "override": true,
    • "prices": [
      • {
        • "id": { },
        • "amount": 0,
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          }
        }
      ]
    },
  • "sources": [
    • {
      • "id": "string",
      • "integration": {
        • "module_id": "string",
        • "mappings": [
          • {
            • "id": "string",
            • "property": "string",
            • "value": "string",
            • "rule_set": {
              • "id": "string",
              • "op": "and",
              • "rules": [
                • null
                ]
              }
            }
          ]
        },
      • "entity": {
        • "time_zone": "string"
        },
      • "acceptance_criteria": {
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          },
        • "outcome": "string",
        • "reason": "string"
        },
      • "feedback": {
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          },
        • "integration": {
          • "module_id": "string",
          • "mappings": [
            • {
              • "id": "string",
              • "property": "string",
              • "value": "string",
              • "rule_set": {
                • "id": null,
                • "op": null,
                • "rules": [ ]
                }
              }
            ]
          }
        },
      • "caps": [
        • {
          • "cap_ids": [
            • "string"
            ],
          • "caps": [
            • { }
            ],
          • "count": 0,
          • "duration": 1,
          • "duration_units": "month",
          • "expires_at": "2020-11-23T11:41:52Z",
          • "failed_count": 0,
          • "maximum": 1200,
          • "name": "Monthly leads from TX",
          • "started_at": "2020-11-23T11:41:52Z",
          • "step_id": "string",
          • "time_zone": "America/New_York",
          • "type": "volume",
          • "updated_at": "2020-11-23T11:41:52Z"
          }
        ],
      • "pricing": {
        • "override": true,
        • "prices": [
          • {
            • "id": { },
            • "amount": 0,
            • "rule_set": {
              • "id": "string",
              • "op": "and",
              • "rules": [
                • null
                ]
              }
            }
          ]
        },
      • "enabled": true
      }
    ],
  • "steps": [
    • {
      • "type": "filter",
      • "id": "string",
      • "description": "string",
      • "notes": "string",
      • "reason": "string",
      • "outcome": "string",
      • "rule_set": {
        • "id": "string",
        • "op": "and",
        • "rules": [
          • {
            • "id": "string",
            • "lhv": "lead.state",
            • "op": "is equal to",
            • "rhv": "TX",
            • "rule_set": { }
            }
          ]
        },
      • "enabled": true
      }
    ],
  • "ping_enabled": false,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "firehose": {
    • "bucket": "string",
    • "prefix": "string",
    • "enabled": true
    }
}
Response samples
application/json
{
  • "id": "5fd4371e940df5a34a3888b2",
  • "name": "Web Leads",
  • "errors": { },
  • "enabled": true,
  • "fields": [
    • "first_name",
    • "last_name",
    • "email",
    • "phone_1",
    • "address_1",
    • "city",
    • "state",
    • "postal_code",
    • "trustedform_cert_url"
    ],
  • "caps": [
    • {
      • "id": "string",
      • "cap_ids": [
        • "string"
        ],
      • "caps": [
        • { }
        ],
      • "count": 0,
      • "duration": 1,
      • "duration_units": "month",
      • "expires_at": "2020-11-23T11:41:52Z",
      • "failed_count": 0,
      • "flow_id": "string",
      • "maximum": 1200,
      • "name": "Monthly leads from TX",
      • "source_id": "string",
      • "started_at": "2020-11-23T11:41:52Z",
      • "step_id": "string",
      • "time_zone": "America/New_York",
      • "type": "volume",
      • "updated_at": "2020-11-23T11:41:52Z"
      }
    ],
  • "acceptance_criteria": {
    • "rule_set": {
      • "id": "string",
      • "op": "and",
      • "rules": [
        • {
          • "id": "string",
          • "lhv": "lead.state",
          • "op": "is equal to",
          • "rhv": "TX",
          • "rule_set": { }
          }
        ]
      },
    • "outcome": "string",
    • "reason": "string"
    },
  • "pricing": {
    • "override": true,
    • "prices": [
      • {
        • "id": { },
        • "amount": 0,
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          }
        }
      ]
    },
  • "sources": [
    • {
      • "id": "string",
      • "integration": {
        • "module_id": "string",
        • "mappings": [
          • {
            • "id": "string",
            • "property": "string",
            • "value": "string",
            • "rule_set": {
              • "id": "string",
              • "op": "and",
              • "rules": [
                • null
                ]
              }
            }
          ]
        },
      • "entity": {
        • "id": "5fd439f49734e9858b20cef9",
        • "name": "string",
        • "time_zone": "string"
        },
      • "acceptance_criteria": {
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          },
        • "outcome": "string",
        • "reason": "string"
        },
      • "feedback": {
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          },
        • "integration": {
          • "module_id": "string",
          • "mappings": [
            • {
              • "id": "string",
              • "property": "string",
              • "value": "string",
              • "rule_set": {
                • "id": null,
                • "op": null,
                • "rules": [ ]
                }
              }
            ]
          }
        },
      • "caps": [
        • {
          • "id": "string",
          • "cap_ids": [
            • "string"
            ],
          • "caps": [
            • { }
            ],
          • "count": 0,
          • "duration": 1,
          • "duration_units": "month",
          • "expires_at": "2020-11-23T11:41:52Z",
          • "failed_count": 0,
          • "flow_id": "string",
          • "maximum": 1200,
          • "name": "Monthly leads from TX",
          • "source_id": "string",
          • "started_at": "2020-11-23T11:41:52Z",
          • "step_id": "string",
          • "time_zone": "America/New_York",
          • "type": "volume",
          • "updated_at": "2020-11-23T11:41:52Z"
          }
        ],
      • "credential_id": "5fd43a1e627715453aaafff1",
      • "pricing": {
        • "override": true,
        • "prices": [
          • {
            • "id": { },
            • "amount": 0,
            • "rule_set": {
              • "id": "string",
              • "op": "and",
              • "rules": [
                • null
                ]
              }
            }
          ]
        },
      • "enabled": true
      }
    ],
  • "steps": [
    • {
      • "type": "filter",
      • "id": "string",
      • "description": "string",
      • "notes": "string",
      • "reason": "string",
      • "outcome": "string",
      • "rule_set": {
        • "id": "string",
        • "op": "and",
        • "rules": [
          • {
            • "id": "string",
            • "lhv": "lead.state",
            • "op": "is equal to",
            • "rhv": "TX",
            • "rule_set": { }
            }
          ]
        },
      • "enabled": true
      }
    ],
  • "ping_enabled": false,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "firehose": {
    • "credential_id": "5fd43a1e627715453aaafff1",
    • "bucket": "string",
    • "prefix": "string",
    • "enabled": true
    }
}

Update all flows

Update all flows for an account. Only users with superuser access can run this.

Responses
200

OK

put/flows
Request samples
curl -i -X PUT \
  https://app.leadconduit.com/flows

Get a flow

Returns the flow associated to the ID

Request
path Parameters
id
required
string (ID) ^[0-9a-fA-F]{24}$

ID of the flow to get

Responses
200

OK

get/flows/{id}
Request samples
curl -i -X GET \
  https://app.leadconduit.com/flows/:id
Response samples
application/json
{
  • "id": "5fd4371e940df5a34a3888b2",
  • "name": "Web Leads",
  • "errors": { },
  • "enabled": true,
  • "fields": [
    • "first_name",
    • "last_name",
    • "email",
    • "phone_1",
    • "address_1",
    • "city",
    • "state",
    • "postal_code",
    • "trustedform_cert_url"
    ],
  • "caps": [
    • {
      • "id": "string",
      • "cap_ids": [
        • "string"
        ],
      • "caps": [
        • { }
        ],
      • "count": 0,
      • "duration": 1,
      • "duration_units": "month",
      • "expires_at": "2020-11-23T11:41:52Z",
      • "failed_count": 0,
      • "flow_id": "string",
      • "maximum": 1200,
      • "name": "Monthly leads from TX",
      • "source_id": "string",
      • "started_at": "2020-11-23T11:41:52Z",
      • "step_id": "string",
      • "time_zone": "America/New_York",
      • "type": "volume",
      • "updated_at": "2020-11-23T11:41:52Z"
      }
    ],
  • "acceptance_criteria": {
    • "rule_set": {
      • "id": "string",
      • "op": "and",
      • "rules": [
        • {
          • "id": "string",
          • "lhv": "lead.state",
          • "op": "is equal to",
          • "rhv": "TX",
          • "rule_set": { }
          }
        ]
      },
    • "outcome": "string",
    • "reason": "string"
    },
  • "pricing": {
    • "override": true,
    • "prices": [
      • {
        • "id": { },
        • "amount": 0,
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          }
        }
      ]
    },
  • "sources": [
    • {
      • "id": "string",
      • "integration": {
        • "module_id": "string",
        • "mappings": [
          • {
            • "id": "string",
            • "property": "string",
            • "value": "string",
            • "rule_set": {
              • "id": "string",
              • "op": "and",
              • "rules": [
                • null
                ]
              }
            }
          ]
        },
      • "entity": {
        • "id": "5fd439f49734e9858b20cef9",
        • "name": "string",
        • "time_zone": "string"
        },
      • "acceptance_criteria": {
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          },
        • "outcome": "string",
        • "reason": "string"
        },
      • "feedback": {
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          },
        • "integration": {
          • "module_id": "string",
          • "mappings": [
            • {
              • "id": "string",
              • "property": "string",
              • "value": "string",
              • "rule_set": {
                • "id": null,
                • "op": null,
                • "rules": [ ]
                }
              }
            ]
          }
        },
      • "caps": [
        • {
          • "id": "string",
          • "cap_ids": [
            • "string"
            ],
          • "caps": [
            • { }
            ],
          • "count": 0,
          • "duration": 1,
          • "duration_units": "month",
          • "expires_at": "2020-11-23T11:41:52Z",
          • "failed_count": 0,
          • "flow_id": "string",
          • "maximum": 1200,
          • "name": "Monthly leads from TX",
          • "source_id": "string",
          • "started_at": "2020-11-23T11:41:52Z",
          • "step_id": "string",
          • "time_zone": "America/New_York",
          • "type": "volume",
          • "updated_at": "2020-11-23T11:41:52Z"
          }
        ],
      • "credential_id": "5fd43a1e627715453aaafff1",
      • "pricing": {
        • "override": true,
        • "prices": [
          • {
            • "id": { },
            • "amount": 0,
            • "rule_set": {
              • "id": "string",
              • "op": "and",
              • "rules": [
                • null
                ]
              }
            }
          ]
        },
      • "enabled": true
      }
    ],
  • "steps": [
    • {
      • "type": "filter",
      • "id": "string",
      • "description": "string",
      • "notes": "string",
      • "reason": "string",
      • "outcome": "string",
      • "rule_set": {
        • "id": "string",
        • "op": "and",
        • "rules": [
          • {
            • "id": "string",
            • "lhv": "lead.state",
            • "op": "is equal to",
            • "rhv": "TX",
            • "rule_set": { }
            }
          ]
        },
      • "enabled": true
      }
    ],
  • "ping_enabled": false,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "firehose": {
    • "credential_id": "5fd43a1e627715453aaafff1",
    • "bucket": "string",
    • "prefix": "string",
    • "enabled": true
    }
}

Update an existing flow

Update an existing Flow

Request
path Parameters
id
required
string (ID) ^[0-9a-fA-F]{24}$

ID of the flow to update

Responses
200

OK

put/flows/{id}
Request samples
curl -i -X PUT \
  https://app.leadconduit.com/flows/:id
Response samples
application/json
{
  • "id": "5fd4371e940df5a34a3888b2",
  • "name": "Web Leads",
  • "errors": { },
  • "enabled": true,
  • "fields": [
    • "first_name",
    • "last_name",
    • "email",
    • "phone_1",
    • "address_1",
    • "city",
    • "state",
    • "postal_code",
    • "trustedform_cert_url"
    ],
  • "caps": [
    • {
      • "id": "string",
      • "cap_ids": [
        • "string"
        ],
      • "caps": [
        • { }
        ],
      • "count": 0,
      • "duration": 1,
      • "duration_units": "month",
      • "expires_at": "2020-11-23T11:41:52Z",
      • "failed_count": 0,
      • "flow_id": "string",
      • "maximum": 1200,
      • "name": "Monthly leads from TX",
      • "source_id": "string",
      • "started_at": "2020-11-23T11:41:52Z",
      • "step_id": "string",
      • "time_zone": "America/New_York",
      • "type": "volume",
      • "updated_at": "2020-11-23T11:41:52Z"
      }
    ],
  • "acceptance_criteria": {
    • "rule_set": {
      • "id": "string",
      • "op": "and",
      • "rules": [
        • {
          • "id": "string",
          • "lhv": "lead.state",
          • "op": "is equal to",
          • "rhv": "TX",
          • "rule_set": { }
          }
        ]
      },
    • "outcome": "string",
    • "reason": "string"
    },
  • "pricing": {
    • "override": true,
    • "prices": [
      • {
        • "id": { },
        • "amount": 0,
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          }
        }
      ]
    },
  • "sources": [
    • {
      • "id": "string",
      • "integration": {
        • "module_id": "string",
        • "mappings": [
          • {
            • "id": "string",
            • "property": "string",
            • "value": "string",
            • "rule_set": {
              • "id": "string",
              • "op": "and",
              • "rules": [
                • null
                ]
              }
            }
          ]
        },
      • "entity": {
        • "id": "5fd439f49734e9858b20cef9",
        • "name": "string",
        • "time_zone": "string"
        },
      • "acceptance_criteria": {
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          },
        • "outcome": "string",
        • "reason": "string"
        },
      • "feedback": {
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          },
        • "integration": {
          • "module_id": "string",
          • "mappings": [
            • {
              • "id": "string",
              • "property": "string",
              • "value": "string",
              • "rule_set": {
                • "id": null,
                • "op": null,
                • "rules": [ ]
                }
              }
            ]
          }
        },
      • "caps": [
        • {
          • "id": "string",
          • "cap_ids": [
            • "string"
            ],
          • "caps": [
            • { }
            ],
          • "count": 0,
          • "duration": 1,
          • "duration_units": "month",
          • "expires_at": "2020-11-23T11:41:52Z",
          • "failed_count": 0,
          • "flow_id": "string",
          • "maximum": 1200,
          • "name": "Monthly leads from TX",
          • "source_id": "string",
          • "started_at": "2020-11-23T11:41:52Z",
          • "step_id": "string",
          • "time_zone": "America/New_York",
          • "type": "volume",
          • "updated_at": "2020-11-23T11:41:52Z"
          }
        ],
      • "credential_id": "5fd43a1e627715453aaafff1",
      • "pricing": {
        • "override": true,
        • "prices": [
          • {
            • "id": { },
            • "amount": 0,
            • "rule_set": {
              • "id": "string",
              • "op": "and",
              • "rules": [
                • null
                ]
              }
            }
          ]
        },
      • "enabled": true
      }
    ],
  • "steps": [
    • {
      • "type": "filter",
      • "id": "string",
      • "description": "string",
      • "notes": "string",
      • "reason": "string",
      • "outcome": "string",
      • "rule_set": {
        • "id": "string",
        • "op": "and",
        • "rules": [
          • {
            • "id": "string",
            • "lhv": "lead.state",
            • "op": "is equal to",
            • "rhv": "TX",
            • "rule_set": { }
            }
          ]
        },
      • "enabled": true
      }
    ],
  • "ping_enabled": false,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "firehose": {
    • "credential_id": "5fd43a1e627715453aaafff1",
    • "bucket": "string",
    • "prefix": "string",
    • "enabled": true
    }
}

Delete an existing flow

Once a flow is deleted it will no longer accept leads. Attempting to submit leads to a deleted flow will result in an HTTP 404. Returns the flow as it existed at the time of deletion.

Request
path Parameters
id
required
string (ID) ^[0-9a-fA-F]{24}$

ID of the flow to delete

Responses
200

OK

delete/flows/{id}
Request samples
curl -i -X DELETE \
  https://app.leadconduit.com/flows/:id
Response samples
application/json
{
  • "id": "5fd4371e940df5a34a3888b2",
  • "name": "Web Leads",
  • "errors": { },
  • "enabled": true,
  • "fields": [
    • "first_name",
    • "last_name",
    • "email",
    • "phone_1",
    • "address_1",
    • "city",
    • "state",
    • "postal_code",
    • "trustedform_cert_url"
    ],
  • "caps": [
    • {
      • "id": "string",
      • "cap_ids": [
        • "string"
        ],
      • "caps": [
        • { }
        ],
      • "count": 0,
      • "duration": 1,
      • "duration_units": "month",
      • "expires_at": "2020-11-23T11:41:52Z",
      • "failed_count": 0,
      • "flow_id": "string",
      • "maximum": 1200,
      • "name": "Monthly leads from TX",
      • "source_id": "string",
      • "started_at": "2020-11-23T11:41:52Z",
      • "step_id": "string",
      • "time_zone": "America/New_York",
      • "type": "volume",
      • "updated_at": "2020-11-23T11:41:52Z"
      }
    ],
  • "acceptance_criteria": {
    • "rule_set": {
      • "id": "string",
      • "op": "and",
      • "rules": [
        • {
          • "id": "string",
          • "lhv": "lead.state",
          • "op": "is equal to",
          • "rhv": "TX",
          • "rule_set": { }
          }
        ]
      },
    • "outcome": "string",
    • "reason": "string"
    },
  • "pricing": {
    • "override": true,
    • "prices": [
      • {
        • "id": { },
        • "amount": 0,
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          }
        }
      ]
    },
  • "sources": [
    • {
      • "id": "string",
      • "integration": {
        • "module_id": "string",
        • "mappings": [
          • {
            • "id": "string",
            • "property": "string",
            • "value": "string",
            • "rule_set": {
              • "id": "string",
              • "op": "and",
              • "rules": [
                • null
                ]
              }
            }
          ]
        },
      • "entity": {
        • "id": "5fd439f49734e9858b20cef9",
        • "name": "string",
        • "time_zone": "string"
        },
      • "acceptance_criteria": {
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          },
        • "outcome": "string",
        • "reason": "string"
        },
      • "feedback": {
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          },
        • "integration": {
          • "module_id": "string",
          • "mappings": [
            • {
              • "id": "string",
              • "property": "string",
              • "value": "string",
              • "rule_set": {
                • "id": null,
                • "op": null,
                • "rules": [ ]
                }
              }
            ]
          }
        },
      • "caps": [
        • {
          • "id": "string",
          • "cap_ids": [
            • "string"
            ],
          • "caps": [
            • { }
            ],
          • "count": 0,
          • "duration": 1,
          • "duration_units": "month",
          • "expires_at": "2020-11-23T11:41:52Z",
          • "failed_count": 0,
          • "flow_id": "string",
          • "maximum": 1200,
          • "name": "Monthly leads from TX",
          • "source_id": "string",
          • "started_at": "2020-11-23T11:41:52Z",
          • "step_id": "string",
          • "time_zone": "America/New_York",
          • "type": "volume",
          • "updated_at": "2020-11-23T11:41:52Z"
          }
        ],
      • "credential_id": "5fd43a1e627715453aaafff1",
      • "pricing": {
        • "override": true,
        • "prices": [
          • {
            • "id": { },
            • "amount": 0,
            • "rule_set": {
              • "id": "string",
              • "op": "and",
              • "rules": [
                • null
                ]
              }
            }
          ]
        },
      • "enabled": true
      }
    ],
  • "steps": [
    • {
      • "type": "filter",
      • "id": "string",
      • "description": "string",
      • "notes": "string",
      • "reason": "string",
      • "outcome": "string",
      • "rule_set": {
        • "id": "string",
        • "op": "and",
        • "rules": [
          • {
            • "id": "string",
            • "lhv": "lead.state",
            • "op": "is equal to",
            • "rhv": "TX",
            • "rule_set": { }
            }
          ]
        },
      • "enabled": true
      }
    ],
  • "ping_enabled": false,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "firehose": {
    • "credential_id": "5fd43a1e627715453aaafff1",
    • "bucket": "string",
    • "prefix": "string",
    • "enabled": true
    }
}

Deploy all flows

Deploys all the enabled flows for an account. Only users with superuser access can run this.

Responses
200

OK

post/flows/deploy
Request samples
curl -i -X POST \
  https://app.leadconduit.com/flows/deploy
Response samples
application/json
{
  • "message": "Your flow was deployed and the most recent changes are now live"
}

Deploy a saved flow to production

A flow defines how lead submissions will be handled. In order to make a flow's latest state active for lead handling, it must be deployed. Because changes to a flow can be made without deploying them, you are free make flow updates without affecting current lead handling. Put another way, a deployment must be performed after it is created or updated in order for lead handling to start using the new configuration.

Request
path Parameters
id
required
string (ID) ^[0-9a-fA-F]{24}$

ID of the flow to deploy

Responses
200

OK

post/flows/{id}/deploy
Request samples
curl -i -X POST \
  https://app.leadconduit.com/flows/:id/deploy
Response samples
application/json
{
  • "message": "Your flow was deployed and the most recent changes are now live"
}

List changes to a Flow

Lists all the changes made to a flow

Request
path Parameters
id
required
string (ID) ^[0-9a-fA-F]{24}$

ID of the flow

Responses
200

OK

get/flows/{id}/changelogs
Request samples
curl -i -X GET \
  https://app.leadconduit.com/flows/:id/changelogs
Response samples
application/json
[
  • {
    • "id": "string",
    • "action": "create",
    • "changes": [
      • {
        • "action": "create",
        • "target": "string",
        • "delta_path": "string",
        • "previous": {
          • "value": "string"
          }
        }
      ],
    • "current_revision": {
      • "id": "5fd439df60f288816f7ba2aa",
      • "account": true,
      • "deprecated": true,
      • "description": "string",
      • "field_suffix": "strin",
      • "flow_ids": [
        • "string"
        ],
      • "logo_url": "http://example.com",
      • "module_ids": [
        • "string"
        ],
      • "name": "string",
      • "recipient": "buyer",
      • "see": "string",
      • "source": "form",
      • "standard": true,
      • "time_zone": "string",
      • "trustedform_certified_vendor": true,
      • "website": "http://example.com",
      • "created_at": "2019-08-24T14:15:22Z",
      • "updated_at": "2019-08-24T14:15:22Z"
      },
    • "delta_from_last_revision": {
      • "property1": [
        • "string"
        ],
      • "property2": [
        • "string"
        ]
      },
    • "type": "flow",
    • "user": {
      • "id": "string",
      • "first_name": "string",
      • "last_name": "string",
      • "email": "string"
      },
    • "created_at": "2020-11-23T11:41:52Z"
    }
]

List fields associated to the Flow

List fields associated to the Flow

Request
path Parameters
id
required
string (ID) ^[0-9a-fA-F]{24}$

ID of the flow schema

Responses
200

OK

get/flows/{id}/fields
Request samples
curl -i -X GET \
  https://app.leadconduit.com/flows/:id/fields
Response samples
application/json
[
  • {
    • "id": "string",
    • "type": "string",
    • "name": "string",
    • "description": "string",
    • "standard": true,
    • "deprecated": true,
    • "see": "string",
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z",
    • "examples": [
      • {
        • "name": "boolean",
        • "maskable": false,
        • "components": [ ],
        • "operators": [
          • "is true"
          ],
        • "examples": [
          • {
            • "normal": true,
            • "valid": true,
            • "raw": "yes"
            },
          • {
            • "normal": false,
            • "valid": true,
            • "raw": "no"
            },
          • {
            • "normal": true,
            • "valid": true,
            • "raw": "Y"
            },
          • {
            • "normal": false,
            • "valid": true,
            • "raw": "N"
            },
          • {
            • "normal": true,
            • "valid": true,
            • "raw": "true"
            },
          • {
            • "normal": false,
            • "valid": true,
            • "raw": "false"
            },
          • {
            • "normal": true,
            • "valid": true,
            • "raw": "T"
            },
          • {
            • "normal": false,
            • "valid": true,
            • "raw": "F"
            },
          • {
            • "normal": true,
            • "valid": true,
            • "raw": "1"
            },
          • {
            • "normal": false,
            • "valid": true,
            • "raw": "0"
            }
          ]
        }
      ]
    }
]

Get flow field usages

Count the number of leads processed by flow field. This tells you which and how much each flow field was used today. You can change the timeframe using the timeframe parameter (i.e. timeframe=previous_30_days), though this is discouraged because this query is fairly heavy.

Request
path Parameters
id
required
string (ID) ^[0-9a-fA-F]{24}$

ID of the flow to deploy

query Parameters
timeframe
string
Responses
200

OK

get/flows/{id}/fields/usage
Request samples
curl -i -X GET \
  'https://app.leadconduit.com/flows/:id/fields/usage?timeframe=string'
Response samples
application/json
{
  • "property1": 0,
  • "property2": 0
}