Get Chat Thread

GET /api/v1/chat/{workspaceId}/history/{threadId}

Retrieve a specific chat thread.

Parameters

NameInTypeRequiredDescription
workspaceIdpathstring (uuid)YesThe ID of the workspace
threadIdpathstring (uuid)YesThe ID of the chat thread

Responses

Status CodeDescriptionContent Type
200OKapplication/json
500Internal Server Errorapplication/json

Update Chat Thread Title

POST /api/v1/chat/{workspaceId}/history/{threadId}

Update the title of a chat thread.

Parameters

NameInTypeRequiredDescription
workspaceIdpathstring (uuid)YesThe ID of the workspace
threadIdpathstring (uuid)YesThe ID of the chat thread

Request Body

TypeDescription
ChatThread_FullThe updated chat thread details

Responses

Status CodeDescriptionContent Type
200OKapplication/json
500Internal Server Errorapplication/json

Remove History

DELETE /api/v1/chat/{workspaceId}/history/{threadId}

Delete a specific chat thread.

Parameters

NameInTypeRequiredDescription
workspaceIdpathstring (uuid)YesThe ID of the workspace
threadIdpathstring (uuid)YesThe ID of the chat thread

Responses

Status CodeDescription
200OK
500Internal Server Error

Add Chat

POST /api/v1/chat/{workspaceId}/completions

Add a new chat message.

Parameters

NameInTypeRequiredDescription
workspaceIdpathstring (uuid)YesThe ID of the workspace

Request Body

TypeDescription
ChatCompletionRequestSFThe chat completion request details

Responses

Status CodeDescriptionContent Type
200OKapplication/json
500Internal Server Errorapplication/json

Add Chat Stream

POST /api/v1/chat/{workspaceId}/completions/stream

Add a new chat message and receive a streamed response.

Parameters

NameInTypeRequiredDescription
workspaceIdpathstring (uuid)YesThe ID of the workspace

Request Body

TypeDescription
ChatCompletionRequestSFThe chat completion request details

Responses

Status CodeDescriptionContent Type
200OKapplication/json
500Internal Server Errorapplication/json

Add File

POST /api/v1/chat/{plusId}/add-file

Add a file to the chat.

Parameters

NameInTypeRequiredDescription
plusIdpathstring (uuid)YesThe ID of the SectorFlow Plus
collectionquerystringNoThe collection name
threadIdquerystring (uuid)NoThe ID of the chat thread
modelsqueryarray of string (uuid)NoThe model IDs
summarizequerybooleanNoWhether to summarize the file
filesqueryarray of string (binary)YesThe file(s) to add

Responses

Status CodeDescriptionContent Type
200OKapplication/json
500Internal Server Errorapplication/json

Get Sample Prompts

GET /api/v1/chat/{workspaceId}/sample-prompts

Retrieve sample prompts for a workspace.

Parameters

NameInTypeRequiredDescription
workspaceIdpathstring (uuid)YesThe ID of the workspace
limitqueryintegerNoThe maximum number of prompts to retrieve (default: 6)

Responses

Status CodeDescriptionContent Type
200OKapplication/json
500Internal Server Errorapplication/json

Get Chat History

GET /api/v1/chat/{workspaceId}/history

Retrieve the chat history for a workspace.

Parameters

NameInTypeRequiredDescription
workspaceIdpathstring (uuid)YesThe ID of the workspace

Responses

Status CodeDescriptionContent Type
200OKapplication/json
500Internal Server Errorapplication/json

Remove All History

DELETE /api/v1/chat/{workspaceId}/history

Delete all chat history for a workspace.

Parameters

NameInTypeRequiredDescription
workspaceIdpathstring (uuid)YesThe ID of the workspace

Responses

Status CodeDescription
200OK
500Internal Server Error

Get Greeting

GET /api/v1/chat/{workspaceId}/greeting

Retrieve the greeting for a workspace.

Parameters

NameInTypeRequiredDescription
workspaceIdpathstring (uuid)YesThe ID of the workspace

Responses

Status CodeDescriptionContent Type
200OKapplication/json
500Internal Server Errorapplication/json

Get Prompt Logs

GET /api/v1/chat/prompt-logs

Retrieve prompt logs within a date range.

Parameters

NameInTypeRequiredDescription
qquerystringNoSearch query
startDatequerystring (date-time)YesStart date for the log search
endDatequerystring (date-time)YesEnd date for the log search

Responses

Status CodeDescriptionContent Type
200OKapplication/json
500Internal Server Errorapplication/json

Get Paged Prompt Logs

GET /api/v1/chat/prompt-logs/paged

Retrieve paged prompt logs.

Parameters

NameInTypeRequiredDescription
qquerystringNoSearch query
startDatequerystring (date-time)NoStart date for the log search
endDatequerystring (date-time)NoEnd date for the log search
pageablequeryPageableYesPagination information

Responses

Status CodeDescriptionContent Type
200OKapplication/json
500Internal Server Errorapplication/json

Get Logs Between Dates CSV

GET /api/v1/chat/prompt-logs/csv

Retrieve prompt logs as CSV within a date range.

Parameters

NameInTypeRequiredDescription
qquerystringNoSearch query
startDatequerystring (date-time)YesStart date for the log search
endDatequerystring (date-time)YesEnd date for the log search

Responses

Status CodeDescriptionContent Type
200OKtext/csv
500Internal Server Errorapplication/json