Protobox

Update Knowledge Entry

Update a knowledge entry. If content changes, embeddings are automatically regenerated.

Request
curl -X PATCH "https://platform.protobox.ai/api/v1/knowledge/695c71705a8b2ca8d9016050" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Return Policy",
    "content": "Our updated return policy allows returns within 60 days...",
    "metadata": {
      "category": "policies",
      "tags": ["returns", "refunds", "2024"]
    }
  }'
const response = await fetch('https://platform.protobox.ai/api/v1/knowledge/695c71705a8b2ca8d9016050', {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer ' + accessToken,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    title: 'Updated Return Policy',
    metadata: {
      tags: ['returns', 'refunds', '2024']
    }
  })
});

const { data } = await response.json();
console.log('Updated:', data.title);
import requests

response = requests.patch(
    'https://platform.protobox.ai/api/v1/knowledge/695c71705a8b2ca8d9016050',
    headers={'Authorization': f'Bearer {access_token}'},
    json={
        'title': 'Updated Return Policy',
        'metadata': {
            'tags': ['returns', 'refunds', '2024']
        }
    }
)

entry = response.json()['data']
print(f"Updated: {entry['title']}")
Response
{
  "success": true,
  "data": {
    "id": "695c71705a8b2ca8d9016050",
    "workspaceId": "674e1234567890abcdef0001",
    "title": "Updated Return Policy",
    "content": "Our updated return policy allows returns within 60 days...",
    "source": "manual",
    "metadata": {
      "category": "policies",
      "tags": ["returns", "refunds", "2024"]
    },
    "isEnabled": true,
    "tokenCount": 45,
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-16T14:00:00Z"
  }
}

Path Parameters

idstringrequired

Knowledge entry ID.

Request Body

titlestring

Updated title. Max 500 characters.

contentstring

Updated content. Max 100,000 characters. Triggers embedding regeneration.

metadataobject

Updated metadata.

metadata properties
metadata.categorystring

Category for organizing entries.

metadata.tagsarray

Tags for filtering.

metadata.authorstring

Author of the content.

isEnabledboolean

Whether the entry is enabled for search.

Notes

  • When content is updated, vector embeddings are automatically regenerated
  • Partial updates are supported - only include fields you want to change
  • The searchableText field is automatically updated when content changes

On this page