Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this page
Looking for more inspiration?Visit the

Enterprise Knowledge observability


With Enterprise Knowledge observability, you can monitor, debug, and trace product events across the entire lifecycle of knowledge bases and knowledge sources. This includes tracking create, read, update, and delete (CRUD) operations, as well as search, indexing, and retrieval operations.


Capabilities

capabilities page anchor
FeatureDescriptionPrimary use case
Product event loggingStructured logs for lifecycle operations (create, read, update, delete, search, and indexing) across Enterprise Knowledge resourcesAuditing, event tracing, and downstream analysis
Error and warning logsDetailed diagnostics for all CRUD operation failures, including error_code, display_message, possible causes, and suggested actionsAccelerated root cause analysis and debugging
AlertingSet custom error and warning thresholds in the Twilio Console and route proactive alerts across multiple channels, including email, webhooks, and PagerDutyProactive incident response and SRE workflows
Traceability and lineageTrace ID propagation across Conversation Orchestrator, Conversation Intelligence, and Knowledge, including the requestId and correlationId fields documented in Log entry schemaEnd-to-end debugging and correlation across the Twilio AI stack
Onboarding UI errorsBuilt-in observability for errors encountered during setup (for example, profile and knowledge ingest, or identity resolution). Errors are tagged with interface_type: "UI" in logsDebugging setup and configuration failures
Data export and integrationReal-time log export using Twilio Event Streams to external systems, such as a SIEM (Security Information and Event Management), a data warehouse, or an analytics platform, with personal data redactionAgent monitoring, compliance, and custom analytics

To view Enterprise Knowledge logs:

  1. Open the Twilio Console(link takes you to an external page).
  2. Go to Monitor > Debugger.
  3. Filter by event type (for example, com.twilio.knowledge.knowledge.created) or search for knowledge-related events.
  4. To view error descriptions, possible causes, and suggested remediation steps, select any log entry to expand its full diagnostic panel.

Enterprise Knowledge emits a structured log event for each significant state change. Events follow the naming convention:

com.twilio.<DOMAIN>.<RESOURCE>.<ACTION>

Knowledge events

knowledge-events page anchor
Event typeDescriptionLog levels
com.twilio.knowledge.knowledge.createdA new knowledge document or source is registered, before content is processedINFO, ERROR
com.twilio.knowledge.knowledge.searchedA knowledge search operation completedINFO, ERROR
com.twilio.knowledge.knowledge.updatedAn existing knowledge document or source is modified, including source refreshesINFO, ERROR, WARNING
com.twilio.knowledge.knowledge.deletedA knowledge document or source is permanently removedINFO, ERROR
com.twilio.knowledge.knowledge.indexedA knowledge source finishes processing and is indexed for retrievalINFO, ERROR, WARNING
Event typeDescriptionLog levels
com.twilio.knowledge.knowledgebase.createdA new knowledge base is provisionedINFO, ERROR
com.twilio.knowledge.knowledgebase.updatedThe knowledge base configuration is modifiedINFO, ERROR, WARNING
com.twilio.knowledge.knowledgebase.deletedThe knowledge base is removedINFO, ERROR
(information)

Info

Field-by-field payload schemas for individual knowledge base events aren't included in this guide. Each event's body follows the same top-level structure described in Log entry schema, and at minimum includes created_by, interface_type, latency_ms, and knowledge_base_id, as shown in the example log entry.

Enterprise Knowledge previously emitted the following event names, which might still appear in logs generated before this update:

Deprecated eventReplacement
com.twilio.knowledge.searchedcom.twilio.knowledge.knowledge.searched
com.twilio.knowledge.uploaded.textcom.twilio.knowledge.knowledge.indexed (with source_type: "text")
com.twilio.knowledge.uploaded.urlcom.twilio.knowledge.knowledge.indexed (with source_type: "web")

Knowledge event payloads

knowledge-event-payloads page anchor

Each knowledge.* event's body contains fields specific to that event type. The following sections describe the payload for each event and show representative log entries.

The com.twilio.knowledge.knowledge.created event

the-comtwilioknowledgeknowledgecreated-event page anchor

This event is fired when a new knowledge document or source is registered. The exact fields present depend on source_type:

FieldTypeDescription
knowledge_base_idstringID of the parent knowledge base
knowledge_idstringID of the knowledge resource
created_bystringUser SID or service identity that initiated the request
descriptionstringDescription provided for the knowledge resource
source_typestringtext, web, or file
interface_typestringUI or API
latency_msintegerProcessing time in milliseconds
error_codestringThe error code for the failure, from Error and warning logs; null on success
display_messagestringA human-readable description of the error; null on success
content_snippetstringThe first 10 characters of the submitted text (text uploads only)
content_sizeintegerSize in bytes (text uploads only)
content_char_countintegerCharacter count (text uploads only)
source_urlstringThe crawled source URL (web uploads only)
page_depthintegerCrawl depth (web uploads only)
file_namestringUploaded file name (file uploads only)
raw_text_sizeintegerTotal file size in bytes (file uploads only)

For example, Enterprise Knowledge logs an INFO event for a successful text-source creation:

1
{
2
"knowledge_base_id": "know_knowledgebase_00000000000000000000000000",
3
"knowledge_id": "know_knowledge_00000000000000000000000000",
4
"created_by": "US12345678901234567890123456789012",
5
"description": "Product documentation",
6
"source_type": "text",
7
"interface_type": "UI",
8
"latency_ms": 1234,
9
"error_code": null,
10
"display_message": null,
11
"content_snippet": "Product do",
12
"content_size": 5120,
13
"content_char_count": 5000
14
}

If creation fails, error_code and display_message are populated and knowledge_id is null:

1
{
2
"knowledge_base_id": "know_knowledgebase_00000000000000000000000000",
3
"knowledge_id": null,
4
"created_by": "US12345678901234567890123456789012",
5
"description": "Failed creation",
6
"source_type": "text",
7
"interface_type": "API",
8
"latency_ms": 5234,
9
"error_code": "420001",
10
"display_message": "Knowledge could not be created."
11
}

The com.twilio.knowledge.knowledge.searched event

the-comtwilioknowledgeknowledgesearched-event page anchor

This event is fired when a search query runs against a knowledge base:

FieldTypeDescription
knowledge_base_idstringID of the knowledge base searched
search_querystringThe first 10 characters of the search query text
result_countintegerNumber of results returned
searched_bystringUser SID or service identity that ran the search
knowledge_searchedarrayList of {knowledge_ids, confidence_score} objects for the top results
interface_typestringUI or API
latency_msintegerProcessing time in milliseconds
error_codestringThe error code for the failure, from Error and warning logs; null on success
display_messagestringA human-readable description of the error; null on success

For example, Enterprise Knowledge logs an INFO event for a successful search:

1
{
2
"knowledge_base_id": "know_knowledgebase_00000000000000000000000000",
3
"search_query": "how to res",
4
"result_count": 2,
5
"searched_by": "US12345678901234567890123456789012",
6
"knowledge_searched": [
7
{ "knowledge_ids": "know_knowledge_00000000000000000000000000", "confidence_score": 0.92 },
8
{ "knowledge_ids": "know_knowledge_00000000000000000000000001", "confidence_score": 0.87 }
9
],
10
"interface_type": "UI",
11
"latency_ms": 145,
12
"error_code": null,
13
"display_message": null
14
}

If the search fails, result_count is 0 and knowledge_searched is empty:

1
{
2
"knowledge_base_id": "know_knowledgebase_00000000000000000000000000",
3
"search_query": "invalid qu",
4
"result_count": 0,
5
"searched_by": "US12345678901234567890123456789012",
6
"knowledge_searched": [],
7
"interface_type": "API",
8
"latency_ms": 3000,
9
"error_code": "420003",
10
"display_message": "Search query failed."
11
}

The com.twilio.knowledge.knowledge.updated event

the-comtwilioknowledgeknowledgeupdated-event page anchor

This event is fired when a knowledge resource's metadata or content is modified, including source refreshes:

FieldTypeDescription
knowledge_base_idstringID of the parent knowledge base
knowledge_idstringID of the knowledge resource
updated_bystringUser SID or service identity that made the update
updated_fieldsarrayList of field names that were updated, such as name, description, or source
refreshedbooleanWhether the update was a refresh from the original source
interface_typestringUI or API
latency_msintegerProcessing time in milliseconds
error_codestringThe error code for the failure or partial success, from Error and warning logs; null on success
display_messagestringA human-readable description of the error or partial-success condition; null on success

For example, Enterprise Knowledge logs an INFO event for a successful update:

1
{
2
"knowledge_base_id": "know_knowledgebase_00000000000000000000000000",
3
"knowledge_id": "know_knowledge_00000000000000000000000000",
4
"updated_by": "US12345678901234567890123456789012",
5
"updated_fields": ["name", "description"],
6
"refreshed": false,
7
"interface_type": "UI",
8
"latency_ms": 456,
9
"error_code": null,
10
"display_message": null
11
}

If only some fields update successfully, Enterprise Knowledge logs a WARNING event:

1
{
2
"knowledge_base_id": "know_knowledgebase_00000000000000000000000000",
3
"knowledge_id": "know_knowledge_00000000000000000000000000",
4
"updated_by": "US12345678901234567890123456789012",
5
"updated_fields": ["name"],
6
"refreshed": false,
7
"interface_type": "API",
8
"latency_ms": 567,
9
"error_code": "420009",
10
"display_message": "Partial update, content skipped."
11
}

If the update fails entirely, updated_fields is empty:

1
{
2
"knowledge_base_id": "know_knowledgebase_00000000000000000000000000",
3
"knowledge_id": "know_knowledge_00000000000000000000000000",
4
"updated_by": "US12345678901234567890123456789012",
5
"updated_fields": [],
6
"refreshed": false,
7
"interface_type": "UI",
8
"latency_ms": 2340,
9
"error_code": "420010",
10
"display_message": "Knowledge resource update failed."
11
}

The com.twilio.knowledge.knowledge.deleted event

the-comtwilioknowledgeknowledgedeleted-event page anchor

This event is fired when a knowledge resource is permanently removed:

FieldTypeDescription
knowledge_base_idstringID of the parent knowledge base
knowledge_idstringID of the deleted knowledge resource
deleted_bystringUser SID or service identity that requested the deletion
interface_typestringUI or API
latency_msintegerProcessing time in milliseconds
error_codestringThe error code for the failure, from Error and warning logs; null on success
display_messagestringA human-readable description of the error; null on success

For example, Enterprise Knowledge logs an INFO event for a successful deletion:

1
{
2
"knowledge_base_id": "know_knowledgebase_00000000000000000000000000",
3
"knowledge_id": "know_knowledge_00000000000000000000000000",
4
"deleted_by": "US12345678901234567890123456789012",
5
"interface_type": "UI",
6
"latency_ms": 345,
7
"error_code": null,
8
"display_message": null
9
}

If the deletion fails, error_code and display_message are populated:

1
{
2
"knowledge_base_id": "know_knowledgebase_00000000000000000000000000",
3
"knowledge_id": "know_knowledge_00000000000000000000000000",
4
"deleted_by": "US12345678901234567890123456789012",
5
"interface_type": "UI",
6
"latency_ms": 890,
7
"error_code": "420011",
8
"display_message": "Knowledge resource deletion failed."
9
}

The com.twilio.knowledge.knowledge.indexed event

the-comtwilioknowledgeknowledgeindexed-event page anchor

This event is fired when a knowledge source finishes processing and becomes searchable. This event shares its knowledge_id with the corresponding created event for the same source:

FieldTypeDescription
knowledge_base_idstringID of the parent knowledge base
knowledge_idstringID of the knowledge resource
created_bystringUser SID or service identity that submitted the source
latency_msintegerProcessing time in milliseconds
error_codestringThe error code for the failure or partial success, from Error and warning logs; null on success
display_messagestringA human-readable description of the error or partial-success condition; null on success
page_countintegerNumber of pages crawled (web sources only)

For example, Enterprise Knowledge logs an INFO event when a web source indexes successfully:

1
{
2
"knowledge_base_id": "know_knowledgebase_00000000000000000000000000",
3
"knowledge_id": "know_knowledge_00000000000000000000000000",
4
"created_by": "US12345678901234567890123456789012",
5
"latency_ms": 1234,
6
"error_code": null,
7
"display_message": null,
8
"page_count": 45
9
}

If a web source only partially indexes, Enterprise Knowledge logs a WARNING event:

1
{
2
"knowledge_base_id": "know_knowledgebase_00000000000000000000000000",
3
"knowledge_id": "know_knowledge_00000000000000000000000002",
4
"created_by": "US12345678901234567890123456789012",
5
"latency_ms": 8900,
6
"error_code": "420007",
7
"display_message": "URL crawl partially timed out.",
8
"page_count": 45
9
}

If a web source fails to index, knowledge_id is null:

1
{
2
"knowledge_base_id": "know_knowledgebase_00000000000000000000000000",
3
"knowledge_id": null,
4
"created_by": "US98765432109876543210987654321098",
5
"latency_ms": 5234,
6
"error_code": "420006",
7
"display_message": "Failed to crawl or fetch the URL."
8
}

Every log entry shares a common top-level structure. Top-level field names use camelCase (for example, errorCode). Fields inside body use snake_case (for example, error_code).

FieldTypeDescription
logIdstringUnique identifier for this log entry
eventTimestring (ISO 8601)Timestamp of the event
sourcestringThe Knowledge subsystem that emitted the event
eventTypestringFull event type name (for example, com.twilio.knowledge.knowledgebase.created)
levelstringSeverity level: INFO, WARNING, or ERROR
errorCodeinteger0 for success; non-zero maps to the Twilio error catalog
errorReasonstring | nullHuman-readable error description, if applicable
requestIdstringUnique ID for the originating API request
correlationIdstringTrace ID for correlating events across services
bodyobjectOperation-specific payload
1
{
2
"logId": "1775677339108-67cbb62a",
3
"eventTime": "2026-04-08T19:42:19Z",
4
"source": "knowledge",
5
"eventType": "com.twilio.knowledge.knowledgebase.created",
6
"level": "INFO",
7
"errorCode": 0,
8
"errorReason": null,
9
"requestId": "4cc248bf-330b-49e6-9257-c9756e34c267",
10
"correlationId": "4cc248bf-330b-49e6-9257-c9756e34c267",
11
"body": {
12
"created_by": "ACda1bb2889ad6cbe4814c2addbc8a657c",
13
"error_code": null,
14
"interface_type": "API",
15
"latency_ms": 251,
16
"knowledge_base_id": "know_knowledgebase_00000000000000000000000000"
17
}
18
}

Enterprise Knowledge logs errors and warnings for create, search, update, delete, and index operations. Enterprise Knowledge structures every error log entry to help you identify the root cause and take corrective action.

Failed and partial-success events include error_code and display_message in their body. Follow the error_code value to its entry in the Twilio API error reference, which provides:

  • A plain-language description of the error
  • A list of possible causes
  • Suggested actions to resolve the issue
(information)

Info

Error details are also viewable directly in the Twilio Console Debugger.

The following error codes appear in Enterprise Knowledge event logs:

CodeMessageLevel
420001Knowledge could not be createdERROR
420002Partial knowledge refreshWARNING
420003Search query failedERROR
420004Content exceeds knowledge size limitsERROR
420005Text resource ingest failedERROR
420006Failed to crawl or fetch the URLERROR
420007URL crawl partially timed outWARNING
420008File input failedERROR
420009Partial update, content skippedWARNING
420010Knowledge resource update failedERROR
420011Knowledge resource deletion failedERROR
420012Knowledge update validation failedERROR
420013Knowledge base update failedERROR
420014Knowledge base deletion failedERROR