Head over to the API Reference and look for "Launch a Workflow".
API Playground
We've built the API playground to facilitate API integration: we strongly encourage you to use it.
Integration Accounts
Using version 3 of the API, you can use accounts you previously synchronized in the Integrations section.
To get one's account UID, go to the integration of your choice and click on Actions > Copy account UID:
Once you have this UID, you can use it to schedule a workflow with the account, using the following in the payload (refer to the API Reference for the full payload):
"accounts": {"UID_YOU_JUST_GOT": {}}
with Account Rotation
When setting Account Rotation to true, and you want to use only specific accounts for Organization A, you can specify the account_uid
for each account in the configuration under "accounts". Make sure to also enable Account Rotation by setting it to true
If you need to update a cookie, for example with LinkedIn, use the following:
"accounts": {"UID_YOU_JUST_GOT": {"cookies": {"li_at": "YOUR_NEW_VALUE"}}}
Common Error
-
Wrong body (JSON)
To avoid errors when sending an API call request, configure your workflow (Edit & Launch Workflow) as desired and save your current setup. This ensures you can copy the correct body to schedule from the API tab.
-
"error": "Attribute mismatch: Number of step configurations do not match the number of step editors"
This suggests that you likely added or removed a step in your first workflow configuration, and forgot to edit or copy-paste the new body to schedule related to the new configuration.
Parameters
Launch Repeat
You can use the Captain Data scheduling capabilities to launch a workflow repeatedly. It will create a schedule that will run the workflow on a specific configuration at the frequency of your choice.
It is a good option if you need a CRON behaviour for a specific but don't want to develop it.
To achieve this, use the "repeat_option" parameter when using the "Launch a Workflow" API end-point.
"repeat_option": {
"type": "frequency", // string: minute, hour, day, week, month
"value": amount // integer: between 1 and 100
}