Launch a Workflow
curl --request POST \
--url https://api.captaindata.co/v3/workflows/{workflow_uid}/schedule \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'x-project-id: <api-key>' \
--data '
{
"job_name": "Get Yann Lecun Linkedin Profile",
"steps": [
{
"step_uid": "xxxxxx-xxxxx-451f-ac94-2b41972ec6a7",
"accounts": [
"fc457336-63da-47f8-9a3c-53f2581d0ccb"
],
"accounts_rotation_enabled": true,
"parameters": {},
"output_column": null
}
],
"inputs": [
{
"linkedin_profile_url": "https://www.linkedin.com/in/yann-lecun/",
"meta": {
"hubspot_company_id": "***",
"hubspot_people_id": "***",
"your_meta_key": "***"
}
}
],
"unstructure_meta": false,
"repeat_option": {
"type": "minute",
"value": 10
}
}
'import requests
url = "https://api.captaindata.co/v3/workflows/{workflow_uid}/schedule"
payload = {
"job_name": "Get Yann Lecun Linkedin Profile",
"steps": [
{
"step_uid": "xxxxxx-xxxxx-451f-ac94-2b41972ec6a7",
"accounts": ["fc457336-63da-47f8-9a3c-53f2581d0ccb"],
"accounts_rotation_enabled": True,
"parameters": {},
"output_column": None
}
],
"inputs": [
{
"linkedin_profile_url": "https://www.linkedin.com/in/yann-lecun/",
"meta": {
"hubspot_company_id": "***",
"hubspot_people_id": "***",
"your_meta_key": "***"
}
}
],
"unstructure_meta": False,
"repeat_option": {
"type": "minute",
"value": 10
}
}
headers = {
"Authorization": "<api-key>",
"x-project-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<api-key>',
'x-project-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
job_name: 'Get Yann Lecun Linkedin Profile',
steps: [
{
step_uid: 'xxxxxx-xxxxx-451f-ac94-2b41972ec6a7',
accounts: ['fc457336-63da-47f8-9a3c-53f2581d0ccb'],
accounts_rotation_enabled: true,
parameters: {},
output_column: null
}
],
inputs: [
{
linkedin_profile_url: 'https://www.linkedin.com/in/yann-lecun/',
meta: {hubspot_company_id: '***', hubspot_people_id: '***', your_meta_key: '***'}
}
],
unstructure_meta: false,
repeat_option: {type: 'minute', value: 10}
})
};
fetch('https://api.captaindata.co/v3/workflows/{workflow_uid}/schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.captaindata.co/v3/workflows/{workflow_uid}/schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'job_name' => 'Get Yann Lecun Linkedin Profile',
'steps' => [
[
'step_uid' => 'xxxxxx-xxxxx-451f-ac94-2b41972ec6a7',
'accounts' => [
'fc457336-63da-47f8-9a3c-53f2581d0ccb'
],
'accounts_rotation_enabled' => true,
'parameters' => [
],
'output_column' => null
]
],
'inputs' => [
[
'linkedin_profile_url' => 'https://www.linkedin.com/in/yann-lecun/',
'meta' => [
'hubspot_company_id' => '***',
'hubspot_people_id' => '***',
'your_meta_key' => '***'
]
]
],
'unstructure_meta' => false,
'repeat_option' => [
'type' => 'minute',
'value' => 10
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"x-project-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.captaindata.co/v3/workflows/{workflow_uid}/schedule"
payload := strings.NewReader("{\n \"job_name\": \"Get Yann Lecun Linkedin Profile\",\n \"steps\": [\n {\n \"step_uid\": \"xxxxxx-xxxxx-451f-ac94-2b41972ec6a7\",\n \"accounts\": [\n \"fc457336-63da-47f8-9a3c-53f2581d0ccb\"\n ],\n \"accounts_rotation_enabled\": true,\n \"parameters\": {},\n \"output_column\": null\n }\n ],\n \"inputs\": [\n {\n \"linkedin_profile_url\": \"https://www.linkedin.com/in/yann-lecun/\",\n \"meta\": {\n \"hubspot_company_id\": \"***\",\n \"hubspot_people_id\": \"***\",\n \"your_meta_key\": \"***\"\n }\n }\n ],\n \"unstructure_meta\": false,\n \"repeat_option\": {\n \"type\": \"minute\",\n \"value\": 10\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("x-project-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.captaindata.co/v3/workflows/{workflow_uid}/schedule")
.header("Authorization", "<api-key>")
.header("x-project-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"job_name\": \"Get Yann Lecun Linkedin Profile\",\n \"steps\": [\n {\n \"step_uid\": \"xxxxxx-xxxxx-451f-ac94-2b41972ec6a7\",\n \"accounts\": [\n \"fc457336-63da-47f8-9a3c-53f2581d0ccb\"\n ],\n \"accounts_rotation_enabled\": true,\n \"parameters\": {},\n \"output_column\": null\n }\n ],\n \"inputs\": [\n {\n \"linkedin_profile_url\": \"https://www.linkedin.com/in/yann-lecun/\",\n \"meta\": {\n \"hubspot_company_id\": \"***\",\n \"hubspot_people_id\": \"***\",\n \"your_meta_key\": \"***\"\n }\n }\n ],\n \"unstructure_meta\": false,\n \"repeat_option\": {\n \"type\": \"minute\",\n \"value\": 10\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.captaindata.co/v3/workflows/{workflow_uid}/schedule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["x-project-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"job_name\": \"Get Yann Lecun Linkedin Profile\",\n \"steps\": [\n {\n \"step_uid\": \"xxxxxx-xxxxx-451f-ac94-2b41972ec6a7\",\n \"accounts\": [\n \"fc457336-63da-47f8-9a3c-53f2581d0ccb\"\n ],\n \"accounts_rotation_enabled\": true,\n \"parameters\": {},\n \"output_column\": null\n }\n ],\n \"inputs\": [\n {\n \"linkedin_profile_url\": \"https://www.linkedin.com/in/yann-lecun/\",\n \"meta\": {\n \"hubspot_company_id\": \"***\",\n \"hubspot_people_id\": \"***\",\n \"your_meta_key\": \"***\"\n }\n }\n ],\n \"unstructure_meta\": false,\n \"repeat_option\": {\n \"type\": \"minute\",\n \"value\": 10\n }\n}"
response = http.request(request)
puts response.read_body{
"workflow": {
"uid": "xxxxxx-xxxx-4eeb-ada7-652fb498f540",
"permalink": "extract-linkedin-people-profile085eef00-7e08-4abc-9971-217d3b65089b",
"name": "Extract LinkedIn People Profile",
"created_at": "2024-10-26T22:35:35.803378",
"project_id": 1,
"linked_templates": [
"xxxxxxx-xxxxx-4288-8959-ef5759254ea1"
],
"template_uid": "76fc370f-110b-4288-8959-ef5759254ea1"
},
"message": "Bot successfully scheduled.",
"job_uid": "789416bd-9bc6-49be-9e21-d8037d1e393b"
}{
"detail": [
{
"loc": [
"path",
"workflow_uid"
],
"msg": "value is not a valid uuid",
"type": "type_error.uuid"
}
]
}Workflows
Launch a Workflow
POST
/
v3
/
workflows
/
{workflow_uid}
/
schedule
Launch a Workflow
curl --request POST \
--url https://api.captaindata.co/v3/workflows/{workflow_uid}/schedule \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'x-project-id: <api-key>' \
--data '
{
"job_name": "Get Yann Lecun Linkedin Profile",
"steps": [
{
"step_uid": "xxxxxx-xxxxx-451f-ac94-2b41972ec6a7",
"accounts": [
"fc457336-63da-47f8-9a3c-53f2581d0ccb"
],
"accounts_rotation_enabled": true,
"parameters": {},
"output_column": null
}
],
"inputs": [
{
"linkedin_profile_url": "https://www.linkedin.com/in/yann-lecun/",
"meta": {
"hubspot_company_id": "***",
"hubspot_people_id": "***",
"your_meta_key": "***"
}
}
],
"unstructure_meta": false,
"repeat_option": {
"type": "minute",
"value": 10
}
}
'import requests
url = "https://api.captaindata.co/v3/workflows/{workflow_uid}/schedule"
payload = {
"job_name": "Get Yann Lecun Linkedin Profile",
"steps": [
{
"step_uid": "xxxxxx-xxxxx-451f-ac94-2b41972ec6a7",
"accounts": ["fc457336-63da-47f8-9a3c-53f2581d0ccb"],
"accounts_rotation_enabled": True,
"parameters": {},
"output_column": None
}
],
"inputs": [
{
"linkedin_profile_url": "https://www.linkedin.com/in/yann-lecun/",
"meta": {
"hubspot_company_id": "***",
"hubspot_people_id": "***",
"your_meta_key": "***"
}
}
],
"unstructure_meta": False,
"repeat_option": {
"type": "minute",
"value": 10
}
}
headers = {
"Authorization": "<api-key>",
"x-project-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<api-key>',
'x-project-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
job_name: 'Get Yann Lecun Linkedin Profile',
steps: [
{
step_uid: 'xxxxxx-xxxxx-451f-ac94-2b41972ec6a7',
accounts: ['fc457336-63da-47f8-9a3c-53f2581d0ccb'],
accounts_rotation_enabled: true,
parameters: {},
output_column: null
}
],
inputs: [
{
linkedin_profile_url: 'https://www.linkedin.com/in/yann-lecun/',
meta: {hubspot_company_id: '***', hubspot_people_id: '***', your_meta_key: '***'}
}
],
unstructure_meta: false,
repeat_option: {type: 'minute', value: 10}
})
};
fetch('https://api.captaindata.co/v3/workflows/{workflow_uid}/schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.captaindata.co/v3/workflows/{workflow_uid}/schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'job_name' => 'Get Yann Lecun Linkedin Profile',
'steps' => [
[
'step_uid' => 'xxxxxx-xxxxx-451f-ac94-2b41972ec6a7',
'accounts' => [
'fc457336-63da-47f8-9a3c-53f2581d0ccb'
],
'accounts_rotation_enabled' => true,
'parameters' => [
],
'output_column' => null
]
],
'inputs' => [
[
'linkedin_profile_url' => 'https://www.linkedin.com/in/yann-lecun/',
'meta' => [
'hubspot_company_id' => '***',
'hubspot_people_id' => '***',
'your_meta_key' => '***'
]
]
],
'unstructure_meta' => false,
'repeat_option' => [
'type' => 'minute',
'value' => 10
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"x-project-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.captaindata.co/v3/workflows/{workflow_uid}/schedule"
payload := strings.NewReader("{\n \"job_name\": \"Get Yann Lecun Linkedin Profile\",\n \"steps\": [\n {\n \"step_uid\": \"xxxxxx-xxxxx-451f-ac94-2b41972ec6a7\",\n \"accounts\": [\n \"fc457336-63da-47f8-9a3c-53f2581d0ccb\"\n ],\n \"accounts_rotation_enabled\": true,\n \"parameters\": {},\n \"output_column\": null\n }\n ],\n \"inputs\": [\n {\n \"linkedin_profile_url\": \"https://www.linkedin.com/in/yann-lecun/\",\n \"meta\": {\n \"hubspot_company_id\": \"***\",\n \"hubspot_people_id\": \"***\",\n \"your_meta_key\": \"***\"\n }\n }\n ],\n \"unstructure_meta\": false,\n \"repeat_option\": {\n \"type\": \"minute\",\n \"value\": 10\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("x-project-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.captaindata.co/v3/workflows/{workflow_uid}/schedule")
.header("Authorization", "<api-key>")
.header("x-project-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"job_name\": \"Get Yann Lecun Linkedin Profile\",\n \"steps\": [\n {\n \"step_uid\": \"xxxxxx-xxxxx-451f-ac94-2b41972ec6a7\",\n \"accounts\": [\n \"fc457336-63da-47f8-9a3c-53f2581d0ccb\"\n ],\n \"accounts_rotation_enabled\": true,\n \"parameters\": {},\n \"output_column\": null\n }\n ],\n \"inputs\": [\n {\n \"linkedin_profile_url\": \"https://www.linkedin.com/in/yann-lecun/\",\n \"meta\": {\n \"hubspot_company_id\": \"***\",\n \"hubspot_people_id\": \"***\",\n \"your_meta_key\": \"***\"\n }\n }\n ],\n \"unstructure_meta\": false,\n \"repeat_option\": {\n \"type\": \"minute\",\n \"value\": 10\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.captaindata.co/v3/workflows/{workflow_uid}/schedule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["x-project-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"job_name\": \"Get Yann Lecun Linkedin Profile\",\n \"steps\": [\n {\n \"step_uid\": \"xxxxxx-xxxxx-451f-ac94-2b41972ec6a7\",\n \"accounts\": [\n \"fc457336-63da-47f8-9a3c-53f2581d0ccb\"\n ],\n \"accounts_rotation_enabled\": true,\n \"parameters\": {},\n \"output_column\": null\n }\n ],\n \"inputs\": [\n {\n \"linkedin_profile_url\": \"https://www.linkedin.com/in/yann-lecun/\",\n \"meta\": {\n \"hubspot_company_id\": \"***\",\n \"hubspot_people_id\": \"***\",\n \"your_meta_key\": \"***\"\n }\n }\n ],\n \"unstructure_meta\": false,\n \"repeat_option\": {\n \"type\": \"minute\",\n \"value\": 10\n }\n}"
response = http.request(request)
puts response.read_body{
"workflow": {
"uid": "xxxxxx-xxxx-4eeb-ada7-652fb498f540",
"permalink": "extract-linkedin-people-profile085eef00-7e08-4abc-9971-217d3b65089b",
"name": "Extract LinkedIn People Profile",
"created_at": "2024-10-26T22:35:35.803378",
"project_id": 1,
"linked_templates": [
"xxxxxxx-xxxxx-4288-8959-ef5759254ea1"
],
"template_uid": "76fc370f-110b-4288-8959-ef5759254ea1"
},
"message": "Bot successfully scheduled.",
"job_uid": "789416bd-9bc6-49be-9e21-d8037d1e393b"
}{
"detail": [
{
"loc": [
"path",
"workflow_uid"
],
"msg": "value is not a valid uuid",
"type": "type_error.uuid"
}
]
}Authorizations
Body
application/json
Response
Successful Response