Workflow

Create

POST
Create a new workflow

Request

This endpoint expects an object.
name
stringRequired
description
stringRequired

Response

This endpoint returns an object
success
boolean
data
objectOptional
Represents a Workflow record
POST
1curl -X POST https://api.beta.superagent.sh/api/v1/workflows \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "name": "name",
6 "description": "description"
7}'
200Successful
1{
2 "success": true,
3 "data": {
4 "id": "id",
5 "name": "name",
6 "createdAt": "2024-01-15T09:30:00Z",
7 "updatedAt": "2024-01-15T09:30:00Z",
8 "apiUserId": "apiUserId",
9 "description": "description",
10 "steps": [
11 {
12 "id": "id",
13 "order": 1,
14 "workflowId": "workflowId",
15 "createdAt": "2024-01-15T09:30:00Z",
16 "updatedAt": "2024-01-15T09:30:00Z",
17 "agentId": "agentId"
18 }
19 ],
20 "apiUser": {
21 "id": "id",
22 "createdAt": "2024-01-15T09:30:00Z",
23 "updatedAt": "2024-01-15T09:30:00Z",
24 "token": "token",
25 "email": "email",
26 "agents": [
27 {
28 "id": "id",
29 "type": "SUPERAGENT",
30 "name": "name",
31 "description": "description",
32 "isActive": true,
33 "createdAt": "2024-01-15T09:30:00Z",
34 "updatedAt": "2024-01-15T09:30:00Z",
35 "apiUserId": "apiUserId"
36 }
37 ],
38 "llms": [
39 {
40 "id": "id",
41 "provider": "OPENAI",
42 "apiKey": "apiKey",
43 "createdAt": "2024-01-15T09:30:00Z",
44 "updatedAt": "2024-01-15T09:30:00Z",
45 "apiUserId": "apiUserId"
46 }
47 ],
48 "datasources": [
49 {
50 "id": "id",
51 "name": "name",
52 "type": "TXT",
53 "apiUserId": "apiUserId",
54 "createdAt": "2024-01-15T09:30:00Z",
55 "updatedAt": "2024-01-15T09:30:00Z",
56 "status": "IN_PROGRESS"
57 }
58 ],
59 "tools": [
60 {
61 "id": "id",
62 "name": "name",
63 "description": "description",
64 "type": "ALGOLIA",
65 "returnDirect": true,
66 "createdAt": "2024-01-15T09:30:00Z",
67 "updatedAt": "2024-01-15T09:30:00Z",
68 "apiUserId": "apiUserId"
69 }
70 ],
71 "vectorDb": [
72 {
73 "id": "id",
74 "provider": "PINECONE",
75 "createdAt": "2024-01-15T09:30:00Z",
76 "updatedAt": "2024-01-15T09:30:00Z",
77 "apiUserId": "apiUserId"
78 }
79 ],
80 "workflowConfigs": [
81 {
82 "id": "id",
83 "createdAt": "2024-01-15T09:30:00Z",
84 "updatedAt": "2024-01-15T09:30:00Z",
85 "workflowId": "workflowId"
86 }
87 ],
88 "apiKeys": [
89 {
90 "id": "id",
91 "name": "name",
92 "displayApiKey": "displayApiKey",
93 "createdAt": "2024-01-15T09:30:00Z",
94 "updatedAt": "2024-01-15T09:30:00Z",
95 "apiUserId": "apiUserId"
96 }
97 ]
98 },
99 "workflowConfigs": [
100 {
101 "id": "id",
102 "createdAt": "2024-01-15T09:30:00Z",
103 "updatedAt": "2024-01-15T09:30:00Z",
104 "workflowId": "workflowId"
105 }
106 ]
107 }
108}