- [HTTP request](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.testCases/patch#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.testCases/patch#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.testCases/patch#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.testCases/patch#body.request_body)
- [Response body](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.testCases/patch#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.testCases/patch#body.aspect)
- [Try it!](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.testCases/patch#try-it)

Updates the specified test case.

### HTTP request

Choose an endpoint:
global   
`PATCH https://dialogflow.googleapis.com/v3/{testCase.name=projects/*/locations/*/agents/*/testCases/*}`

<br />

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

**OR**

`PATCH https://{endpoint}/v3/{testCase.name=projects/*/locations/*/agents/*/testCases/*}`

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 ||
|---|---|
| `testCase.name` | `string` The unique identifier of the test case. `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.testCases/create#google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase` will populate the name automatically. Otherwise use format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`. |

### Query parameters

| Parameters ||
|---|---|
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Required. The mask to specify which fields should be updated. The `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.testCases#TestCase.FIELDS.creation_time` and `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.testCases#TestCase.FIELDS.last_test_result` cannot be updated. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.testCases#TestCase`.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.testCases#TestCase`.

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