get__conversation
⚠️ TEST ENVIRONMENT ONLY
GET /conversation
List Conversations
Retrieve a list of AI conversations with optional filtering and pagination. This endpoint returns conversations based on user permissions and access controls.
Key Features:
Filter by workspace, repository, user, or date range
Pagination support with configurable page size
Returns conversation metadata including token usage
Respects workspace and organization access controls
Includes creator information for each conversation
Query Filtering:
take- Number of records to return (default: 50, max: 100)skip- Number of records to skip (default: 0)from- Start date for date range filter (ISO 8601 format)to- End date for date range filter (ISO 8601 format)userId- Filter by user who created the conversationworkspaceId- Filter by workspacerepoId- Filter by repository
Access Control:
Organization administrators see all conversations in their organization
Workspace administrators see all conversations in their managed workspaces
Regular users see only their own conversations
Users can filter conversations from workspaces they have access to
Important Notes:
Results are sorted by creation date (newest first)
Maximum
takevalue is 100 to prevent excessive data transferDeleted conversations are excluded from results
Token counts are returned as strings to support large numbers
TypeScript Client Library
public getConversations = async (query: GetConversationsRequest): Promise<GetConversationsResponse> => {
const queryParams = new URLSearchParams();
if (query.take !== undefined) {
queryParams.append('take', query.take.toString());
}
if (query.skip !== undefined) {
queryParams.append('skip', query.skip.toString());
}
if (query.from) {
queryParams.append('from', query.from);
}
if (query.to) {
queryParams.append('to', query.to);
}
if (query.userId) {
queryParams.append('userId', query.userId);
}
if (query.workspaceId) {
queryParams.append('workspaceId', query.workspaceId);
}
if (query.repoId) {
queryParams.append('repoId', query.repoId);
}
return this.makeRequest<GetConversationsResponse>(
`conversation?${queryParams.toString()}`,
'GET',
null
);
};Code Samples
# You can also use wget
curl -X GET "https://backend.flashback.tech/conversation?workspaceId=workspace-123&take=50&skip=0" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'GET https://backend.flashback.tech/conversation?workspaceId=workspace-123&take=50 HTTP/1.1
Host: backend.flashback.tech
Accept: application/jsonconst headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('https://backend.flashback.tech/conversation?workspaceId=workspace-123&take=50',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get 'https://backend.flashback.tech/conversation',
params: {
'take' => 'integer',
'skip' => 'integer',
'from' => 'string',
'to' => 'string',
'userId' => 'string',
'workspaceId' => 'string',
'repoId' => 'string'
}, headers: headers
p JSON.parse(result)import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('https://backend.flashback.tech/conversation', params={
'workspaceId': 'workspace-123',
'take': 50,
'skip': 0
}, headers = headers)
print(r.json())<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
try {
$response = $client->request('GET','https://backend.flashback.tech/conversation', array(
'headers' => $headers,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...URL obj = new URL("https://backend.flashback.tech/conversation?workspaceId=workspace-123&take=50");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://backend.flashback.tech/conversation", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}Parameters
take
query
integer
false
Number of records to return (default: 50, max: 100)
skip
query
integer
false
Number of records to skip (default: 0)
from
query
string
false
Start date for date range filter (ISO 8601)
to
query
string
false
End date for date range filter (ISO 8601)
userId
query
string
false
Filter by user who created the conversation
workspaceId
query
string
false
Filter by workspace ID
repoId
query
string
false
Filter by repository ID
Example responses
200 Response
{
"success": true,
"conversations": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"orgId": "org-123",
"createdBy": "user-456",
"createdAt": "2024-01-15T10:30:00.000Z",
"lastUpdatedAt": "2024-01-15T11:45:00.000Z",
"workspaceId": "workspace-789",
"repoId": "repo-101",
"tokensIn": "1523",
"tokensOut": "2847",
"creator": {
"id": "user-456",
"name": "John",
"lastName": "Doe",
"email": "[email protected]"
}
}
],
"total": 1
}Responses
Response Schema
Status Code 200
» success
boolean
false
none
Operation success status
» conversations
[object]
false
none
Array of conversation objects
»» id
string
false
none
Unique identifier for the conversation
»» orgId
string
false
none
Organization ID
»» createdBy
string
false
none
User ID who created the conversation
»» createdAt
string
false
none
ISO 8601 timestamp
»» lastUpdatedAt
string
false
none
ISO 8601 timestamp
»» workspaceId
string
false
none
Workspace ID
»» repoId
string
false
none
Repository ID
»» tokensIn
string
false
none
Total input tokens consumed (as string)
»» tokensOut
string
false
none
Total output tokens generated (as string)
»» creator
object
false
none
Creator user information
»»» id
string
false
none
User ID
»»» name
string
false
none
User first name
»»» lastName
string
false
none
User last name
string
false
none
User email
» total
integer
false
none
Total number of conversations matching the query
Status Code 400
» success
boolean
false
none
none
» conversations
array
false
none
none
» total
integer
false
none
none
» message
string
false
none
Error message
Status Code 500
» success
boolean
false
none
none
» conversations
array
false
none
none
» total
integer
false
none
none
» message
string
false
none
Error message
To perform this operation, you must be authenticated by means of one of the following methods: BearerAuth
Last updated
Was this helpful?