curl -X GET 'https://api.anyformat.ai/v2/workflows/550e8400-e29b-41d4-a716-446655440000/' \
-H 'Authorization: Bearer YOUR_API_KEY'
import requests
workflow_id = "550e8400-e29b-41d4-a716-446655440000"
url = f"https://api.anyformat.ai/v2/workflows/{workflow_id}/"
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
print(response.json())
const workflowId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(`https://api.anyformat.ai/v2/workflows/${workflowId}/`, {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);
interface Field {
name: string;
description: string;
data_type: string;
}
interface WorkflowResponse {
id: string;
name: string;
description: string | null;
created_at: string;
updated_at: string;
fields: Field[] | null;
}
const workflowId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(`https://api.anyformat.ai/v2/workflows/${workflowId}/`, {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
if (!response.ok) {
throw new Error(`API error: ${response.status}`);
}
const data: WorkflowResponse = await response.json();
console.log(data);
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Invoice Processing",
"description": "Extract data from invoice documents",
"created_at": "2024-03-24T12:00:00.000Z",
"updated_at": "2024-03-24T12:00:00.000Z",
"fields": [
{
"name": "invoice_number",
"description": "The unique invoice identifier",
"data_type": "string"
},
{
"name": "total_amount",
"description": "Total invoice amount including tax",
"data_type": "float"
}
]
}
v2 Workflows
Get Workflow
Retrieve a workflow by ID including its field definitions
GET
/
v2
/
workflows
/
{workflow_id}
/
curl -X GET 'https://api.anyformat.ai/v2/workflows/550e8400-e29b-41d4-a716-446655440000/' \
-H 'Authorization: Bearer YOUR_API_KEY'
import requests
workflow_id = "550e8400-e29b-41d4-a716-446655440000"
url = f"https://api.anyformat.ai/v2/workflows/{workflow_id}/"
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
print(response.json())
const workflowId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(`https://api.anyformat.ai/v2/workflows/${workflowId}/`, {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);
interface Field {
name: string;
description: string;
data_type: string;
}
interface WorkflowResponse {
id: string;
name: string;
description: string | null;
created_at: string;
updated_at: string;
fields: Field[] | null;
}
const workflowId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(`https://api.anyformat.ai/v2/workflows/${workflowId}/`, {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
if (!response.ok) {
throw new Error(`API error: ${response.status}`);
}
const data: WorkflowResponse = await response.json();
console.log(data);
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Invoice Processing",
"description": "Extract data from invoice documents",
"created_at": "2024-03-24T12:00:00.000Z",
"updated_at": "2024-03-24T12:00:00.000Z",
"fields": [
{
"name": "invoice_number",
"description": "The unique invoice identifier",
"data_type": "string"
},
{
"name": "total_amount",
"description": "Total invoice amount including tax",
"data_type": "float"
}
]
}
To update a workflow’s fields or configuration, send the new typed graph to
PUT /v2/workflows/{workflow_id}/. See Edit a workflow. Each update mints a new workflow version atomically. Earlier versions stay available for historical runs.curl -X GET 'https://api.anyformat.ai/v2/workflows/550e8400-e29b-41d4-a716-446655440000/' \
-H 'Authorization: Bearer YOUR_API_KEY'
import requests
workflow_id = "550e8400-e29b-41d4-a716-446655440000"
url = f"https://api.anyformat.ai/v2/workflows/{workflow_id}/"
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
print(response.json())
const workflowId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(`https://api.anyformat.ai/v2/workflows/${workflowId}/`, {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);
interface Field {
name: string;
description: string;
data_type: string;
}
interface WorkflowResponse {
id: string;
name: string;
description: string | null;
created_at: string;
updated_at: string;
fields: Field[] | null;
}
const workflowId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(`https://api.anyformat.ai/v2/workflows/${workflowId}/`, {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
if (!response.ok) {
throw new Error(`API error: ${response.status}`);
}
const data: WorkflowResponse = await response.json();
console.log(data);
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Invoice Processing",
"description": "Extract data from invoice documents",
"created_at": "2024-03-24T12:00:00.000Z",
"updated_at": "2024-03-24T12:00:00.000Z",
"fields": [
{
"name": "invoice_number",
"description": "The unique invoice identifier",
"data_type": "string"
},
{
"name": "total_amount",
"description": "Total invoice amount including tax",
"data_type": "float"
}
]
}
Authorizations
API key issued from app.anyformat.ai/api-key. Send as Authorization: Bearer <key>.
Path Parameters
Response
Successful Response
A workflow defines the extraction template — what fields to extract from documents, their types, and validation rules.
Unique identifier of the workflow (UUID).
Example:
"0686bb97-8c30-70f0-8000-97669e000eb8"
Human-readable name of the workflow.
Example:
"Invoice Processing"
Optional description of what this workflow extracts.
Example:
"A workflow for processing invoices and retrieving invoice details."
Timestamp when the workflow was created (ISO 8601).
Timestamp when the workflow was last modified (ISO 8601).
List of extraction field definitions configured for this workflow. null if not yet configured.

