Knowledge

Create Knowledge Source

Changed on

Create a new knowledge source from various data sources such as web content, files, or raw text. The knowledge source will be processed and indexed to enable semantic search and retrieval.

Best practices

To maximize the effectiveness of Knowledge, consider the following best practices:

Assess and optimize content: Regularly evaluate your existing Knowledge sources for accuracy, relevance, and coverage. Identify any gaps or outdated information that could hinder the Assistant's performance.

Simplify and structure content: Ensure that the content is clear and concise. Use headings, bullet points, and metadata to make information straightforward to navigate for both the AI Assistant and your users.

Prioritize high-impact content: Focus on updating and maintaining content that is frequently accessed or critical to customer interactions. Consider using analytics to determine which Knowledge entries are most valuable.

post/v2/KnowledgeBases/{kbId}/Knowledge

Request

  • Base URL
    https://knowledge.twilio.com
  • URL
    https://knowledge.twilio.com/v2/KnowledgeBases/{kbId}/Knowledge
  • Auth
    HTTP basic

Request body

namestring required

The name of the knowledge source.

descriptionstring

A detailed description of the knowledge source and when to use it. This helps provide context about the content and its intended purpose.

Example request

{
  "name": "Company FAQ Knowledge Base",
  "source": {
    "type": "Text",
    "content": "This is the raw text content that will be processed as knowledge."
  }
}

Response

Created

namestring required

The name of the knowledge source.

descriptionstring

A detailed description of the knowledge source and when to use it. This helps provide context about the content and its intended purpose.

idstring required

The unique identifier of knowledge source.

status'SCHEDULED' | 'QUEUED' | 'PROCESSING' | 'COMPLETED' | 'FAILED' required

The status of processing the knowledge source ('SCHEDULED', 'QUEUED', 'PROCESSING', 'COMPLETED', 'FAILED').

createdAtstring date-time required

The date and time in GMT when the Knowledge was created specified in ISO 8601 format.

updatedAtstring date-time required

The date and time in GMT when the Knowledge was last updated specified in ISO 8601 format.

Example response

{
  "id": "know_knowledge_00000000000000000000000000",
  "name": "Company FAQ Knowledge Base",
  "description": "Frequently asked questions and answers for customer support",
  "status": "COMPLETED",
  "source": {
    "type": "Web",
    "url": "https://example.com/faq",
    "crawlDepth": 2,
    "crawlPeriod": "NEVER"
  },
  "createdAt": "2026-01-15T10:30:00Z",
  "updatedAt": "2026-01-15T11:45:00Z"
}

Changes

    • info

      added the new optional request property /////

    • info

      added the optional property ///// to the response with the status

    • breaking

      removed the enum value text/mdx of the request property /////

    • breaking

      the response property's max was increased from 99999.00 to 999999.00 for the response status

    • breaking

      the response property's max was increased from 99999.00 to 999999.00 for the response status

    • breaking

      the response property's max was increased from 99999.00 to 999999.00 for the response status

    • breaking

      the response property's max was increased from 99999.00 to 999999.00 for the response status

    • breaking

      the response property's max was increased from 99999.00 to 999999.00 for the response status

    • info

      removed the text/mdx enum value from the ///// response property for the response status