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

Data ingestion API. Ingests context references for an existing conversation.

### HTTP request

Choose an endpoint:
global   
`POST https://dialogflow.googleapis.com/v2beta1/{conversation=projects/*/locations/*/conversations/*}:ingestContextReferences`

<br />

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

**OR**

`POST https://{endpoint}/v2beta1/{conversation=projects/*/locations/*/conversations/*}:ingestContextReferences`

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 ||
|---|---|
| `conversation` | `string` Required. Resource identifier of the conversation to ingest context information for. Format: `projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `conversation`: - `dialogflow.conversations.update` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "contextReferences": { string: { object (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2beta1/projects.conversations#Conversation.ContextReference`) }, ... } } ``` |

| Fields ||
|---|---|
| `contextReferences` | ``map (key: string, value: object (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2beta1/projects.conversations#Conversation.ContextReference`))`` Required. The context references to ingest. The key is the name of the context reference and the value contains the contents of the context reference. The key is used to incorporate ingested context references to enhance the generator. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |

### Response body

The response message for \[ConversationsService.IngestContextReferences\]\[\].

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

| JSON representation |
|---|
| ``` { "ingestedContextReferences": { string: { object (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2beta1/projects.conversations#Conversation.ContextReference`) }, ... } } ``` |

| Fields ||
|---|---|
| `ingestedContextReferences` | ``map (key: string, value: object (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2beta1/projects.conversations#Conversation.ContextReference`))`` All context references ingested. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |

### 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).