- [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/Icon#SCHEMA_REPRESENTATION)

An icon displayed in a widget on a card. For an example in Google Chat apps, see [Add an icon](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_icon).

Supports [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons) and [custom](https://developers.google.com/workspace/chat/format-messages#customicons) icons.

![](https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg) ![](https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg) Available for Google Chat apps and Google Workspace add-ons.

| JSON representation |
|---|
| ``` { "altText": string, "imageType": enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/ImageType`), "knownIcon": string, "iconUrl": string, "materialIcon": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/MaterialIcon`) } } ``` |

| Fields ||
|---|---|
| `altText` | `string` Optional. A description of the icon used for accessibility. If unspecified, the default value `Button` is provided. As a best practice, you should set a helpful description for what the icon displays, and if applicable, what it does. For example, `A user's account portrait`, or `Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat`. If the icon is set in a `https://developers.google.com/workspace/chat/api/reference/rest/v1/Button`, the `altText` appears as helper text when the user hovers over the button. However, if the button also sets `text`, the icon's `altText` is ignored. |
| `imageType` | ``enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/ImageType`)`` The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a built-in icon. |
| The icon displayed in the widget on the card. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `knownIcon` | `string` Display one of the built-in icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [built-in icons](https://developers.google.com/workspace/chat/format-messages#builtinicons). |
| `iconUrl` | `string` Display a custom icon hosted at an HTTPS URL. For example: "iconUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png" Supported file types include `.png` and `.jpg`. |
| `materialIcon` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/MaterialIcon`)`` Display one of the [Google Material Icons](https://fonts.google.com/icons). For example, to display a [checkbox icon](https://fonts.google.com/icons?selected=Material+Symbols+Outlined:check_box:FILL@0;wght@400;GRAD@0;opsz@48), use "materialIcon": { "name": "check_box" } ![](https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg) Available for Google Chat apps and unavailable for Google Workspace add-ons. |
| End of mutually exclusive fields. ||