OpenAPI Specification
openapi: 3.1.0
info:
description: Workflow management API for B3OS
title: B3OS Workflow Action Admin API
version: '1.0'
tags:
- name: Admin
paths:
/v1/admin/ai-profiles:
get:
description: List all org AI profiles with organization info and memory counts
parameters:
- description: Limit (1-100, default 20)
in: query
name: limit
schema:
type: integer
- description: Offset (default 0)
in: query
name: offset
schema:
type: integer
- description: Search by org name or slug
in: query
name: search
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminListAIProfilesSuccessResponse'
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
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
'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
summary: List all org AI profiles (admin)
tags:
- Admin
/v1/admin/ai-prompts:
get:
description: Returns all prompt templates used by the AI agent
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminListAIPromptsSuccessResponse'
description: OK
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
summary: List all AI prompt templates (admin)
tags:
- Admin
/v1/admin/chat-conversations:
get:
description: List AI chat conversations grouped by workflow/session, with message counts
parameters:
- description: Limit (1-100, default 20)
in: query
name: limit
schema:
type: integer
- description: Offset (default 0)
in: query
name: offset
schema:
type: integer
- description: Filter by organization ID
in: query
name: org_id
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminListChatConversationsSuccessResponse'
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
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
'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
summary: List chat conversations (admin)
tags:
- Admin
/v1/admin/chat-messages:
get:
description: List all AI chat messages across organizations, optionally filtered by org, workflow, or session
parameters:
- description: Limit (1-100, default 20)
in: query
name: limit
schema:
type: integer
- description: Offset (default 0)
in: query
name: offset
schema:
type: integer
- description: Filter by organization ID
in: query
name: org_id
schema:
type: string
- description: Filter by workflow ID
in: query
name: workflow_id
schema:
type: string
- description: Filter by session ID
in: query
name: session_id
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminListChatMessagesSuccessResponse'
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
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
'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
summary: List all chat messages (admin)
tags:
- Admin
/v1/admin/organizations:
get:
description: List all organizations with CU balance and member count
parameters:
- description: Limit (1-100, default 20)
in: query
name: limit
schema:
type: integer
- description: Offset (default 0)
in: query
name: offset
schema:
type: integer
- description: Search by name or slug
in: query
name: search
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminListOrganizationsSuccessResponse'
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
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
'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
summary: List all organizations (admin)
tags:
- Admin
/v1/admin/organizations/{orgId}:
get:
description: Get detailed organization info with members and workflow count
parameters:
- description: Organization ID
in: path
name: orgId
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminGetOrganizationSuccessResponse'
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
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
'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
summary: Get organization details (admin)
tags:
- Admin
/v1/admin/organizations/{orgId}/cu/adjust:
post:
description: Adjust CU balance for any organization
parameters:
- description: Organization ID
in: path
name: orgId
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
oneOf:
- type: object
- $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_service_cu.AdjustParams'
summary: body
description: Adjust parameters
description: Adjust parameters
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdjustCUSuccessResponse'
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
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
'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
summary: Adjust CU (admin)
tags:
- Admin
/v1/admin/organizations/{orgId}/cu/deposit:
post:
description: Deposit CU to any organization
parameters:
- description: Organization ID
in: path
name: orgId
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
oneOf:
- type: object
- $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_service_cu.DepositParams'
summary: body
description: Deposit parameters
description: Deposit parameters
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DepositCUSuccessResponse'
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
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
'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
summary: Deposit CU (admin)
tags:
- Admin
/v1/admin/organizations/{orgId}/knowledge:
get:
description: List knowledge/memory entries for an organization with optional source_type filter
parameters:
- description: Organization ID
in: path
name: orgId
required: true
schema:
type: string
- description: Filter by source type (memory, manual, workflow, connector, run_pattern)
in: query
name: source_type
schema:
type: string
- description: Limit (1-100, default 20)
in: query
name: limit
schema:
type: integer
- description: Offset (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/AdminListOrgKnowledgeSuccessResponse'
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
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
'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
summary: List org knowledge entries (admin)
tags:
- Admin
/v1/admin/runs/{runId}:
get:
description: Retrieve detailed run info including execution state
parameters:
- description: Run ID
in: path
name: runId
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminGetRunSuccessResponse'
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
summary: Get run details (admin)
tags:
- Admin
/v1/admin/templates:
get:
description: List all workflow templates with organization info and filters
parameters:
- description: Limit (1-100, default 20)
in: query
name: limit
schema:
type: integer
- description: Offset (default 0)
in: query
name: offset
schema:
type: integer
- description: Search by template name
in: query
name: search
schema:
type: string
- description: 'Filter by visibility: org, public'
in: query
name: visibility
schema:
type: string
- description: 'Filter by promoted status: true, false'
in: query
name: isPromoted
schema:
type: string
- description: Filter by organization ID
in: query
name: orgId
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminListTemplatesSuccessResponse'
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
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
'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
summary: List all templates (admin)
tags:
- Admin
/v1/admin/templates/{templateId}:
patch:
description: Update template visibility and/or promoted status
parameters:
- description: Template ID
in: path
name: templateId
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
oneOf:
- type: object
- $ref: '#/components/schemas/AdminUpdateTemplateParams'
summary: body
description: Update parameters
description: Update parameters
required: true
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
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
'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
summary: Update template (admin)
tags:
- Admin
/v1/admin/workflows:
get:
description: List all workflows with organization info and filters
parameters:
- description: Limit (1-100, default 20)
in: query
name: limit
schema:
type: integer
- description: Offset (default 0)
in: query
name: offset
schema:
type: integer
- description: 'Filter by status: draft, active, paused, archived'
in: query
name: status
schema:
type: string
- description: Search by workflow name
in: query
name: search
schema:
type: string
- description: Filter by organization ID
in: query
name: orgId
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminListWorkflowsSuccessResponse'
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
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
'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
summary: List all workflows (admin)
tags:
- Admin
/v1/admin/workflows/{workflowId}:
get:
description: Get detailed workflow info including definition
parameters:
- description: Workflow ID
in: path
name: workflowId
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminGetWorkflowSuccessResponse'
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
summary: Get workflow details (admin)
tags:
- Admin
/v1/admin/workflows/{workflowId}/runs:
get:
description: List runs for a workflow with pagination
parameters:
- description: Workflow ID
in: path
name: workflowId
required: true
schema:
type: string
- description: Limit (1-100, default 20)
in: query
name: limit
schema:
type: integer
- description: Offset (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/AdminListWorkflowRunsSuccessResponse'
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
'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
summary: List workflow runs (admin)
tags:
- Admin
/v1/admin/workflows/{workflowId}/{action}:
post:
description: Change workflow status (publish, pause, resume, archive)
parameters:
- description: Workflow ID
in: path
name: workflowId
required: true
schema:
type: string
- description: Action (publish, pause, resume, archive)
in: path
name: action
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUpdateWorkflowStatusSuccessResponse'
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
'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
summary: Update workflow status (admin)
tags:
- Admin
/v1/admin/onboarding/analytics:
get:
description: '[ADMIN] Get onboarding analytics'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminGetOnboardingAnalyticsSuccessResponse'
description: OK
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
'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:
- Admin
/v1/admin/onboarding/questions:
get:
description: '[ADMIN] Get all onboarding questions (including inactive)'
parameters:
- description: 'Scope: ''user'' or ''org'' (empty = all)'
in: query
name: scope
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminGetAllOnboardingQuestionsSuccessResponse'
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
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
'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:
- Admin
post:
description: '[ADMIN] Create a new onboarding question'
requestBody:
content:
application/json:
schema:
oneOf:
- type: object
- $ref: '#/components/schemas/AdminCreateOnboardingQuestionParams'
summary: body
description: Question data
description: Question data
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateOnboardingQuestionSuccessResponse'
description: Created
'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
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
'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:
- Admin
/v1/admin/onboarding/questions/{questionId}:
delete:
description: '[ADMIN] Delete an onboarding question'
parameters:
- description: Question ID
in: path
name: questionId
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminDeleteOnboardingQuestionSuccessResponse'
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
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
'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:
- Admin
patch:
description: '[ADMIN] Update an existing onboarding question'
parameters:
- description: Question ID
in: path
name: questionId
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
oneOf:
- type: object
- $ref: '#/components/schemas/AdminUpdateOnboardingQuestionParams'
summary: body
description: Update data
description: Update data
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUpdateOnboardingQuestionSuccessResponse'
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
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
'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:
# --- truncated at 32 KB (64 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/b3/refs/heads/main/openapi/b3-admin-api-openapi.yml