DashboardSupportWelcome

👤 USER DOCS

Getting Started

Daily Operations

Shift Workspace & TasksPre-Shift SetupLine-Up CardsShift ReportsForms

Staff & Locations

Staff SchedulingManaging Locations

Oversight

Manager ReportsAnalyticsPre-Shift & Compliance

Incidents & Feedback

Incident ReportingAnonymous FeedbackMessages & Announcements

AI & Settings

AI ChatgearApp Settings

Administration

Dashboard & OnboardingAdmin

⚙️ DEVELOPER DOCS

Getting Started

Getting StartedDevelopmentDeployment Guide

Architecture

Architecture OverviewData FlowArchitecture Decision Records

Core Domain

Core DomainDatabase ReferenceLocations DomainAuth & RBACScheduling DomainReports DomainIncidents DomainNotifications DomainAudit Log & OptimizationDesign Audit Findings

Frontend

Frontend ArchitectureFormsLoading SkeletonsComponentsPWA & NotificationsimageScreenshots

API Reference

API Reference

Endpoints

POS Sales APIOptimization Data APISchedule Shifts APIEmployee Export APIReports APIIncidents APIAI Chat APIPush Notifications APIWebhooks APICron API

Contributing

ContributingcodeCode Examples

Security

Security & Compliance
Danvas IconDanvas
Danvas IconDanvas

AI Chat API

Conversational data querying with streaming responses

The AI Chat API allows users to query operational data using plain English. It supports tool-calling to fetch real-time data from the database, including location status, form definitions, and recent submissions.

Related

AI Assistant User Guide

AI Integration Technical

API Overview

Incidents API

Endpoints for reporting and managing operational incidents

Push Notifications API

Web Push subscription and sending endpoints

On this page

Related
POST
/api/chat

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

messages*array<>
threadId?string

Response Body

text/event-stream

application/json

curl -X POST "https://example.com/api/chat" \  -H "Content-Type: application/json" \  -d '{    "messages": [      {        "role": "user",        "content": "string"      }    ]  }'
"string"
{
  "error": "string"
}

Clerk JWT token from session

Optional thread ID for conversation continuity