Required. The name of the agent to update or create entity types in. Format:projects/<Project ID>/agent.
Authorization requires the followingIAMpermission on the specified resourceparent:
dialogflow.entityTypes.batchUpdate
Request body
The request body contains data with the following structure:
JSON representation
{"languageCode":string,"updateMask":string,// Union fieldentity_type_batchcan be only one of the following:"entityTypeBatchUri":string,"entityTypeBatchInline":{object (EntityTypeBatch)}// End of list of possible types for union fieldentity_type_batch.}
Fields
languageCode
string
Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, seeMultilingual intent and entity data.
Optional. The mask to control which fields get updated.
This is a comma-separated list of fully qualified names of fields. Example:"user.displayName,photo".
Union fieldentity_type_batch. The source of the entity type batch.
For each entity type in the batch:
Ifnameis specified, we update an existing entity type.
Ifnameis not specified, we create a new entity type.entity_type_batchcan be only one of the following:
entityTypeBatchUri
string
The URI to a Google Cloud Storage file containing entity types to update or create. The file format can either be a serialized proto (of EntityBatch type) or a JSON object. Note: The URI must start with "gs://".
[[["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 API method allows for updating or creating multiple entity types within a specified agent in a single operation.\u003c/p\u003e\n"],["\u003cp\u003eThe method is a long-running operation that returns an \u003ccode\u003eOperation\u003c/code\u003e instance, which includes metadata and a \u003ccode\u003eBatchUpdateEntityTypesResponse\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires specifying the parent agent and may include optional parameters for \u003ccode\u003elanguageCode\u003c/code\u003e and \u003ccode\u003eupdateMask\u003c/code\u003e, and requires authorization through the \u003ccode\u003edialogflow.entityTypes.batchUpdate\u003c/code\u003e IAM permission.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should be constructed as a JSON object and can either refer to a file via URI, or include an inline array of entity types.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful requests will result in a response body containing an instance of the \u003ccode\u003eOperation\u003c/code\u003e, and the request also needs to authorize with specific OAuth scopes.\u003c/p\u003e\n"]]],[],null,["# Method: projects.agent.entityTypes.batchUpdate\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\nUpdates/Creates multiple entity types in the specified agent.\n\nThis method is a [long-running operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). The returned `Operation` type has the following method-specific fields:\n\n- `metadata`: An empty [Struct message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n- `response`: [BatchUpdateEntityTypesResponse](/dialogflow/es/docs/reference/rest/v2/BatchUpdateEntityTypesResponse)\n\nNote: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).\n\n### HTTP request\n\n`POST https://{endpoint}/v2/{parent=projects/*/agent}/entityTypes:batchUpdate`\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)."]]