Skip to main content
PATCH
/
knowledge-base
/
sources
/
{sourceId}
Update KB Source
curl --request PATCH \
  --url https://api.attention.tech/v2/knowledge-base/sources/{sourceId} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "Q4 Product Launch Playbook (Updated)",
  "content": "# Product Launch Playbook v2\n\n## Overview\nUpdated with lessons learned from beta launch..."
}
'
{
  "data": {
    "type": "kb_sources",
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "attributes": {
      "title": "Q4 Product Launch Playbook",
      "source_type": "manual",
      "content": "# Product Launch Playbook\n\n## Overview\nThis document covers the key steps...",
      "format": "text/markdown",
      "status": "indexed",
      "file_size": 4096,
      "chunk_count": 12,
      "created_at": "2025-01-15T10:30:00Z",
      "updated_at": "2025-01-15T10:35:00Z"
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.attention.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Path Parameters

sourceId
string
required

The unique identifier of the KB source

Body

title
string

Updated title

Maximum string length: 500
content
string

Updated content (triggers re-indexing)

Maximum string length: 524288

Response

KB source updated successfully

data
object
Example:
{
"type": "kb_sources",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"attributes": {
"title": "Q4 Product Launch Playbook",
"source_type": "manual",
"format": "text/markdown",
"status": "indexed",
"file_size": 4096,
"chunk_count": 12,
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:35:00Z"
}
}