# List Knowledge Bases

`GET /api/v1/knowledge`

## Description
List all knowledge bases in a workspace.

## Parameters

- **workspaceId** (query) (required) — `string`: The unique identifier of the workspace.

- **limit** (query) — `integer`: Page size (1-100). Omit both limit and cursor to receive every knowledge base in one response; when only cursor is sent the page size defaults to 50.

- **cursor** (query) — `string`: Pagination cursor returned in a previous response's nextCursor field.

## Responses

### 200 — List of knowledge bases in the workspace.

```json
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "description": "Whether the request was successful."
    },
    "data": {
      "type": "object",
      "properties": {
        "knowledgeBases": {
          "type": "array",
          "items": {
            "type": "object",
            "description": "A knowledge base for storing and searching document embeddings.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique knowledge base identifier."
              },
              "name": {
                "type": "string",
                "description": "Knowledge base name."
              },
              "description": {
                "type": "string",
                "nullable": true,
                "description": "Optional description."
              },
              "tokenCount": {
                "type": "integer",
                "description": "Total token count across all documents."
              },
              "embeddingModel": {
                "type": "string",
                "description": "Embedding model used (e.g. text-embedding-3-small)."
              },
              "embeddingDimension": {
                "type": "integer",
                "description": "Embedding vector dimension."
              },
              "chunkingConfig": {
                "$ref": "#/components/schemas/ChunkingConfig"
              },
              "docCount": {
                "type": "integer",
                "description": "Number of documents in the knowledge base."
              },
              "connectorTypes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Types of connectors attached to this knowledge base."
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "description": "ISO 8601 timestamp when the knowledge base was created."
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "description": "ISO 8601 timestamp when the knowledge base was last modified."
              }
            }
          },
          "description": "Array of knowledge base objects in the workspace."
        },
        "totalCount": {
          "type": "integer",
          "description": "Total number of knowledge bases."
        }
      },
      "description": "Response payload containing the list of knowledge bases."
    },
    "nextCursor": {
      "type": "string",
      "nullable": true,
      "description": "Cursor for fetching the next page. null when there are no more results."
    },
    "limits": {
      "type": "object",
      "description": "Rate limit and usage information attached to the /api/v1 workflows, logs, and audit logs responses. The Execute Workflow and Get Job Status responses do not include it.",
      "properties": {
        "workflowExecutionRateLimit": {
          "type": "object",
          "description": "Current rate limit status for workflow executions.",
          "properties": {
            "sync": {
              "description": "Rate limit bucket for synchronous executions.",
              "$ref": "#/components/schemas/RateLimitBucket"
            },
            "async": {
              "description": "Rate limit bucket for asynchronous executions.",
              "$ref": "#/components/schemas/RateLimitBucket"
            }
          }
        },
        "usage": {
          "type": "object",
          "description": "Current billing period usage and plan limits.",
          "properties": {
            "currentPeriodCost": {
              "type": "number",
              "description": "Total spend in the current billing period in USD.",
              "example": 1.25
            },
            "limit": {
              "type": "number",
              "description": "Maximum allowed spend for the current billing period in USD.",
              "example": 50
            },
            "plan": {
              "type": "string",
              "description": "Your current subscription plan (e.g., free, pro, team).",
              "example": "pro"
            },
            "isExceeded": {
              "type": "boolean",
              "description": "Whether the usage limit has been exceeded. Executions may be blocked when true.",
              "example": false
            }
          }
        }
      }
    }
  }
}
```

### 400 — Invalid request parameters. Check the details array for specific validation errors.

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Human-readable error message describing the validation failure."
    },
    "details": {
      "type": "array",
      "description": "List of specific validation errors with field-level details.",
      "items": {
        "type": "object"
      }
    }
  }
}
```

### 401 — Invalid or missing API key. Ensure the X-API-Key header is set with a valid key.

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Human-readable error message."
    }
  }
}
```

### 403 — Access denied. You do not have permission to access this resource. For audit log endpoints, this requires an Enterprise subscription and organization admin/owner role.

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Human-readable error message."
    }
  }
}
```

### 429 — Rate limit exceeded. Wait for the duration specified in the Retry-After header before retrying.

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Human-readable error message with rate limit details."
    }
  }
}
```
