- [HTTP request](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.agent.entityTypes.entities/batchUpdate#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.agent.entityTypes.entities/batchUpdate#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.agent.entityTypes.entities/batchUpdate#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.agent.entityTypes.entities/batchUpdate#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.agent.entityTypes.entities/batchUpdate#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.agent.entityTypes.entities/batchUpdate#body.aspect)
- [Try it!](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.agent.entityTypes.entities/batchUpdate#try-it)

Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request.

This 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:

- `metadata`: An empty [Struct message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
- `response`: An [Empty message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)

Note: You should always train an agent prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/es/docs/training).

### HTTP request

Choose an endpoint:
global   
`POST https://dialogflow.googleapis.com/v2/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchUpdate`

<br />

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

**OR**

`POST https://{endpoint}/v2/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchUpdate`

Where `{endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest#rest_endpoints).

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The name of the entity type to update or create entities in. Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `dialogflow.entityTypes.batchUpdateEntities` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "entities": [ { object (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/Entity`) } ], "languageCode": string, "updateMask": string } ``` |

| Fields ||
|---|---|
| `entities[]` | ``object (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/Entity`)`` Required. The entities to update or create. |
| `languageCode` | `string` Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). |
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` 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"`. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.operations#Operation`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/dialogflow`

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