Skip to main content

Workflows API Reference

Overview

The Workflows API enables you to create, manage, and execute complex workflows in Gentic.

Endpoints

List Workflows

GET /workflows

Returns a list of all workflows.

Create Workflow

POST /workflows

Creates a new workflow.

Get Workflow

GET /workflows/{workflowId}

Retrieves details of a specific workflow.

Update Workflow

PUT /workflows/{workflowId}

Updates an existing workflow.

Delete Workflow

DELETE /workflows/{workflowId}

Deletes a workflow.

Execute Workflow

POST /workflows/{workflowId}/execute

Executes a workflow with optional input parameters.

Request/Response Examples

Create Workflow

{
"name": "Customer Support Workflow",
"description": "Handles customer support inquiries",
"steps": [
{
"type": "classification",
"config": {
"model": "gpt-4",
"categories": ["billing", "technical", "general"]
}
},
{
"type": "search",
"config": {
"knowledgeSourceId": "kb-123",
"query": "{{input}}"
}
},
{
"type": "generation",
"config": {
"model": "gpt-4",
"prompt": "Based on the search results, provide a helpful response"
}
}
]
}

Execute Workflow

{
"input": "How do I reset my password?",
"parameters": {
"customerId": "cust-123",
"priority": "high"
}
}

Error Codes

  • 400: Bad Request
  • 401: Unauthorized
  • 403: Forbidden
  • 404: Not Found
  • 429: Too Many Requests
  • 500: Internal Server Error

Rate Limits

  • 20 requests per minute per API key
  • 200 requests per hour per API key

Next Steps