B3 Workflows API
The Workflows API from B3 — 22 operation(s) for workflows.
The Workflows API from B3 — 22 operation(s) for workflows.
openapi: 3.1.0
info:
description: Workflow management API for B3OS
title: B3OS Workflow Action Workflows API
version: '1.0'
tags:
- name: Workflows
paths:
/v1/workflows:
get:
description: Get all workflows
parameters:
- description: Number of items (default 20, max 100)
in: query
name: limit
schema:
type: integer
- description: Offset for pagination (default 0)
in: query
name: offset
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ListWorkflowsSuccessResponse'
description: OK
tags:
- Workflows
post:
description: Create a new workflow
requestBody:
content:
application/json:
schema:
oneOf:
- type: object
- $ref: '#/components/schemas/CreateWorkflowParams'
summary: request
description: Workflow details
description: Workflow details
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CreateWorkflowSuccessResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Bad Request
tags:
- Workflows
/v1/workflows/validate:
post:
description: Validate a workflow definition without saving
requestBody:
content:
application/json:
schema:
oneOf:
- type: object
- $ref: '#/components/schemas/ValidateWorkflowParams'
summary: request
description: Workflow definition and name to validate
description: Workflow definition and name to validate
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ValidateWorkflowSuccessResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Bad Request
tags:
- Workflows
/v1/workflows/{id}:
delete:
description: Archive a workflow (soft delete)
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.SuccessResponse'
description: OK
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
get:
description: Get a workflow by ID
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetWorkflowSuccessResponse'
description: OK
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
put:
description: Update a workflow (creates new version due to immutability)
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
oneOf:
- type: object
- $ref: '#/components/schemas/UpdateWorkflowParams'
summary: request
description: New workflow definition
description: New workflow definition
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateWorkflowSuccessResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Bad Request
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
/v1/workflows/{id}/draft:
delete:
description: Discard the draft version of a workflow
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.SuccessResponse'
description: OK
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
get:
description: Get the draft version of a workflow
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetWorkflowSuccessResponse'
description: OK
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
/v1/workflows/{id}/live:
get:
description: Get the live (active/paused) version of a workflow
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetWorkflowSuccessResponse'
description: OK
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
/v1/workflows/{id}/pause:
post:
description: Pause a workflow
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.SuccessResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Bad Request
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
/v1/workflows/{id}/publish:
post:
description: Publish a draft workflow (validates cronjob intervals, activates)
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
oneOf:
- type: object
- $ref: '#/components/schemas/PublishWorkflowParams'
summary: body
description: Optional parameters
description: Optional parameters
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.SuccessResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Bad Request
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
'409':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Conflict
tags:
- Workflows
/v1/workflows/{id}/refill:
post:
description: Refill remaining runs for a workflow
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
oneOf:
- type: object
- $ref: '#/components/schemas/RefillWorkflowParams'
summary: request
description: New remain_runs value
description: New remain_runs value
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/RefillWorkflowSuccessResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Bad Request
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
/v1/workflows/{id}/regenerate-descriptions:
post:
description: Regenerate AI descriptions for a workflow
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/RegenerateDescriptionsSuccessResponse'
description: OK
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Internal Server Error
tags:
- Workflows
/v1/workflows/{id}/resume:
post:
description: Resume a paused workflow
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.SuccessResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Bad Request
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
/v1/workflows/{id}/rollback:
post:
description: Rollback workflow to a previous version
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
oneOf:
- type: object
- $ref: '#/components/schemas/RollbackWorkflowParams'
summary: body
description: Rollback params
description: Rollback params
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/RollbackWorkflowSuccessResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Bad Request
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
/v1/workflows/{id}/run:
post:
description: Run a workflow with optional payload. Works for draft and active workflows. Does not count against maxRuns or enforce cooldown.
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
oneOf:
- type: object
- $ref: '#/components/schemas/RunParams'
summary: body
description: Optional payload
description: Optional payload
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/RunSuccessResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Bad request or workflow is not runnable (paused/archived)
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Workflow not found
tags:
- Workflows
/v1/workflows/{id}/runs:
get:
description: List all runs for a specific workflow
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
- description: Number of items (default 20, max 100)
in: query
name: limit
schema:
type: integer
- description: Offset for pagination (default 0)
in: query
name: offset
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ListRunsSuccessResponse'
description: OK
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
/v1/workflows/{id}/runs/count:
get:
description: Count runs for a specific workflow, grouped by status
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CountWorkflowRunsSuccessResponse'
description: OK
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
/v1/workflows/{id}/storage:
delete:
description: Clear all storage data for a workflow
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
content:
application/json:
schema:
additionalProperties: {}
type: object
description: OK
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
/v1/workflows/{id}/trigger-info:
get:
description: Get trigger info (e.g. Pipedream email address) for a workflow
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetTriggerInfoSuccessResponse'
description: OK
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
/v1/workflows/{id}/ui-metadata:
patch:
description: Update workflow UI metadata (node positions) in-place
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
oneOf:
- type: object
- $ref: '#/components/schemas/UpdateWorkflowUIMetadataParams'
summary: request
description: UI metadata
description: UI metadata
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateWorkflowUIMetadataSuccessResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Bad Request
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
'409':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Conflict
tags:
- Workflows
/v1/workflows/{id}/versions:
get:
description: List all versions of a workflow
parameters:
- description: Workflow ID (any version)
in: path
name: id
required: true
schema:
type: string
- description: Number of items (default 20, max 100)
in: query
name: limit
schema:
type: integer
- description: Offset for pagination (default 0)
in: query
name: offset
schema:
type: integer
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ListWorkflowVersionsSuccessResponse'
description: OK
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
/v1/workflows/{id}/versions/count:
get:
description: Count total versions for a specific workflow
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CountWorkflowVersionsSuccessResponse'
description: OK
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
/v1/workflows/{id}/versions/{versionNumber}:
get:
description: Get a specific version of a workflow by version number
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
- description: Version number
in: path
name: versionNumber
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetWorkflowVersionSuccessResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Bad Request
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
/v1/workflows/{id}/widget:
delete:
description: Disable public widget for a workflow
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.SuccessResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Bad Request
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
post:
description: Enable public widget for a workflow
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
oneOf:
- type: object
- $ref: '#/components/schemas/PublishWidgetParams'
summary: body
description: Widget configuration
description: Widget configuration
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PublishWidgetSuccessResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Bad Request
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Workflows
/v1/workflows/{id}/runs/stream:
get:
description: SSE endpoint for real-time notifications when runs start/complete for a workflow.
parameters:
- description: Workflow ID
in: path
name: id
required: true
schema:
type: string
responses:
'200':
content:
text/event-stream:
schema:
type: string
description: SSE stream with workflow run events
'400':
content:
text/event-stream:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Bad Request
'403':
content:
text/event-stream:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
summary: Stream workflow run events
tags:
- Workflows
components:
schemas:
PublishWidgetSuccessResponse:
properties:
code:
example: 200
type: integer
data:
$ref: '#/components/schemas/PublicWidgetData'
message:
example: success
type: string
requestId:
example: abc-123
type: string
type: object
RefillWorkflowData:
properties:
remainRuns:
type: integer
workflowId:
type: string
type: object
CreateWorkflowParams:
properties:
cooldownMs:
minimum: 1000
type: integer
definition:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.WorkflowDefinition'
description:
type: string
maxRuns:
maximum: 99999
minimum: 1
type: integer
name:
type: string
propValues:
additionalProperties: {}
description: 'Optional: template prop values'
type: object
sessionId:
description: 'Optional: migrate chat history from session to workflow'
type: string
templateId:
description: 'Optional: template ID to track fork count'
type: string
templateProps:
description: 'Optional: template prop schema (for copy-to-org with sanitized props)'
items:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.TemplateProp'
type: array
uniqueItems: false
uiMetadata:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.WorkflowUIMetadata'
required:
- definition
- description
- name
type: object
github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.ConnectorReference:
description: nil if action doesn't need connector
properties:
id:
description: Connector ID (or subOrgId for turnkey)
type: string
type:
description: Connector type (e.g., "slack", "turnkey")
type: string
type: object
github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.NodePosition:
properties:
x:
type: number
y:
type: number
type: object
github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.WorkflowInput:
properties:
description:
type: string
key:
type: string
required:
type: boolean
type:
description: '"string", "number", "boolean", "object", "array"'
type: string
type: object
ListWorkflowsSuccessResponse:
properties:
code:
example: 200
type: integer
data:
$ref: '#/components/schemas/PaginatedData-schemas_WorkflowListItem'
message:
example: success
type: string
requestId:
example: abc-123
type: string
type: object
PublishWidgetParams:
properties:
buttonLabel:
description: ButtonLabel is the text displayed on the trigger button (optional, defaults to "Send")
maxLength: 50
type: string
description:
description: Description explains what the workflow does (optional)
maxLength: 500
type: string
maxAmount:
description: MaxAmount is the maximum amount allowed per trigger (optional)
type: string
minAmount:
description: MinAmount is the minimum amount required to trigger (optional)
type: string
title:
description: Title is the display title for the widget (required)
maxLength: 100
type: string
required:
- title
type: object
RefillWorkflowSuccessResponse:
properties:
code:
example: 200
type: integer
data:
$ref: '#/components/schemas/RefillWorkflowData'
message:
example: success
type: string
requestId:
example: abc-123
type: string
type: object
github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CommentReply:
properties:
createdAt:
type: string
createdBy:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.StickyNoteUser'
id:
type: string
text:
type: string
updated
# --- truncated at 32 KB (66 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/b3/refs/heads/main/openapi/b3-workflows-api-openapi.yml