Overview
Workflow templates are reusable configurations that proposers can use to quickly create workflows. Templates store roles, steps, work items, and other settings that can be applied to new workflow instances. Templates can be:- Proposer templates - Created by individual proposers for their own use
- Default templates - Created by admins, available to all proposers
Get Workflow Templates
GET /proposers/workflow-templates
Auth: Proposer role required
Description: Returns all templates available to the authenticated proposer:
- Templates created by the proposer (
owner_user_idmatches caller) - Default templates created by admins (
is_default: true)
WorkflowTemplate objects
Create Workflow Template
POST /proposers/workflow-templates
Auth: Proposer role required
Request Body:
Template name (must not be empty)
Description of template purpose and contents
Frequency:
one_time, daily, weekly, or monthlyStart time in format:
- ISO 8601 datetime:
2024-03-15T10:00:00Z - Time only (for relative scheduling):
10:00:00or10:00 - Unix timestamp:
1710496800
Optional series ID for recurring workflow linkage
Supervisor DID (if supervisor required)
Supervisor payment in wei (if supervisor required)
Array of workflow role definitions (same as workflow creation)
Array of workflow step definitions (same as workflow creation)
201- Template created successfully400- Invalid request (empty title, invalid recurrence, unknown credentials, etc.)403- User not approved as proposer500- Server error
Create Default Template (Admin)
POST /admin/workflow-templates/default
Auth: Admin role required
Request Body: Same as regular template creation
Description: Creates a default template accessible to all proposers. The template has is_default: true and owner_user_id: null.
Response Codes:
201- Default template created400- Invalid request403- Not authenticated as admin500- Server error
Delete Workflow Template
DELETE /proposers/workflow-templates/{template_id}
Auth: Proposer role required (must be template owner)
Path Parameters:
Template UUID
200- Template deleted successfully404- Template not found or not owned by proposer403- Not authenticated or not template owner500- Server error
Schema Reference
WorkflowTemplate Object
WorkflowRoleCreateInput Object
WorkflowStepCreateInput Object
WorkflowWorkItemCreateInput Object
WorkflowDropdownOptionCreateInput Object
Using Templates to Create Workflows
Templates provide the structure for workflows, but you must still specify:title(actual workflow title, not template title)description(actual workflow description)start_at(specific datetime for this workflow instance)
- Fetches available templates via
GET /proposers/workflow-templates - User selects a template
- Frontend pre-fills workflow creation form with template data
- User customizes title, description, start date, and any other fields
- Frontend submits to
POST /proposers/workflowswith template data + customizations
Related Endpoints
- Create Workflow - Use template data to create a workflow
- Credentials API - List available credential requirements