You'll need three things to make a successful API call to Modern Logic:

  1. API Token

  2. Workflow URL

  3. Request Body

Here's a quick guide on where to find each of these.

Find workflow URL

Next, you'll need the URL for the workflow you'd like to hit. Each workflow has its own dedicated URL, which stays constant as you deploy new versions of the workflow.

Click on the Workflows page, and select the Workflow you'd like to hit. Click on the API Call node, which is always the first node on the graph. Below the title on the detail panel, you should see the URL for this workflow, (ending in /execute). Copy this URL.

<aside> 🎉 You can now add dryRun=true to the end of your URL to make requests in Dry Run mode. This will use cached data for all your data connectors, mute Slack and Email notifications, and skip generating alerts and execution history. This can help you test changes quickly, with minimal cost and noise.


Request Body

For your Workflow to do much, you'll need to pass it input fields. These can be customized per workflow. To get started, click anywhere on the Graph of your workflow to bring up the main Version History panel. Then click Test > Individual

Screen Shot 2021-10-25 at 7.16.51 PM.png

From this screen, you'll see, you'll see an automatically generated JSON request body for use in testing. You can copy this to whatever tool you'd like to send API calls from.

Screen Shot 2021-10-25 at 7.18.12 PM.png

Putting it all together

With those three elements, you can set up an API request to Modern Logic. See our guide to

Using Postman with Modern Logic or try one of our sample CURL requests below.

curl -X POST <\\>
 -H "Accept: application/json"\\
 -H "Authorization: Bearer <token>"\\
 -H "Content-Type: application/json"\\
 -d '{"amount": 627.62, "ip_address": "11.111.1111", "source_currency": "USD", "destination_currency": "BTC","device_id": "abc123"}'