Workflow API
API endpoints for managing automated workflows
Manage automated workflows.
Access: Secret Key Only (sk_live_*)
Create Workflow
Creates a new workflow.
POST /workflow
Request Body:
{
"name": "string",
"description": "string",
"steps": [],
"triggers": []
}
Response 200 OK:
{
"id": "string",
"name": "string",
"teamId": "string",
"createdAt": "2024-01-15T10:30:00Z"
}
List Workflows
Retrieves all workflows for the authenticated team.
GET /workflow
Response 200 OK:
{
"workflows": [
{
"id": "string",
"name": "string",
"description": "string",
"createdAt": "2024-01-15T10:30:00Z"
}
]
}
Get Workflow by ID
Retrieves a specific workflow.
GET /workflow/:id
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | The workflow ID |
Response 200 OK:
{
"id": "string",
"name": "string",
"description": "string",
"steps": [],
"triggers": [],
"createdAt": "2024-01-15T10:30:00Z"
}
Update Workflow
Updates an existing workflow.
PUT /workflow/:id
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | The workflow ID |
Request Body:
{
"name": "string",
"description": "string",
"steps": [],
"triggers": []
}
Response 200 OK:
{
"id": "string",
"name": "string",
"updatedAt": "2024-01-15T10:30:00Z"
}
Delete Workflow
Deletes a workflow.
DELETE /workflow/:id
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | The workflow ID |
Response 204 No Content