Reloads the specified document from its specified source, contentUri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes.
This method is a long-running operation. The returned Operation type has the following method-specific fields:
Required. The name of the document to reload. Format: projects/<Project ID>/locations/<Location
ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>
Request body
The request body contains data with the following structure:
JSON representation
{"importGcsCustomMetadata": boolean,"smartMessagingPartialUpdate": boolean,// Union field source can be only one of the following:"contentUri": string// End of list of possible types for union field source.}
Fields
importGcsCustomMetadata
boolean
Optional. Whether to import custom metadata from Google Cloud Storage. Only valid when the document source is Google Cloud Storage URI.
smartMessagingPartialUpdate
boolean
Optional. When enabled, the reload request is to apply partial update to the smart messaging allowlist.
Union field source. The source for document reloading.
If provided, the service will load the contents from the source and update document in the knowledge base.
Reloading from a new document source is allowed for smart messaging documents only. If you want to update the source for other document types, please delete the existing document and create a new one instead. source can be only one of the following:
contentUri
string
Optional. The path of gcs source file for reloading document content. For now, only gcs uri is supported.
For documents stored in Google Cloud Storage, these URIs must have the form gs://<bucket-name>/<object-name>.
Response body
If successful, the response body contains an instance of Operation.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-27 UTC."],[[["\u003cp\u003eThis endpoint reloads a specified document from its source, deleting the previously loaded content and potentially causing side effects due to internal changes.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request is a POST operation to a specific URL that includes project and document identifiers, using gRPC Transcoding syntax.\u003c/p\u003e\n"],["\u003cp\u003eThe request body can include parameters for importing custom metadata and enabling partial updates, and must specify the content source via the contentUri which supports a GCS URI.\u003c/p\u003e\n"],["\u003cp\u003eUpon successful reloading, an \u003ccode\u003eOperation\u003c/code\u003e instance is returned in the response body, which can be used to obtain information on the status and result of the operation.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires either \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/dialogflow\u003c/code\u003e OAuth scopes.\u003c/p\u003e\n"]]],[],null,["# Method: projects.knowledgeBases.documents.reload\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nReloads the specified document from its specified source, contentUri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes.\n\nThis method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields:\n\n- `metadata`: [KnowledgeOperationMetadata](/dialogflow/es/docs/reference/rest/v2/KnowledgeOperationMetadata)\n- `response`: [Document](/dialogflow/es/docs/reference/rest/v2/projects.agent.knowledgeBases.documents#Document)\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.\n\n### HTTP request\n\n`POST https://{endpoint}/v2/{name=projects/*/knowledgeBases/*/documents/*}:reload`\n\nWhere `{endpoint}` is one of the [supported service endpoints](/dialogflow/es/docs/reference/rest#rest_endpoints).\n\nThe URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/dialogflow/es/docs/reference/rest/v2/projects.locations.operations#Operation).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/dialogflow`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]