Conversations
List conversations
Retrieve a paginated list of conversations for the authenticated visitor within the current project. Supports filtering, ordering, and pagination.
AuthorizationBearer <token>
In: header
Query Parameters
limit?number
Default
10
Range
1 <= value <= 100
offset?number | null
Default
0
Range
0 <= value
status?string
Value in
"open" | "closed"
orderBy?string
Default
"lastInterationAt"
Value in
"id" | "createdAt" | "updatedAt" | "lastInterationAt" | "status" | "closedAt" | "isHumanHandled" | "title"
orderDir?string
Default
"desc"
Value in
"asc" | "desc"
Response Body
curl -X GET "https://api.siteassist.io/v2/conversations?limit=10&offset=0&status=open&orderBy=id&orderDir=asc"
{
"object": "list",
"total": 1,
"limit": 10,
"offset": 0,
"data": [
{
"object": "conversation",
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"status": "open",
"closedAt": null,
"closeReason": null,
"lastInterationAt": "2024-01-15T10:30:00.000Z",
"isHumanHandled": false,
"humanAgent": null,
"lastMessage": null
}
]
}
{
"error": {
"message": "Invalid request body. Content is required.",
"code": "INVALID_REQUEST_BODY",
"details": {
"field": "content"
}
}
}
{
"error": {
"message": "Authentication required",
"code": "UNAUTHORIZED"
}
}
{
"error": {
"message": "A higher pricing plan is required to access this feature",
"code": "PAYMENT_REQUIRED",
"details": {
"currentPlan": "free",
"requiredPlan": "pro",
"feature": "advanced_ai_models"
}
}
}
{
"error": {
"message": "Access denied to this conversation",
"code": "FORBIDDEN"
}
}
{
"error": {
"message": "Conversation not found!",
"code": "CONVERSATION_NOT_FOUND",
"details": {
"conversationId": "123e4567-e89b-12d3-a456-426614174000"
}
}
}
{
"error": {
"message": "Resource already exists",
"code": "CONFLICT",
"details": {
"resource": "conversation",
"conflictingField": "id"
}
}
}
{
"error": {
"message": "Validation failed",
"code": "VALIDATION_ERROR",
"details": {
"field": "content",
"reason": "Content exceeds maximum length of 10000 characters"
}
}
}
{
"error": {
"message": "Rate limit exceeded. Please try again later.",
"code": "RATE_LIMIT_EXCEEDED",
"details": {
"retryAfter": 60
}
}
}
{
"error": {
"message": "An internal server error occurred",
"code": "INTERNAL_SERVER_ERROR"
}
}
{
"error": {
"message": "Service temporarily unavailable",
"code": "BAD_GATEWAY",
"details": {
"service": "ai_model_service"
}
}
}
{
"error": {
"message": "Service temporarily unavailable",
"code": "SERVICE_UNAVAILABLE",
"details": {
"retryAfter": 30
}
}
}
Get a conversation GET
Retrieve a single conversation by ID for the authenticated visitor in the current project, including its messages and human agent info if assigned.
Start a new conversation POST
Create a new conversation for a customer to interact with an AI assistant. This endpoint initializes a conversation session and returns the conversation details including a unique conversation ID that can be used for subsequent message exchanges.