business_knowledge

patch/api/projects/{project_id}/business_knowledge/sources/{id}/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/business_knowledge/sources/{id}/
  • Auth: HTTP bearer

Path parameters

idstring uuid required

A UUID string identifying this knowledge source.

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Request body

namestring

New human label for the source.

textstring

Replacement text. Omit to keep the existing content.

always_includeboolean

When true, this source's content is injected into every support reply prompt as general context.

Response

idstring uuid required
team_idinteger required
namestring required
source_type'text' | 'url' | 'file' required
  • text - Text
  • url - URL
  • file - File
is_generatedboolean required

Whether PostHog manages this source with knowledge learned from resolved support tickets.

status'pending' | 'processing' | 'ready' | 'error' required
  • pending - Pending
  • processing - Processing
  • ready - Ready
  • error - Error
error_messagestring required
document_countinteger required

Number of documents belonging to this source.

chunk_countinteger required

Number of chunks belonging to this source.

created_atstring date-time required
updated_atstring date-time nullable required
source_urlstring uri required
last_refresh_atstring date-time nullable required
last_refresh_status'success' | 'not_modified' | 'error' required
  • success - Success
  • not_modified - Not modified
  • error - Error
last_refresh_errorstring required
refresh_interval'manual' | '1h' | '6h' | '24h' | '7d' required
  • manual - Manual only
  • 1h - Every hour
  • 6h - Every 6 hours
  • 24h - Every day
  • 7d - Every week
next_refresh_atstring nullable required

When the background coordinator will next auto-refresh this source. Null for manual sources or sources never refreshed.

has_unsafe_documentsboolean required

True when at least one document in this source was flagged unsafe by the content classifier and is therefore excluded from agent search.

embedding_status'pending' | 'completed' | 'disabled' required
learned_from_ticket_numberinteger nullable required

Support ticket number this learned source came from. Null for sources you added yourself.

learned_from_ticket_urlstring uri nullable required

App URL of the originating support ticket. Null for sources you added yourself.

crawl_mode'single' | 'sitemap' | 'same_origin' | 'github_repo' required
  • single - Single page
  • sitemap - Sitemap
  • same_origin - Same origin crawl
  • github_repo - GitHub repository
crawl_configunknown required
original_filenamestring required
file_content_typestring required
file_size_bytesinteger nullable required
always_includeboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.