---
title: "POST /v1/indexing/datasources/{datasourcesId}/items/{itemsId}:upload"
method: POST
path: "/v1/indexing/datasources/{datasourcesId}/items/{itemsId}:upload"
tags: ["indexing"]
---

# POST /v1/indexing/datasources/{datasourcesId}/items/{itemsId}:upload

`POST /v1/indexing/datasources/{datasourcesId}/items/{itemsId}:upload`

## Request

- Base URL: `https://cloudsearch.googleapis.com`
- URL: `https://cloudsearch.googleapis.com/v1/indexing/datasources/{datasourcesId}/items/{itemsId}:upload`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud_search`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud_search`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud_search.indexing`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud_search.indexing`

Creates an upload session for uploading item content. For items smaller than 100 KB, it's easier to embed the content inline within an index request. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.

## Path parameters

- `datasourcesId` string, required
- `itemsId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string

## Request body

- StartUploadItemRequest: Start upload file request.
  - `connectorName` string: The name of connector making this call. Format: datasources/{source_id}/connectors/{ID}
  - `debugOptions` DebugOptions: Shared request debug options for all cloudsearch RPC methods.
    - `enableDebugging` boolean: If you are asked by Google to help with debugging, set this field. Otherwise, ignore this field.

## Response `200`

Successful response

- UploadItemRef: Represents an upload session reference. This reference is created via upload method. This reference is valid for 30 days after its creation. Updating of item content may refer to this uploaded content via contentDataRef.
  - `name` string: The name of the content reference. The maximum length is 2048 characters.

## Changes

- **2026-12-04** `e6b5623d031d`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud_search` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud_search` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/cloud_search.indexing` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud_search.indexing` was removed from the endpoint's security scheme `Oauth2c`
- **2026-11-09** `b2f1256e48fb`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud_search` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud_search` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/cloud_search.indexing` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud_search.indexing` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/cloudsearch/changes/v1/indexing/datasources/:datasourcesId/items/:itemsId:upload/post.md)

---

[API](https://skmtc.dev/google/apis/cloudsearch.md) - [All operations](https://skmtc.dev/google/apis/cloudsearch/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/cloudsearch/revisions/e6b5623d031d?raw)
