Skip to main content
POST
/
api
/
v2
/
public
/
workflow
curl --location --request POST 'https://api.gocobalt.io/api/v2/public/workflow' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer <session_token>' \
  --data '{
    "name": "<string>",
    "slug": "<string>",
    "description": "<string>"
  }'
{
  "workflow": {
    "_id": "69ce2736ebade1cc4309e7a4",
    "name": "1 via API",
    "published": false,
    "associated_workflow": "69ce2736ebade1cc4309e79e",
    "linked_account_id": "cobalt_test_user",
    "environment": "test",
    "public_access_workflow": true,
    "nodes": [
      {
        "id": "1",
        "type": "start",
        "name": "Start"
      }
    ]
  }
}
This API creates a new private workflow for the authenticated linked account.
A private workflow is a workflow created by a linked account itself — it belongs exclusively to that linked account and is not visible to or shared with the organization.

Request description

This API supports two authentication methods. You can use either a Session Token OR the combination of an Org API key and linked account ID.

Authentication Option 1: Session Token

Authorization
string
required
Bearer token using the session token of the linked account.Format: Bearer <session_token>

Authentication Option 2: Org API Key + Linked Account ID

x-api-key
string
required
Your org-level Cobalt API key.
linked_account_id
string
required
The unique identifier of the linked account to scope the response to.

Body Parameters

name
string
required
Display name of the private workflow.
slug
string
required
Application slug to associate the workflow with.
description
string
Optional description of the workflow.
curl --location --request POST 'https://api.gocobalt.io/api/v2/public/workflow' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer <session_token>' \
  --data '{
    "name": "<string>",
    "slug": "<string>",
    "description": "<string>"
  }'

Response description

Returns the newly created workflow object wrapped under the workflow key. New workflows are always created in an unpublished state with a single Start node.
workflow
object
The newly created private workflow object.
{
  "workflow": {
    "_id": "69ce2736ebade1cc4309e7a4",
    "name": "1 via API",
    "published": false,
    "associated_workflow": "69ce2736ebade1cc4309e79e",
    "linked_account_id": "cobalt_test_user",
    "environment": "test",
    "public_access_workflow": true,
    "nodes": [
      {
        "id": "1",
        "type": "start",
        "name": "Start"
      }
    ]
  }
}