List Q&As
const url = 'https://api.siteassist.io/v2/projects/123e4567-e89b-12d3-a456-426614174000/qnas?query=refund%20policy&limit=10&offset=0';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.siteassist.io/v2/projects/123e4567-e89b-12d3-a456-426614174000/qnas?query=refund%20policy&limit=10&offset=0'Retrieve a paginated list of Q&A entries for a project. Supports full-text search using websearch_to_tsquery, along with pagination controls.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The project ID to fetch Q&As for
Example
123e4567-e89b-12d3-a456-426614174000Query Parameters
Section titled “Query Parameters”Optional search query. When provided, performs a full-text search on the question/title.
Example
refund policyMaximum number of items to return
Example
10Number of items to skip before starting to collect the result set
Example
0Responses
Section titled “Responses”Successfully retrieved Q&As
A list response containing total count and Q&A items for the requested page.
object
object
object
Example
{ "object": "list", "total": 1, "limit": 10, "offset": 0, "data": [ { "object": "qna", "id": "c2a19f0e-8bcb-4a67-9e4a-8f7b8f5d8d2a", "createdAt": "2024-01-15T10:30:00.000Z", "updatedAt": "2024-01-15T10:30:00.000Z", "question": "What is your refund policy?", "answer": "You can request a refund within 30 days of purchase.", "createdBy": { "name": "Alex", "image": null } } ]}Bad Request - The request body or parameters are invalid
object
object
Human-readable error message describing what went wrong
Machine-readable error code for programmatic handling
Additional error details and context
object
Example
{ "error": { "message": "Invalid request body. Content is required.", "code": "INVALID_REQUEST_BODY", "details": { "field": "content" } }}Unauthorized - Authentication token is missing or invalid
object
object
Human-readable error message describing what went wrong
Machine-readable error code for programmatic handling
Additional error details and context
object
Example
{ "error": { "message": "Authentication required", "code": "UNAUTHORIZED" }}Payment Required - A higher pricing plan is required to access the resource
object
object
Human-readable error message describing what went wrong
Machine-readable error code for programmatic handling
Additional error details and context
object
Example
{ "error": { "message": "A higher pricing plan is required to access this feature", "code": "PAYMENT_REQUIRED", "details": { "currentPlan": "free", "requiredPlan": "pro", "feature": "advanced_ai_models" } }}Forbidden - Access denied to the requested resource
object
object
Human-readable error message describing what went wrong
Machine-readable error code for programmatic handling
Additional error details and context
object
Example
{ "error": { "message": "Access denied to this conversation", "code": "FORBIDDEN" }}Not Found - The requested resource was not found
object
object
Human-readable error message describing what went wrong
Machine-readable error code for programmatic handling
Additional error details and context
object
Example
{ "error": { "message": "Conversation not found!", "code": "CONVERSATION_NOT_FOUND", "details": { "conversationId": "123e4567-e89b-12d3-a456-426614174000" } }}Conflict - The request could not be completed due to a conflict
object
object
Human-readable error message describing what went wrong
Machine-readable error code for programmatic handling
Additional error details and context
object
Example
{ "error": { "message": "Resource already exists", "code": "CONFLICT", "details": { "resource": "conversation", "conflictingField": "id" } }}Unprocessable Entity - The request was well-formed but contains semantic errors
object
object
Human-readable error message describing what went wrong
Machine-readable error code for programmatic handling
Additional error details and context
object
Example
{ "error": { "message": "Validation failed", "code": "VALIDATION_ERROR", "details": { "field": "content", "reason": "Content exceeds maximum length of 10000 characters" } }}Too Many Requests - Rate limit exceeded or quota reached
object
object
Human-readable error message describing what went wrong
Machine-readable error code for programmatic handling
Additional error details and context
object
Example
{ "error": { "message": "Rate limit exceeded. Please try again later.", "code": "RATE_LIMIT_EXCEEDED", "details": { "retryAfter": 60 } }}Internal Server Error - An unexpected error occurred
object
object
Human-readable error message describing what went wrong
Machine-readable error code for programmatic handling
Additional error details and context
object
Example
{ "error": { "message": "An internal server error occurred", "code": "INTERNAL_SERVER_ERROR" }}Bad Gateway - The server received an invalid response from an upstream server
object
object
Human-readable error message describing what went wrong
Machine-readable error code for programmatic handling
Additional error details and context
object
Example
{ "error": { "message": "Service temporarily unavailable", "code": "BAD_GATEWAY", "details": { "service": "ai_model_service" } }}Service Unavailable - The server is temporarily unable to handle the request
object
object
Human-readable error message describing what went wrong
Machine-readable error code for programmatic handling
Additional error details and context
object
Example
{ "error": { "message": "Service temporarily unavailable", "code": "SERVICE_UNAVAILABLE", "details": { "retryAfter": 30 } }}