- [HTTP request](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/projects.locations.apps.versions.message/send#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/projects.locations.apps.versions.message/send#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/projects.locations.apps.versions.message/send#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/projects.locations.apps.versions.message/send#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/projects.locations.apps.versions.message/send#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/projects.locations.apps.versions.message/send#body.aspect)

Sends a message to an agent.

### HTTP request

`POST https://ces.googleapis.com/v1/{tenant=projects/*/locations/*/apps/*/versions/*}/message:send`

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

### Path parameters

| Parameters ||
|---|---|
| `tenant` | `string` Optional. Opaque routing identifier. Must match the `tenant` value from the selected `AgentInterface` in the Agent Card when that field is set. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "message": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/tasks#Message`) }, "configuration": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SendMessageConfiguration`) }, "metadata": { object } } ``` |

| Fields ||
|---|---|
| `message` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/tasks#Message`)`` Required. The message to send to the agent. |
| `configuration` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SendMessageConfiguration`)`` Configuration for the send request. |
| `metadata` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` A flexible key-value map for passing additional context or parameters. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SendMessageResponse`.

### Authorization scopes

Requires one of the following OAuth scopes:

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

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