- [HTTP request](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#body.BatchCreateSourcesResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#body.aspect_1)
- [UserContent](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#UserContent)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#UserContent.SCHEMA_REPRESENTATION)
- [GoogleDriveContent](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#GoogleDriveContent)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#GoogleDriveContent.SCHEMA_REPRESENTATION)
- [TextContent](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#TextContent)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#TextContent.SCHEMA_REPRESENTATION)
- [WebContent](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#WebContent)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#WebContent.SCHEMA_REPRESENTATION)
- [VideoContent](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#VideoContent)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#VideoContent.SCHEMA_REPRESENTATION)
- [AgentspaceContent](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#AgentspaceContent)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#AgentspaceContent.SCHEMA_REPRESENTATION)

Creates a list of `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources#Source`s.

### HTTP request

Choose an endpoint:
global us   
`POST https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*/notebooks/*}/sources:batchCreate`

<br />

The URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent resource where the sources will be created. Format: projects/{project}/locations/{location}/notebooks/{notebook} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "userContents": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#UserContent`) } ] } ``` |

| Fields ||
|---|---|
| `userContents[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#UserContent`)`` Required. The `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#UserContent`s to be uploaded. |

### Response body

Response for `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#google.cloud.notebooklm.v1alpha.SourceService.BatchCreateSources` method.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "sources": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources#Source`) } ] } ``` |

| Fields ||
|---|---|
| `sources[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources#Source`)`` The `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources#Source`s. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/discoveryengine.assist.readwrite`
- `https://www.googleapis.com/auth/discoveryengine.readwrite`
- `https://www.googleapis.com/auth/discoveryengine.serving.readwrite`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `discoveryengine.sources.create`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## UserContent

The "Content" messages refer to data the user wants to upload.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "googleDriveContent": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#GoogleDriveContent`) }, "textContent": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#TextContent`) }, "webContent": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#WebContent`) }, "videoContent": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#VideoContent`) }, "agentspaceContent": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#AgentspaceContent`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| The user content. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `googleDriveContent` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#GoogleDriveContent`)`` The content from Google Drive. |
| `textContent` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#TextContent`)`` The text content uploaded as source. |
| `webContent` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#WebContent`)`` The web content uploaded as source. |
| `videoContent` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#VideoContent`)`` The video content uploaded as source. |
| `agentspaceContent` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks.sources/batchCreate#AgentspaceContent`)`` Agentspace content uploaded as source. |
| End of mutually exclusive fields. ||

## GoogleDriveContent

The content from Google Drive.

| JSON representation |
|---|
| ``` { "documentId": string, "mimeType": string, "sourceName": string } ``` |

| Fields ||
|---|---|
| `documentId` | `string` The document ID of the selected document. |
| `mimeType` | `string` The mime type of the selected document. This can be used to differentiate type of content selected in the drive picker. Use application/vnd.google-apps.document for Google Docs or application/vnd.google-apps.presentation for Google Slides. |
| `sourceName` | `string` The name to be displayed for the source. |

## TextContent

The text content uploaded as source.

| JSON representation |
|---|
| ``` { "sourceName": string, "content": string } ``` |

| Fields ||
|---|---|
| `sourceName` | `string` The display name of the text source. |
| `content` | `string` The name to be displayed for the source. |

## WebContent

The web content uploaded as source.

| JSON representation |
|---|
| ``` { "url": string, "sourceName": string } ``` |

| Fields ||
|---|---|
| `url` | `string` If URL is supplied, will fetch the webpage in the backend. |
| `sourceName` | `string` The name to be displayed for the source. |

## VideoContent

Video content uploaded as source.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "youtubeUrl": string // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| Specifies the format of the video content The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `youtubeUrl` | `string` The youtube url of the video content. |
| End of mutually exclusive fields. ||

## AgentspaceContent

Agentspace content uploaded as source.

| JSON representation |
|---|
| ``` { "documentName": string, "engineName": string, "ideaforgeIdeaName": string } ``` |

| Fields ||
|---|---|
| `documentName` | `string` Optional. The full resource name of the Agentspace document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/branches/{branch}/documents/{documentId}`. |
| `engineName` | `string` Optional. Engine to verify the permission of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`. |
| `ideaforgeIdeaName` | `string` Optional. Resource name of the idea forge instance. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/ideaForgeInstances/{instance}` |