Pagepeek API Document
  • Introduction
    • Conventions
    • Versioning
    • Authentication
    • Rate Limits
  • Quick Start
  • Objects
  • PagePeek Document Viewer
  • API Endpoints
    • Documents
    • Knowledge Base
    • Questions
    • Users
Powered by GitBook
On this page
  • Create Knowledge Base
  • Get Knowledge Base
  • Update Knowledge Base
  1. API Endpoints

Knowledge Base

Create Knowledge Base

  • Endpoint: POST /knowledge-base

  • Description: Create a new knowledge base from a set of documents.

  • Request Body:

    • documentIds: Array of document IDs to include in the knowledge base.

  • Response: Knowledge base object containing knowledge base details.

curl -X POST
-H "Authorization: Bearer your_api_key_here"
-H "Content-Type: application/json"
-d '{"documentIds": ["abc123", "def456"]}'
https://api.pagepeek.com/v1/knowledge-base
{
    "kb_id": "kb123",
    "documentIds": ["abc123", "def456"],
    "createdAt": "2023-10-01T12:00:00Z",
    "updatedAt": "2023-10-01T12:00:00Z"
}

Get Knowledge Base

  • Endpoint: GET /knowledge-base/:kb_id

  • Description: Retrieve the details of a specific knowledge base.

  • Response: Knowledge base object containing knowledge base details.

curl -X GET \
     -H "Authorization: Bearer your_api_key_here" \
     https://api.pagepeek.com/v1/knowledge-base/kb123
{
    "kb_id": "kb123",
    "documentIds": ["abc123", "def456"],
    "createdAt": "2023-10-01T12:00:00Z",
    "updatedAt": "2023-10-01T12:00:00Z"
}

Update Knowledge Base

  • Endpoint: PUT /knowledge-base/:kb_id

  • Description: Update an existing knowledge base.

  • Request Body:

    • documentIds: Updated array of document IDs.

  • Response: Knowledge base object containing updated knowledge base details.

curl -X PUT \
     -H "Authorization: Bearer your_api_key_here" \
     -H "Content-Type: application/json" \
     -d '{"documentIds": ["abc123", "def456", "ghi789"]}' \
     https://api.pagepeek.com/v1/knowledge-base/kb123
{
    "kb_id": "kb123",
    "documentIds": ["abc123", "def456", "ghi789"],
    "updatedAt": "2023-10-02T12:00:00Z"
}
PreviousDocumentsNextQuestions

Last updated 1 year ago