FAQs

Endpoints for retrieving and managing Frequently Asked Questions (FAQs).

FAQs are split into public access (read-only) and admin management (create, update, delete).


List FAQs (Public)

GET /api/v1/faqs

Get all active FAQs ordered by display order.

Authentication

Not required (public endpoint).

Response

{
  "success": true,
  "data": [
    {
      "id": 1,
      "question": "How do I reset my password?",
      "answer": "Click on the forgot password link and follow the instructions.",
      "order": 1,
      "status": "active",
      "created_at": "2026-01-01T00:00:00.000000Z",
      "updated_at": "2026-01-01T00:00:00.000000Z"
    }
  ]
}

Create FAQ (Admin)

POST /api/v1/faqs

Create a new FAQ entry.

Authentication

Required (Admin).

Response

Request Body

  • Name
    question
    Type
    string
    Description
    The FAQ question
  • Name
    answer
    Type
    string
    Description
    The FAQ answer
  • Name
    order
    Type
    integer
    Description
    Display order (default: 0)
  • Name
    status
    Type
    string
    Description
    active | inactive (default: active)

Response

{
  "success": true,
  "data": {
    "id": 2,
    "question": "How can I contact support?",
    "answer": "You can contact support via email or chat.",
    "order": 0,
    "status": "active",
    "created_at": "2026-01-01T00:00:00.000000Z",
    "updated_at": "2026-01-01T00:00:00.000000Z"
  },
  "message": "FAQ created successfully"
}

Update FAQ (Admin)

PUT /api/v1/faqs/{faq}

Update an existing FAQ.

Authentication

Required (Admin).

Path Parameters

  • Name
    faq
    Type
    integer
    Description
    FAQ ID

Request Body

  • Name
    question
    Type
    string
    Description
    Updated question
  • Name
    answer
    Type
    string
    Description
    Updated answer
  • Name
    order
    Type
    integer
    Description
    Updated display order
  • Name
    status
    Type
    string
    Description
    active | inactive

Response

{
  "success": true,
  "data": {
    "id": 2,
    "question": "Updated question",
    "answer": "Updated answer",
    "order": 1,
    "status": "active",
    "created_at": "2026-01-01T00:00:00.000000Z",
    "updated_at": "2026-01-02T00:00:00.000000Z"
  },
  "message": "FAQ updated successfully"
}

Delete FAQ (Admin)

DELETE /api/v1/faqs/{faq}

Delete a specific FAQ.

Authentication

Required (Admin).

Path Parameters

  • Name
    faq
    Type
    integer
    Description
    FAQ ID

Response

{
  "success": true,
  "message": "FAQ deleted successfully"
}

Was this page helpful?