curl --request POST \
--url https://api.sixtyfour.ai/workflows/create_workflow \
--header 'Content-Type: application/json' \
--data '
{
"workflow_name": "<string>",
"workflow_description": "<string>",
"workflow_definition": {
"blocks": [
{
"sequence_number": 123,
"block_type": "<string>",
"block_name": "<string>",
"specs": {},
"block_id": "<string>"
}
],
"edges": [
{
"from_block_id": "<string>",
"to_block_id": "<string>",
"condition": "<string>"
}
]
},
"id": "<string>"
}
'import requests
url = "https://api.sixtyfour.ai/workflows/create_workflow"
payload = {
"workflow_name": "<string>",
"workflow_description": "<string>",
"workflow_definition": {
"blocks": [
{
"sequence_number": 123,
"block_type": "<string>",
"block_name": "<string>",
"specs": {},
"block_id": "<string>"
}
],
"edges": [
{
"from_block_id": "<string>",
"to_block_id": "<string>",
"condition": "<string>"
}
]
},
"id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
workflow_name: '<string>',
workflow_description: '<string>',
workflow_definition: {
blocks: [
{
sequence_number: 123,
block_type: '<string>',
block_name: '<string>',
specs: {},
block_id: '<string>'
}
],
edges: [{from_block_id: '<string>', to_block_id: '<string>', condition: '<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' => [
[
'sequence_number' => 123,
'block_type' => '<string>',
'block_name' => '<string>',
'specs' => [
],
'block_id' => '<string>'
]
],
'edges' => [
[
'from_block_id' => '<string>',
'to_block_id' => '<string>',
'condition' => '<string>'
]
]
],
'id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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 \"sequence_number\": 123,\n \"block_type\": \"<string>\",\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 \"condition\": \"<string>\"\n }\n ]\n },\n \"id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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("Content-Type", "application/json")
.body("{\n \"workflow_name\": \"<string>\",\n \"workflow_description\": \"<string>\",\n \"workflow_definition\": {\n \"blocks\": [\n {\n \"sequence_number\": 123,\n \"block_type\": \"<string>\",\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 \"condition\": \"<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["Content-Type"] = 'application/json'
request.body = "{\n \"workflow_name\": \"<string>\",\n \"workflow_description\": \"<string>\",\n \"workflow_definition\": {\n \"blocks\": [\n {\n \"sequence_number\": 123,\n \"block_type\": \"<string>\",\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 \"condition\": \"<string>\"\n }\n ]\n },\n \"id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status": "<string>",
"step": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"user_uuid": "<string>",
"org_id": "<string>",
"description": "<string>",
"display_status": {
"label": "<string>",
"tone": "success"
},
"last_run_date": "2023-11-07T05:31:56Z",
"team_id": "<string>",
"starred": true,
"locked": true,
"block_count": 123,
"workflow_definition": {
"blocks": [
{
"sequence_number": 123,
"block_type": "<string>",
"block_name": "<string>",
"specs": {},
"block_id": "<string>"
}
],
"edges": [
{
"from_block_id": "<string>",
"to_block_id": "<string>",
"condition": "<string>"
}
]
}
}{
"detail": "Invalid request body"
}{
"detail": "Invalid API key"
}{
"detail": "Access denied"
}{
"detail": "Workflow not found"
}{
"detail": "Workflow with ID 0123abcd-1234-5678-9abc-def012345678 already exists. Use update endpoint to modify existing workflows."
}{
"detail": [
{
"loc": [
"body",
"target_company",
"domain"
],
"msg": "Field required",
"type": "missing",
"input": null,
"ctx": {}
}
]
}{
"detail": "Internal server error"
}Create Workflow
Create a new workflow from a block graph definition.
curl --request POST \
--url https://api.sixtyfour.ai/workflows/create_workflow \
--header 'Content-Type: application/json' \
--data '
{
"workflow_name": "<string>",
"workflow_description": "<string>",
"workflow_definition": {
"blocks": [
{
"sequence_number": 123,
"block_type": "<string>",
"block_name": "<string>",
"specs": {},
"block_id": "<string>"
}
],
"edges": [
{
"from_block_id": "<string>",
"to_block_id": "<string>",
"condition": "<string>"
}
]
},
"id": "<string>"
}
'import requests
url = "https://api.sixtyfour.ai/workflows/create_workflow"
payload = {
"workflow_name": "<string>",
"workflow_description": "<string>",
"workflow_definition": {
"blocks": [
{
"sequence_number": 123,
"block_type": "<string>",
"block_name": "<string>",
"specs": {},
"block_id": "<string>"
}
],
"edges": [
{
"from_block_id": "<string>",
"to_block_id": "<string>",
"condition": "<string>"
}
]
},
"id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
workflow_name: '<string>',
workflow_description: '<string>',
workflow_definition: {
blocks: [
{
sequence_number: 123,
block_type: '<string>',
block_name: '<string>',
specs: {},
block_id: '<string>'
}
],
edges: [{from_block_id: '<string>', to_block_id: '<string>', condition: '<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' => [
[
'sequence_number' => 123,
'block_type' => '<string>',
'block_name' => '<string>',
'specs' => [
],
'block_id' => '<string>'
]
],
'edges' => [
[
'from_block_id' => '<string>',
'to_block_id' => '<string>',
'condition' => '<string>'
]
]
],
'id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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 \"sequence_number\": 123,\n \"block_type\": \"<string>\",\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 \"condition\": \"<string>\"\n }\n ]\n },\n \"id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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("Content-Type", "application/json")
.body("{\n \"workflow_name\": \"<string>\",\n \"workflow_description\": \"<string>\",\n \"workflow_definition\": {\n \"blocks\": [\n {\n \"sequence_number\": 123,\n \"block_type\": \"<string>\",\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 \"condition\": \"<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["Content-Type"] = 'application/json'
request.body = "{\n \"workflow_name\": \"<string>\",\n \"workflow_description\": \"<string>\",\n \"workflow_definition\": {\n \"blocks\": [\n {\n \"sequence_number\": 123,\n \"block_type\": \"<string>\",\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 \"condition\": \"<string>\"\n }\n ]\n },\n \"id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status": "<string>",
"step": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"user_uuid": "<string>",
"org_id": "<string>",
"description": "<string>",
"display_status": {
"label": "<string>",
"tone": "success"
},
"last_run_date": "2023-11-07T05:31:56Z",
"team_id": "<string>",
"starred": true,
"locked": true,
"block_count": 123,
"workflow_definition": {
"blocks": [
{
"sequence_number": 123,
"block_type": "<string>",
"block_name": "<string>",
"specs": {},
"block_id": "<string>"
}
],
"edges": [
{
"from_block_id": "<string>",
"to_block_id": "<string>",
"condition": "<string>"
}
]
}
}{
"detail": "Invalid request body"
}{
"detail": "Invalid API key"
}{
"detail": "Access denied"
}{
"detail": "Workflow not found"
}{
"detail": "Workflow with ID 0123abcd-1234-5678-9abc-def012345678 already exists. Use update endpoint to modify existing workflows."
}{
"detail": [
{
"loc": [
"body",
"target_company",
"domain"
],
"msg": "Field required",
"type": "missing",
"input": null,
"ctx": {}
}
]
}{
"detail": "Internal server error"
}Headers
Body
Human-readable workflow name.
Human-readable workflow description.
Workflow definition as a graph of blocks and edges.
Show child attributes
Show child attributes
Optional pre-generated workflow ID supplied by the client.
Response
Successful Response
Workflow identifier.
Workflow name.
Lifecycle status of the workflow definition (e.g. draft, ready).
Current authoring step in the builder UI.
Timestamp when the record was created.
Timestamp when the record was last updated.
User who created the workflow.
Organization that owns the workflow.
Workflow description.
Resolved label and tone for status + step, so clients render rather than interpret them.
Show child attributes
Show child attributes
Timestamp of the most recent run.
Team that owns the workflow; null for org-pool workflows.
Whether the caller's organization has starred the workflow.
Whether the graph is locked against edits.
Number of blocks in the workflow. Present on list responses, where the graph itself is omitted, so a caller can tell an empty workflow from a populated one without fetching every definition.
A workflow expressed as a directed graph of blocks and edges.
- WorkflowGraph · object
- Workflow Definition · object[]
- Workflow Definition · object
Show child attributes
Show child attributes
Was this page helpful?