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

Returns preliminary intent match results, doesn't change the session status.

### HTTP request

Choose an endpoint:
global   
`POST https://dialogflow.googleapis.com/v3beta1/{session=projects/*/locations/*/agents/*/sessions/*}:matchIntent`

<br />

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

**OR**

`POST https://{endpoint}/v3beta1/{session=projects/*/locations/*/agents/*/sessions/*}:matchIntent`

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

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

### Path parameters

| Parameters ||
|---|---|
| `session` | `string` Required. The name of the session this query is sent to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/sessions/<SessionID>` or `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/sessions/<SessionID>`. If `Environment ID` is not specified, we assume default 'draft' environment. It's up to the API caller to choose an appropriate `Session ID`. It can be a random number or some type of session identifiers (preferably hashed). The length of the `Session ID` must not exceed 36 characters. For more information, see the [sessions guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `session`: - `dialogflow.sessions.detectIntent` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "queryParams": { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/projects.locations.agents.conversations#QueryParameters`) }, "queryInput": { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/QueryInput`) }, "persistParameterChanges": boolean } ``` |

| Fields ||
|---|---|
| `queryParams` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/projects.locations.agents.conversations#QueryParameters`)`` The parameters of this query. |
| `queryInput` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/QueryInput`)`` Required. The input specification. |
| `persistParameterChanges` | `boolean` Persist session parameter changes from `queryParams`. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/MatchIntentResponse`.

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