API Reference
List Workflows
Get all available workflows with filtering options.
Endpoint
GET
/workflows/v1?category=litigation&type=document-processing&limit=10curl -X GET https://api.case.dev/workflows/v1?category=litigation&type=document-processing&limit=10 \
-H "Authorization: Bearer sk_case_your_api_key_here" \
-H "Content-Type: application/json"Query Parameters
category(optional): Filter by category (litigation,regulatory,transactional,corporate)sub_category(optional): Filter by sub-categorytype(optional): Filter by type (document-processing,case-intake,compliance,transactional)published(optional): Only published workflows (default:true)limit(optional): Max results (default: 50, max: 100)offset(optional): Pagination offset
Example Request
Example Response
Search Workflows
Semantic search using vector embeddings to find workflows by natural language description.
Endpoint
POST
/workflows/v1/searchcurl -X POST https://api.case.dev/workflows/v1/search \
-H "Authorization: Bearer sk_case_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"query": "process deposition documents",
"limit": 10,
"category": "litigation"
}'Example Request
Example Response
Get Workflow
Get detailed metadata for a specific workflow.
Endpoint
GET
/workflows/v1/uuidcurl -X GET https://api.case.dev/workflows/v1/uuid \
-H "Authorization: Bearer sk_case_your_api_key_here" \
-H "Content-Type: application/json"Example Request
Example Response
Execute Workflow
Execute a workflow with your input. Workflows orchestrate multiple steps including document processing, AI analysis, and data transformation.
Endpoint
POST
/workflows/v1/uuid/executecurl -X POST https://api.case.dev/workflows/v1/uuid/execute \
-H "Authorization: Bearer sk_case_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"input": {
"text": "Full deposition transcript text here..."
},
"options": {
"model": "anthropic/claude-sonnet-4.5",
"temperature": 0.3,
"max_tokens": 4000,
"format": "json"
},
"variables": {
"case_name": "Smith v. Hospital",
"date": "2024-01-15"
}
}'Input Types
You can provide input in three ways:
1. Text Input:
2. Document URL:
3. Vault Object:
Options
model(optional): LLM model to use (default: template's recommended model)temperature(optional): Randomness, 0-2 (default: 0.7)max_tokens(optional): Maximum tokens to generate (default: 4096)format(optional): Output format -json,text, orpdf(default:json)
Variables
Pass custom variables for prompt substitution:
Example Request (JSON Output)
Example Response (JSON Format)
Example Request (PDF Output)
Example Response (PDF Format)
Synchronous Execution
All workflow executions are currently synchronous - they complete immediately and return results in the response. No polling or status checking is needed.
Async execution tracking is planned for future releases to support long-running workflows.