POST
/
category
/
faq
curl --request POST \
  --url https://grm-api.vercel.app/category/faq \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "query": "<string>",
  "category": "<string>",
  "limit": 5
}'
{
  "status": "<string>",
  "items": [
    {
      "question": "<string>",
      "answer": "<string>",
      "category": "<string>",
      "relevance_score": 123
    }
  ]
}

Retrieves frequently asked questions (FAQs) based on a query. This endpoint searches for relevant FAQ items that match the provided query text and returns them sorted by relevance.

Request

The request requires:

  • query: The text to search for relevant FAQs

Optional parameters:

  • category: Filter FAQs by a specific category
  • limit: Maximum number of FAQ items to return (default: 5)

Response

The response includes:

  • status: Operation status
  • items: Array of FAQ items, each containing:
    • question: The frequently asked question
    • answer: The answer to the question
    • category: Category of the FAQ item
    • relevance_score: A score indicating how relevant this FAQ is to the query

This endpoint is useful for providing self-service support to users by suggesting relevant FAQs based on their grievance text or specific queries.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Query to search for relevant FAQs

The body is of type object.

Response

200
application/json

FAQ search results

The response is of type object.