GET
Get a saved AI query
Request · Response
queryConfig is returned exactly as POST /v1/query/execute accepts it, so to run the selected version, send its queryConfig to that endpoint unchanged.

Authorizations

x-api-key
string
header
required

API key for authentication

Path Parameters

sessionId
string
required

Saved query to read.

Response

The saved query.

id
string
required

Saved query id, used by GET /v1/query/sessions/{sessionId}.

Example:

"6ad0d4f5588cb7527658c099"

name
string
required
Example:

"Invoice lines with account and job codes"

isDraft
boolean
required

True while the query is an unpublished draft.

includeSubfolders
boolean
required

Whether the query also covers subfolders of its locations.

locations
object[]
required

Folders the query is saved to. Empty when it has none.

createdAt
string<date-time>
required
updatedAt
string<date-time>
required
messages
object[]
required

The conversation, oldest first.

selectedMessageId
string | null

Id of the message whose query version is selected in the app, or null if none is.