chat.spaces.messages.replaceCards
Replace cards in an existing Google Chat message with new card content, or pass an empty list to remove app-created cards already present.
Instructions
Replaces the cards included in a message. A Chat app can only replace cards on a human-created message if the message already contains cards, and the cards were created by the app. If the app replaces the cards with an empty list, the cards are removed. After removing the cards, the app cannot add cards back to the message. Requires app authentication with the authorization scope: - https://www.googleapis.com/auth/chat.bot [HTTP POST] — creates or triggers a change; refused under --readonly safety profiles. Returns the API's response resource as JSON — request body is a JSON ReplaceMessageCardsRequest object accepting cardsV2; pass it via params or whole via body_file Siblings over the same resource: create, delete, get, list, patch, search, update.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | [URL path segment] Required. The resource name of the message. Format: `spaces/{space}/messages/{message}` | |
| query | No | Extra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe. | |
| params | No | Parameter map merged into the request; typed parameters win. | |
| dry_run | No | Return the request that would be sent, without sending it. | |
| body_file | No | Read the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON ReplaceMessageCardsRequest object. | |
| request_body | No | Request body of type ReplaceMessageCardsRequest: pass it via `params` (merged into the built body) or whole via `body_file`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||