Skip to main content

Create from Template

POST/api/v1/workflow/create/template

Create a new workflow from a natural language template request. This endpoint: 1. Uses mps_service_key_client to call MPS workflow API 2. Passes organization ID (authenticated mode) or created_by (OSS mode) 3. Creates the workflow in the database Args: request: The template creation request with call_type, use_case, and activity_description user: The authenticated user Returns: The created workflow Raises: HTTPException: If MPS API call fails

cURL example

curl -X POST \
  'http://localhost:8000/api/v1/workflow/create/template' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{}'

Parameters

NameLocationTypeDescription
authorizationheaderobject
X-API-Keyheaderobject

Request body

application/json
View schema
{
  "$ref": "#/components/schemas/CreateWorkflowTemplateRequest"
}

Responses

200Successful Response
application/json
View schema
{
  "$ref": "#/components/schemas/WorkflowResponse"
}
404Not found
422Validation Error
application/json
View schema
{
  "$ref": "#/components/schemas/HTTPValidationError"
}