Skip to main content

Visit Later

N/a

General Notes

  • Used when frontend switches canvas tabs to check for active/resumable conversations
  • Supports multi-device and shared-login scenarios
  • Returns { conversation: null } when no matching conversation exists (not 404)

Flow

Mermaid editor

Test cases

Method & URL

GET v1/conversations

Request

Headers

authorization
- Required
- Type : <string>
- Bearer session token

Query

canvasId
- Required
- Type : <string>
- ObjectId format (24-character hex)
- The canvas to check for conversations

status
- Required
- Type : <string>
- Enum : active | lastCompleted
- active returns the single active conversation
- lastCompleted returns the most recently updated completed conversation

Body


Path parameter


Response

2xx

success
- Type : true (boolean)
- This indicates that request was executed successfully

message
- Type : null

data
- Type : <object>

data.conversation
- Type : <object> | null
- null when no matching conversation exists

data.conversation.id
- Type : <string>

data.conversation.canvasId
- Type : <string>

data.conversation.widgetId
- Type : <string> | null
- Set once a widget has been generated

data.conversation.name
- Type : <string> | null
- AI-generated conversation name

data.conversation.status
- Type : <string>
- Enum : active | completed

data.conversation.messages
- Type : <object>[]

data.conversation.messages[].id
- Type : <string>

data.conversation.messages[].role
- Type : <string>
- Enum : user | assistant

data.conversation.messages[].content
- Type : <string>
- Message text

data.conversation.messages[].sql
- Type : <string> | undefined
- Present on assistant messages that generated a widget

data.conversation.messages[].chartConfig
- Type : <object> | undefined
- Present on assistant messages that generated a widget

data.conversation.messages[].createdAt
- Type : <string>
- ISO date

data.conversation.messages[].updatedAt
- Type : <string>
- ISO date

data.conversation.createdAt
- Type : <string>
- ISO date

data.conversation.updatedAt
- Type : <string>
- ISO date

400

success
- Type : false (boolean)

message
- Type : <string>
- "Something went wrong. We're on it."