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

# List Repositories

> List the repositories you can read, sorted by name.

> [!NOTE]
>
> **Preview.** This endpoint is available to organisations in the Wordsmith MCP pilot. Other organisations receive `403 mcp_not_enabled`. See the [preview overview](/preview).

Returns a page of the repositories you can read, sorted by name. A repository is a searchable collection of documents. Use `query` to find one by name.

The list includes your organisation's repositories and the global ones Wordsmith publishes. Read a repository's indexing state with [Get Repository](/api-reference/repositories/get-repository).

## Authentication

Requires an API key, or an OAuth token with `repositories:read`.

## Query parameters

**query** `string`

Only repositories whose name contains this text. The match ignores case.

**cursor** `string`

The `cursor` from the previous page. Leave it out for the first page.

**limit** `integer` (default: 50)

Repositories per page, from `1` to `100`.

## Response

Returns `200` with a page of repositories. `cursor` is `null` on the last page.

**items** `object[]`

**properties**

**id** `string`

The repository id.

**name** `string`

**description** `string | null`

**document\_count** `integer | null`

Documents in the repository. `null` when the count is unavailable.

**url** `string`

The repository in the Wordsmith web app. Opening it needs a Wordsmith sign-in.

**created\_at** `string`

**updated\_at** `string | null`

**cursor** `string | null`

```bash cURL theme={null}
curl "https://api.wordsmith.ai/api/v1/repositories?query=lease&limit=50" \
  -H "Authorization: Bearer sk-ws-api1-your_api_key_here"
```

```json Response theme={null}
{
  "items": [
    {
      "id": "b23066a1-44cb-4b31-8b44-c723dc507d9b",
      "name": "Commercial leases",
      "description": "Signed leases for the UK retail estate.",
      "document_count": 214,
      "url": "https://app.wordsmith.ai/repositories/b23066a1-44cb-4b31-8b44-c723dc507d9b",
      "created_at": "2026-10-13T08:12:04Z",
      "updated_at": "2026-10-13T09:40:51Z"
    },
    {
      "id": "dc8cea44-62d7-414a-be83-1d80e9b5cc7a",
      "name": "Lease precedents",
      "description": null,
      "document_count": 37,
      "url": "https://app.wordsmith.ai/repositories/dc8cea44-62d7-414a-be83-1d80e9b5cc7a",
      "created_at": "2026-10-13T07:55:19Z",
      "updated_at": "2026-10-13T09:38:02Z"
    }
  ],
  "cursor": "eyJtb2RlIjoicmVwb3NpdG9yaWVzIn0"
}
```

## Errors

| Status | `error_code` | When |
| - | - | - |
| 400 | `invalid_request_body` | `limit` is not a whole number from `1` to `100`. |
| 400 | `bad_request` | `cursor` is not one this endpoint returned. |
| 401 | `unauthorized` | The API key or token is missing or invalid. |
| 403 | `mcp_not_enabled` | Your organisation is not in the preview. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.