Create Workflow
curl --request POST \
--url https://api.sixtyfour.ai/workflows/create_workflow \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"workflow_name": "<string>",
"workflow_description": "<string>",
"workflow_definition": {
"blocks": [
{
"block_name": "<string>",
"specs": {},
"block_id": "<string>"
}
],
"edges": [
{
"from_block_id": "<string>",
"to_block_id": "<string>"
}
]
},
"id": "<string>"
}
'import requests
url = "https://api.sixtyfour.ai/workflows/create_workflow"
payload = {
"workflow_name": "<string>",
"workflow_description": "<string>",
"workflow_definition": {
"blocks": [
{
"block_name": "<string>",
"specs": {},
"block_id": "<string>"
}
],
"edges": [
{
"from_block_id": "<string>",
"to_block_id": "<string>"
}
]
},
"id": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workflow_name: '<string>',
workflow_description: '<string>',
workflow_definition: {
blocks: [{block_name: '<string>', specs: {}, block_id: '<string>'}],
edges: [{from_block_id: '<string>', to_block_id: '<string>'}]
},
id: '<string>'
})
};
fetch('https://api.sixtyfour.ai/workflows/create_workflow', 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.sixtyfour.ai/workflows/create_workflow",
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([
'workflow_name' => '<string>',
'workflow_description' => '<string>',
'workflow_definition' => [
'blocks' => [
[
'block_name' => '<string>',
'specs' => [
],
'block_id' => '<string>'
]
],
'edges' => [
[
'from_block_id' => '<string>',
'to_block_id' => '<string>'
]
]
],
'id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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.sixtyfour.ai/workflows/create_workflow"
payload := strings.NewReader("{\n \"workflow_name\": \"<string>\",\n \"workflow_description\": \"<string>\",\n \"workflow_definition\": {\n \"blocks\": [\n {\n \"block_name\": \"<string>\",\n \"specs\": {},\n \"block_id\": \"<string>\"\n }\n ],\n \"edges\": [\n {\n \"from_block_id\": \"<string>\",\n \"to_block_id\": \"<string>\"\n }\n ]\n },\n \"id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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.sixtyfour.ai/workflows/create_workflow")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"workflow_name\": \"<string>\",\n \"workflow_description\": \"<string>\",\n \"workflow_definition\": {\n \"blocks\": [\n {\n \"block_name\": \"<string>\",\n \"specs\": {},\n \"block_id\": \"<string>\"\n }\n ],\n \"edges\": [\n {\n \"from_block_id\": \"<string>\",\n \"to_block_id\": \"<string>\"\n }\n ]\n },\n \"id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sixtyfour.ai/workflows/create_workflow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflow_name\": \"<string>\",\n \"workflow_description\": \"<string>\",\n \"workflow_definition\": {\n \"blocks\": [\n {\n \"block_name\": \"<string>\",\n \"specs\": {},\n \"block_id\": \"<string>\"\n }\n ],\n \"edges\": [\n {\n \"from_block_id\": \"<string>\",\n \"to_block_id\": \"<string>\"\n }\n ]\n },\n \"id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"edit_revision": 0,
"user_uuid": "<string>",
"org_id": "<string>",
"description": "<string>",
"display_status": {
"label": "<string>"
},
"last_run_date": "2023-11-07T05:31:56Z",
"team_id": "<string>",
"locked": true,
"block_count": 123,
"workflow_definition": {
"blocks": [
{
"block_name": "<string>",
"specs": {},
"block_id": "<string>"
}
],
"edges": [
{
"from_block_id": "<string>",
"to_block_id": "<string>"
}
]
}
}{
"detail": "Invalid request body",
"code": "bad_request",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Invalid API key",
"code": "unauthenticated",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Access denied",
"code": "forbidden",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Workflow not found",
"code": "not_found",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Workflow with ID 3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21 already exists. Use update endpoint to modify existing workflows.",
"code": "conflict",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": [
{
"loc": [
"body",
"target_company",
"domain"
],
"msg": "Field required",
"type": "missing",
"input": null,
"ctx": {}
}
],
"code": "invalid_request",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Internal server error",
"code": "internal_error",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Could not verify the API key right now. Retry shortly.",
"code": "unavailable",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}Workflows
Create Workflow
Create a new workflow from a block graph definition.
POST
/
workflows
/
create_workflow
Create Workflow
curl --request POST \
--url https://api.sixtyfour.ai/workflows/create_workflow \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"workflow_name": "<string>",
"workflow_description": "<string>",
"workflow_definition": {
"blocks": [
{
"block_name": "<string>",
"specs": {},
"block_id": "<string>"
}
],
"edges": [
{
"from_block_id": "<string>",
"to_block_id": "<string>"
}
]
},
"id": "<string>"
}
'import requests
url = "https://api.sixtyfour.ai/workflows/create_workflow"
payload = {
"workflow_name": "<string>",
"workflow_description": "<string>",
"workflow_definition": {
"blocks": [
{
"block_name": "<string>",
"specs": {},
"block_id": "<string>"
}
],
"edges": [
{
"from_block_id": "<string>",
"to_block_id": "<string>"
}
]
},
"id": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workflow_name: '<string>',
workflow_description: '<string>',
workflow_definition: {
blocks: [{block_name: '<string>', specs: {}, block_id: '<string>'}],
edges: [{from_block_id: '<string>', to_block_id: '<string>'}]
},
id: '<string>'
})
};
fetch('https://api.sixtyfour.ai/workflows/create_workflow', 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.sixtyfour.ai/workflows/create_workflow",
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([
'workflow_name' => '<string>',
'workflow_description' => '<string>',
'workflow_definition' => [
'blocks' => [
[
'block_name' => '<string>',
'specs' => [
],
'block_id' => '<string>'
]
],
'edges' => [
[
'from_block_id' => '<string>',
'to_block_id' => '<string>'
]
]
],
'id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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.sixtyfour.ai/workflows/create_workflow"
payload := strings.NewReader("{\n \"workflow_name\": \"<string>\",\n \"workflow_description\": \"<string>\",\n \"workflow_definition\": {\n \"blocks\": [\n {\n \"block_name\": \"<string>\",\n \"specs\": {},\n \"block_id\": \"<string>\"\n }\n ],\n \"edges\": [\n {\n \"from_block_id\": \"<string>\",\n \"to_block_id\": \"<string>\"\n }\n ]\n },\n \"id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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.sixtyfour.ai/workflows/create_workflow")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"workflow_name\": \"<string>\",\n \"workflow_description\": \"<string>\",\n \"workflow_definition\": {\n \"blocks\": [\n {\n \"block_name\": \"<string>\",\n \"specs\": {},\n \"block_id\": \"<string>\"\n }\n ],\n \"edges\": [\n {\n \"from_block_id\": \"<string>\",\n \"to_block_id\": \"<string>\"\n }\n ]\n },\n \"id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sixtyfour.ai/workflows/create_workflow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflow_name\": \"<string>\",\n \"workflow_description\": \"<string>\",\n \"workflow_definition\": {\n \"blocks\": [\n {\n \"block_name\": \"<string>\",\n \"specs\": {},\n \"block_id\": \"<string>\"\n }\n ],\n \"edges\": [\n {\n \"from_block_id\": \"<string>\",\n \"to_block_id\": \"<string>\"\n }\n ]\n },\n \"id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"edit_revision": 0,
"user_uuid": "<string>",
"org_id": "<string>",
"description": "<string>",
"display_status": {
"label": "<string>"
},
"last_run_date": "2023-11-07T05:31:56Z",
"team_id": "<string>",
"locked": true,
"block_count": 123,
"workflow_definition": {
"blocks": [
{
"block_name": "<string>",
"specs": {},
"block_id": "<string>"
}
],
"edges": [
{
"from_block_id": "<string>",
"to_block_id": "<string>"
}
]
}
}{
"detail": "Invalid request body",
"code": "bad_request",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Invalid API key",
"code": "unauthenticated",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Access denied",
"code": "forbidden",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Workflow not found",
"code": "not_found",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Workflow with ID 3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21 already exists. Use update endpoint to modify existing workflows.",
"code": "conflict",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": [
{
"loc": [
"body",
"target_company",
"domain"
],
"msg": "Field required",
"type": "missing",
"input": null,
"ctx": {}
}
],
"code": "invalid_request",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Internal server error",
"code": "internal_error",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Could not verify the API key right now. Retry shortly.",
"code": "unavailable",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}Body
application/json
Response
Successful Response
Was this page helpful?