GET /v1/ai/workflow/chat/history
Get chat history for a workflow or session
GET
/v1/ai/workflow/chat/history
Get chat history for a workflow or session
Query Parameters
workflowId
string
optional
query
Workflow ID (for edit page)
sessionId
string
optional
query
Session ID (for create page)
limit
integer
optional
query
Maximum number of messages to return (default: 20, max: 100)
Request Body
application/jsonResponses
200
OK
application/jsoncode
integer
data
object[]
Array of:
content
string
conversationId
string
createdAt
string
id
string
imageUrls
string[]
Array of:
linkedRunFinishedAt
string
linkedRunId
string
linkedRunStartedAt
string
linkedRunStatus
string
Enum:
running, waiting, success, partial, failure, cancelledorganizationId
string
role
string
senderUserId
string
sessionId
string
tokensUsed
integer
workflowId
string
message
string
requestId
string
400
Bad Request
curl -X GET 'https://api.example.com/v1/ai/workflow/chat/history' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{}'
const response = await fetch('https://api.example.com/v1/ai/workflow/chat/history', { method: 'GET', headers: { "Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json" }, body: JSON.stringify({})});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.get('https://api.example.com/v1/ai/workflow/chat/history', headers=headers, json={})print(response.json())
package mainimport ( "fmt" "io" "net/http" "strings")func main() { body := strings.NewReader(`{}`) req, _ := http.NewRequest("GET", "https://api.example.com/v1/ai/workflow/chat/history", body) req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN") req.Header.Set("Content-Type", "application/json") resp, _ := http.DefaultClient.Do(req) defer resp.Body.Close() result, _ := io.ReadAll(resp.Body) fmt.Println(string(result))}
200
Response
{ "code": 200, "data": [ { "content": "<string>", "conversationId": "<string>", "createdAt": "<string>", "id": "<string>", "imageUrls": [ "<string>" ], "linkedRunFinishedAt": "<string>", "linkedRunId": "<string>", "linkedRunStartedAt": "<string>", "linkedRunStatus": "running", "organizationId": "<string>", "role": "<string>", "senderUserId": "<string>", "sessionId": "<string>", "tokensUsed": 123, "workflowId": "<string>" } ], "message": "success", "requestId": "<string>"}
API Playground
Try this endpoint
GET
/v1/ai/workflow/chat/history
