> ## Documentation Index
> Fetch the complete documentation index at: https://docs.strideagents.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Source

> Create a new source and attach it to the specified knowledge base.



## OpenAPI

````yaml POST /knowledge-base/{kb_id}/source
openapi: 3.1.0
info:
  title: Stride Agents API
  description: >

    Build and deploy AI voice agents that can make and receive phone calls with
    natural conversation.


    ## Authentication


    All endpoints require an API key passed via the `Authorization` header:


    ```

    Authorization: Bearer sk_your_api_key

    ```


    ## Resources


    - **Agents** — Create and configure AI voice agents

    - **Calls** — Initiate, monitor, and manage voice calls

    - **Phone Numbers** — Manage phone numbers and routing

    - **Tools** — Define function calling tools for agents

    - **Knowledge Bases** — Upload documents for RAG-powered conversations

    - **Voices** — Browse available TTS voices
  version: 1.0.0
servers:
  - url: /v1
security: []
paths:
  /knowledge-base/{kb_id}/source:
    post:
      tags:
        - Knowledge Bases
      summary: Add source to knowledge base
      description: Create a new source and attach it to the specified knowledge base.
      operationId: add_source_knowledge_base__kb_id__source_post
      parameters:
        - name: kb_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Kb Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddSourceRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    AddSourceRequest:
      properties:
        name:
          type: string
          title: Name
          description: Display name for the source
        type:
          type: string
          title: Type
          description: 'Source type: file, url, text'
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: URL for url-type sources
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
          description: Text content for text-type sources
      type: object
      required:
        - name
        - type
      title: AddSourceRequest
      description: Request body for adding a source to a knowledge base.
    SourceResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        type:
          type: string
          title: Type
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        processing_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Processing Status
        chunks_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Chunks Count
          default: 0
        mime_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Mime Type
        size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
      type: object
      required:
        - id
        - name
        - type
      title: SourceResponse
      description: Source record returned by the API.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      scheme: bearer

````