Skip to main content
POST
Create a draft
Requires Editor, Admin, or Owner. If a draft already exists, this operation returns that draft. It does not replace an existing draft or publish changes. Save subsequent changes with Update agent, then validate and publish. The response contains the version record, including its definition ID and workflow_json. An agent outside the requested workspace returns 404.

Authorizations

Authorization
string
header
required

Bandwidth Labs OAuth access token. Uses the user's selected workspace; the workspace header is not required. Do not also send an API key. Bearer-only operations may additionally require the Labs super_user role.

Headers

X-VOAI-ORGANIZATION-ID
string | null

Required with X-BW-LABS-AGENTS-API-KEY: the positive local workspace ID to access. The key owner must be a current member. Missing or invalid IDs return 400; non-member workspaces return 403. Not required for bearer authentication, which uses the user's selected workspace.

Path Parameters

workflow_id
integer
required

Response

Successful Response

created_at
string<date-time>
required
id
integer
required
status
string
required
version_number
integer
required
workflow_json
Workflow Json · object
required
published_at
string<date-time> | null
template_context_variables
Template Context Variables · object | null
workflow_configurations
Workflow Configurations · object | null