Skip to main content

Embedded Copilot Chat

Endpoint for managing the per-user AI copilot chat session embedded within an app.

GET /api/apps/{id}/chat

Get or create the embedded AI chat session for the current user within an app. If no chat session exists, one is automatically created.

Authentication: Required

Path Parameters:

ParameterTypeDescription
idstringApp UUID or natural ID

Response:

{
"id": "chat-uuid-1234",
"appId": "d4f8a2b1-1234-5678-90ab-cdef12345678",
"username": "john.doe",
"embedded": true,
"modelId": "go_everyday",
"name": "Sales Dashboard",
"autoRename": false,
"messages": [],
"createdAt": "2024-02-13T10:00:00.000Z",
"updatedAt": "2024-02-13T10:00:00.000Z"
}

Key Fields:

FieldDescription
embeddedAlways true for app-scoped chats
modelIdThe AI model used (prefers go_everyday, falls back to first chat-capable model)
autoRenameAlways false — the chat name stays fixed to the app name
messagesChat message history (empty on first creation)

Behavior:

  • If a chat already exists for this user and app, returns the existing chat
  • If no chat exists, creates one with embedded: true and the app's name
  • The response includes a HAL self link pointing to /api/chats/{chatId} for subsequent chat interactions

Permissions Required: None (404 if user cannot read the app)