# Get a knowledge base

> The knowledge base and its settings.

Source: https://docs.stacksync.com/api-reference/knowledge-bases/get_knowledge_base

`GET https://api.stacksync.com/v1/workspaces/{workspace_id}/knowledge-bases/{knowledge_base_id}`

- Operation: `get_knowledge_base`
- Resource: Knowledge bases
- Access: read-only

## Authentication

- `Authorization: Bearer <key>`: A workspace API key (workspace_…, created by a workspace owner under Workspace settings > Stacksync API) acts with editor rights on that workspace only; a user API key (user_…, created under Profile > Stacksync API) acts as that user in every workspace they belong to. POST, PUT and PATCH requests must send Content-Type: application/json. Every authentication failure answers 403.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace_id` | integer | Yes | The workspace. List the ones your key can reach with GET /v1/workspaces. |
| `knowledge_base_id` | string (uuid) | Yes | The knowledge base. |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `region` | string (besg \| usnv) | Yes | Region of the resource: besg (Europe) or usnv (United States), as GET /v1/regions lists them |

## Returns

### 200 OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `knowledge_base_id` | string | Yes |  |
| `name` | string | Yes |  |
| `resource_id` | string | Yes |  |
| `region` | string | Yes |  |
| `is_shared_with_workspace` | boolean | Yes |  |
| `folder_id` | string \| null | Yes |  |
| `created_time` | string (date-time) | Yes |  |
| `last_modified_time` | string (date-time) | Yes |  |

## Example request

```bash
curl -X GET "https://api.stacksync.com/v1/workspaces/{workspace_id}/knowledge-bases/{knowledge_base_id}?region=besg" \
  -H "Authorization: Bearer $STACKSYNC_API_KEY"
```

## Example response (200)

```json
{
  "knowledge_base_id": "<knowledge_base_id>",
  "name": "<name>",
  "resource_id": "<resource_id>",
  "region": "<region>",
  "is_shared_with_workspace": false,
  "folder_id": "<folder_id>",
  "created_time": "2027-01-15T09:00:00Z",
  "last_modified_time": "2027-01-15T09:00:00Z"
}
```

## Errors

| Status | Meaning | Body |
| --- | --- | --- |
| 400 | Bad Request | `{ "error": string, "msg": string, "field": string \| null }` |
| 403 | Forbidden | `{ "error": string, "msg": string, "field": string \| null }` |
| 404 | Not Found | `{ "error": string, "msg": string, "field": string \| null }` |

## Related

- [API Reference overview](https://docs.stacksync.com/api-reference): base URLs, regions, pagination, idempotency and errors
- [Authentication](https://docs.stacksync.com/api-reference/authentication): API keys and the 403 answers
- OpenAPI document: https://docs.stacksync.com/openapi.json
- [List knowledge bases](https://docs.stacksync.com/api-reference/knowledge-bases/list_knowledge_bases)
- [Create a knowledge base](https://docs.stacksync.com/api-reference/knowledge-bases/create_knowledge_base)
- [Update a knowledge base](https://docs.stacksync.com/api-reference/knowledge-bases/update_knowledge_base)
- [Delete a knowledge base](https://docs.stacksync.com/api-reference/knowledge-bases/delete_knowledge_base)