---
title: "Set up Google Drive knowledge base"
method: PUT
path: "/v1/agents/{id}/knowledge-bases/google-drive"
---

# Set up Google Drive knowledge base

`PUT /v1/agents/{id}/knowledge-bases/google-drive`

## Request

- Base URL: `https://api.runbear.io`
- URL: `https://api.runbear.io/v1/agents/{id}/knowledge-bases/google-drive`
- Auth: HTTP bearer

Configure a Google Drive knowledge base for an agent using a service account integration. If exactly one service account is available to the user who owns the API key, it is auto-selected.

## Path parameters

- `id` string, uuid, required: The ID of the agent to retrieve

## Request body

- GoogleDriveKBSetupRequest: Google Drive knowledge base setup request
  - `integrationId` string, uuid: Service account integration ID. Required when more than one service account is available to the user who owns the API key. Auto-detected if only one is.
  - `fileIds` string[], required: Google Drive file or folder IDs to use as knowledge base

## Response `200`

Default Response

- object
  - `success` true, required
  - `message` string, required

## Other responses

- `400`: Default Response
- `403`: The user who owns the API key may not attach this service account. `code` is `forbidden_google_drive_sa`. Terminal until an admin grants access.
- `404`: Default Response

---

[API](https://skmtc.dev/runbear/apis/runbear-api.md) - [All operations](https://skmtc.dev/runbear/apis/runbear-api/llms.txt) - [OpenAPI document](https://skmtc.dev/runbear/apis/runbear-api/revisions/c6a9c3066a5a?raw)
