- [HTTP request](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.assistants.agents.a2a.v1.message/send#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.assistants.agents.a2a.v1.message/send#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.assistants.agents.a2a.v1.message/send#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.assistants.agents.a2a.v1.message/send#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.assistants.agents.a2a.v1.message/send#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.assistants.agents.a2a.v1.message/send#body.SendMessageResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.assistants.agents.a2a.v1.message/send#body.aspect)

Send a message to the agent. This is a blocking call that will return the task once it is completed, or a LRO if requested.

### HTTP request

Choose an endpoint:
global us   
`POST https://discoveryengine.googleapis.com/v1/{tenant=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*}/a2a/v1/message:send`

<br />

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

### Path parameters

| Parameters ||
|---|---|
| `tenant` | `string` Optional tenant, provided as a path parameter. Experimental, might still change for 1.0 release. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "message": { object (`https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.assistants.agents.a2a.v1.tasks#Message`) }, "configuration": { object (`https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/SendMessageConfiguration`) }, "metadata": { object } } ``` |

| Fields ||
|---|---|
| `message` | ``object (`https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.assistants.agents.a2a.v1.tasks#Message`)`` Required. The message to send to the agent. |
| `configuration` | ``object (`https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/SendMessageConfiguration`)`` Configuration for the send request. |
| `metadata` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Optional metadata for the request. |

### Response body

////// Response Messages ///////////

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

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "task": { object (`https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.assistants.agents.a2a.v1.tasks#Task`) }, "message": { object (`https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.assistants.agents.a2a.v1.tasks#Message`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `task` | ``object (`https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.assistants.agents.a2a.v1.tasks#Task`)`` |
| `message` | ``object (`https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.assistants.agents.a2a.v1.tasks#Message`)`` |
| End of mutually exclusive fields. ||

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/discoveryengine.readwrite`
- `https://www.googleapis.com/auth/discoveryengine.serving.readwrite`

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