Docs/Builder API/Builder API

    Knowledge Sources

    Last updated · MAR 2026·Read as Markdown

    Knowledge sources are the documents, URLs, and files you've loaded to train your agent. Programming guides, AS-built drawings, manufacturer spec sheets, commissioning checklists, internal SOPs. This endpoint lets you check their processing status and metadata.

    Note: Internal file paths (storage locations) are never exposed through this endpoint. Only public-facing metadata is returned.
    code
    GET /api/v1/apps/{appId}/knowledge-sources

    Returns a paginated list of knowledge sources. Uses offset-based pagination.

    Query parameters#

    ParameterTypeDefaultDescription
    limitinteger25Results per page (1-100).
    offsetinteger0Number of results to skip.
    statusstring-Filter by processing status.
    typestring-Filter by source type.

    Status values: pending, processing, completed, failed, deleting.

    Type values: file, url, google_drive, notion, text, qa, sitemap, youtube, confluence.

    Example#

    bash
    curl "https://app.avcodex.com/api/v1/apps/YOUR_APP_ID/knowledge-sources?status=completed" \
      -H "Authorization: Bearer avcodex_YOUR_API_KEY"

    Response#

    json
    {
      "data": [
        {
          "id": "ks-001",
          "name": "Crestron 4-Series Programming Guide",
          "type": "file",
          "status": "completed",
          "url": null,
          "error_message": null,
          "chunk_count": 1,
          "file_size_bytes": 24576,
          "refresh_interval_hours": null,
          "last_refreshed_at": null,
          "created_at": "2025-05-10T08:00:00Z",
          "updated_at": "2025-05-10T08:02:30Z"
        },
        {
          "id": "ks-002",
          "name": "Manufacturer Firmware Notes",
          "type": "url",
          "status": "completed",
          "url": "https://example.com/firmware",
          "error_message": null,
          "chunk_count": 24,
          "file_size_bytes": null,
          "refresh_interval_hours": 168,
          "last_refreshed_at": "2025-06-01T06:00:00Z",
          "created_at": "2025-05-12T14:00:00Z",
          "updated_at": "2025-06-01T06:00:00Z"
        },
        {
          "id": "ks-003",
          "name": "Q-SYS Lua Module Library Docs",
          "type": "url",
          "status": "processing",
          "url": "https://docs.example.com",
          "error_message": null,
          "chunk_count": 0,
          "file_size_bytes": null,
          "refresh_interval_hours": null,
          "last_refreshed_at": null,
          "created_at": "2025-06-15T12:00:00Z",
          "updated_at": "2025-06-15T12:00:05Z"
        }
      ],
      "pagination": {
        "has_more": false,
        "total": 3,
        "limit": 25,
        "offset": 0
      }
    }

    Response fields#

    FieldTypeDescription
    idstringUnique knowledge source identifier.
    namestringDisplay name.
    typestringSource type: file, url, google_drive, notion, text, qa, sitemap, youtube, confluence.
    statusstringProcessing status: pending, processing, completed, failed, or deleting.
    urlstring or nullSource URL, if applicable.
    error_messagestring or nullError details if the source failed processing.
    chunk_countintegerNumber of chunks extracted.
    file_size_bytesinteger or nullFile size in bytes.
    refresh_interval_hoursinteger or nullAuto-refresh interval in hours.
    last_refreshed_atISO 8601 or nullWhen the source was last refreshed.
    created_atISO 8601When the source was added.
    updated_atISO 8601When the source was last updated.

    Checking for failed sources#

    bash
    curl "https://app.avcodex.com/api/v1/apps/YOUR_APP_ID/knowledge-sources?status=failed" \
      -H "Authorization: Bearer avcodex_YOUR_API_KEY"

    *AVCodex · Your AV expertise. Amplified by AI.*

    Was this helpful?
    Edit this page →