About API Reference
Linked Account
Config
Config Fields
Webhooks
Public Workflows
Schedule
Session Token
Cobalt Hosted
Get draft of Public Workflow
curl --request GET \
--url https://api.gocobalt.io/api/v2/public/workflow/:workflow_id/edit \
--header 'Authorization: Bearer {Session_token}' \
{
"_id":"67dd411b6d0ac47859420c0f",
"createdAt":"2025-03-21T09:25:48.384Z",
"updatedAt":"2025-03-21T09:25:48.384Z",
"name":"My API Workflow - Draft",
"org_id":"669e076623c652d7aff25eb9",
"nodes":[
{
"id":"1",
"incoming_nodes":[],
"outgoing_nodes":[],
"data":null,
"type":"start",
"position":{
"x":396,
"y":112
},
"name":"Start",
"status":"Ready",
"parsed_response":{},
"request":{},
"configurable":false,
"input_data":{},
"style":{},
"maximum_attempts":1,
"attempts_made":0,
"is_batch":false,
"triggers":[
{
"application":"Cobalt",
"event":"API Call",
"_id":"67dd309c8a29c6f92d8bb45d"
}
],
"trigger_cron":null,
"event_to_dynamic_var_map":[]
},
{
"id":"2",
"incoming_nodes":[],
"outgoing_nodes":[],
"data":null,
"type":"ai_code_executor",
"position":{
"x":396,
"y":272
},
"name":"Step 1",
"status":"Ready",
"parsed_response":{},
"request":{},
"configurable":false,
"input_data":{},
"style":{},
"maximum_attempts":1,
"attempts_made":0,
"is_batch":false,
"action":"no_action"
}
],
"published":false,
"associated_application":"669e0767d6c828b822c4f656",
"workflow_environment":[
"test",
"production"
],
"index_order":36,
"data_slots":[],
"test_instance_meta_data":{
"trigger":{
"application":"Cobalt",
"event":"API Call",
"_id":"67dd309c8a29c6f92d8bb45d"
},
"environment":"test",
"linked_account_id":"cobalt_test_user"
},
"description":"<string>",
"icon":"",
"edges":[
{
"source":"1",
"target":"2",
"sourceHandle":null,
"targetHandle":null,
"type":"smoothstep",
"id":"1efef0cc-b4aa-4a04-804f-55abdccd8db3"
}
],
"autoEnable":false,
"hide_in_config":false,
"is_v2":true,
"linked_account_id":"dhananjay",
"public_access_workflow":true,
"associated_public_worklfow":"67dd309c8a29c6f92d8bb45e",
"version":null,
"__v":0
}
This API creates a draft/editable version of a public workflow.
Request description
Headers
Unlike other API’s in this documentation, this API requires the Session token as a bearer token for authentication.
Path Parameters
Id of the workflow to create draft version.
curl --request GET \
--url https://api.gocobalt.io/api/v2/public/workflow/:workflow_id/edit \
--header 'Authorization: Bearer {Session_token}' \
Response description
ID of the workflow
Timestamp when workflow was created
Timestamp of workflow updation.
Workflow name
ID of the org in which workflow is created
An array of object of nodes of the workflow.
Id of the node in workflow
Data in the node
Type of node. Eg: start, ai_code_executor and more.
x and y coordinates of the node.
Name of the node
Current status of the node.
The node is a batch node or not.
Information about the triggers of the workflow. Only available in node of type=start
.
The action added in the node.
This will not be available in field of type = start
, which will rather have the trigger information.
Array of ids of incoming nodes to the node.
Array of ids of outgoing nodes to the node.
The workflow is published or not.
Id of the application associated with workflow
Indexing order in which workflows are shown.
Array of dataslots added to the workflow.
Description of the workflow.
Icon url for the workflow
Whether auto enable for workflow is enabled or not
Whether workflow should be hidden or not
Whether workflow version is v2 or not.
Linked Account ID
The workflow is a public workflow or not.
The Cobalt environments in which workflow is available
Id of the public workflow which is converted to draft mode.
{
"_id":"67dd411b6d0ac47859420c0f",
"createdAt":"2025-03-21T09:25:48.384Z",
"updatedAt":"2025-03-21T09:25:48.384Z",
"name":"My API Workflow - Draft",
"org_id":"669e076623c652d7aff25eb9",
"nodes":[
{
"id":"1",
"incoming_nodes":[],
"outgoing_nodes":[],
"data":null,
"type":"start",
"position":{
"x":396,
"y":112
},
"name":"Start",
"status":"Ready",
"parsed_response":{},
"request":{},
"configurable":false,
"input_data":{},
"style":{},
"maximum_attempts":1,
"attempts_made":0,
"is_batch":false,
"triggers":[
{
"application":"Cobalt",
"event":"API Call",
"_id":"67dd309c8a29c6f92d8bb45d"
}
],
"trigger_cron":null,
"event_to_dynamic_var_map":[]
},
{
"id":"2",
"incoming_nodes":[],
"outgoing_nodes":[],
"data":null,
"type":"ai_code_executor",
"position":{
"x":396,
"y":272
},
"name":"Step 1",
"status":"Ready",
"parsed_response":{},
"request":{},
"configurable":false,
"input_data":{},
"style":{},
"maximum_attempts":1,
"attempts_made":0,
"is_batch":false,
"action":"no_action"
}
],
"published":false,
"associated_application":"669e0767d6c828b822c4f656",
"workflow_environment":[
"test",
"production"
],
"index_order":36,
"data_slots":[],
"test_instance_meta_data":{
"trigger":{
"application":"Cobalt",
"event":"API Call",
"_id":"67dd309c8a29c6f92d8bb45d"
},
"environment":"test",
"linked_account_id":"cobalt_test_user"
},
"description":"<string>",
"icon":"",
"edges":[
{
"source":"1",
"target":"2",
"sourceHandle":null,
"targetHandle":null,
"type":"smoothstep",
"id":"1efef0cc-b4aa-4a04-804f-55abdccd8db3"
}
],
"autoEnable":false,
"hide_in_config":false,
"is_v2":true,
"linked_account_id":"dhananjay",
"public_access_workflow":true,
"associated_public_worklfow":"67dd309c8a29c6f92d8bb45e",
"version":null,
"__v":0
}
curl --request GET \
--url https://api.gocobalt.io/api/v2/public/workflow/:workflow_id/edit \
--header 'Authorization: Bearer {Session_token}' \
{
"_id":"67dd411b6d0ac47859420c0f",
"createdAt":"2025-03-21T09:25:48.384Z",
"updatedAt":"2025-03-21T09:25:48.384Z",
"name":"My API Workflow - Draft",
"org_id":"669e076623c652d7aff25eb9",
"nodes":[
{
"id":"1",
"incoming_nodes":[],
"outgoing_nodes":[],
"data":null,
"type":"start",
"position":{
"x":396,
"y":112
},
"name":"Start",
"status":"Ready",
"parsed_response":{},
"request":{},
"configurable":false,
"input_data":{},
"style":{},
"maximum_attempts":1,
"attempts_made":0,
"is_batch":false,
"triggers":[
{
"application":"Cobalt",
"event":"API Call",
"_id":"67dd309c8a29c6f92d8bb45d"
}
],
"trigger_cron":null,
"event_to_dynamic_var_map":[]
},
{
"id":"2",
"incoming_nodes":[],
"outgoing_nodes":[],
"data":null,
"type":"ai_code_executor",
"position":{
"x":396,
"y":272
},
"name":"Step 1",
"status":"Ready",
"parsed_response":{},
"request":{},
"configurable":false,
"input_data":{},
"style":{},
"maximum_attempts":1,
"attempts_made":0,
"is_batch":false,
"action":"no_action"
}
],
"published":false,
"associated_application":"669e0767d6c828b822c4f656",
"workflow_environment":[
"test",
"production"
],
"index_order":36,
"data_slots":[],
"test_instance_meta_data":{
"trigger":{
"application":"Cobalt",
"event":"API Call",
"_id":"67dd309c8a29c6f92d8bb45d"
},
"environment":"test",
"linked_account_id":"cobalt_test_user"
},
"description":"<string>",
"icon":"",
"edges":[
{
"source":"1",
"target":"2",
"sourceHandle":null,
"targetHandle":null,
"type":"smoothstep",
"id":"1efef0cc-b4aa-4a04-804f-55abdccd8db3"
}
],
"autoEnable":false,
"hide_in_config":false,
"is_v2":true,
"linked_account_id":"dhananjay",
"public_access_workflow":true,
"associated_public_worklfow":"67dd309c8a29c6f92d8bb45e",
"version":null,
"__v":0
}