Skip to main content
POST
Create a workflow
Creates an inactive unpublished draft owned by the API key user. Creating a workflow does not publish it or start schedules and webhooks.

Base URL

Dedicated deploymentsReplace api.langdock.com with <your-deployment-url>/api/public in all requests.

Required scopes

This endpoint requires the WORKFLOW_WRITE_API scope (Workflow Write API). The key user also needs the createWorkflows permission.
shareWith requires the shareWorkflows permission. An unknown or unshareable target fails the request with 404 and the workflow is not created.

Parameters

The graph uses the same node and edge schema as the workflow builder. Templates cannot be created through this API.

Example

Response format

Success response (200 OK)

workflow matches the object on Workflow API Overview. Without shareWith, only the key (and workspace admins in governance) can see the draft until it is shared.

Error handling

Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.

Authorizations

Authorization
string
header
required

API key as Bearer token. Format "Bearer YOUR_API_KEY"

Body

application/json
name
string
required
Maximum string length: 60
description
string
Maximum string length: 500
timezone
string

Valid IANA timezone.

initialTriggerKind
enum<string>

Starter trigger. Do not send this together with nodes and edges.

Available options:
manual,
webhook,
scheduled,
form,
integration,
meeting_end
nodes
object[]

Draft nodes. Must be sent together with edges.

edges
object[]

Draft edges. Must be sent together with nodes.

shareWith
object
limits
object

Execution caps. Send null on a field to clear it.

Response

Workflow created successfully