--- title: Announcement API description: The API for interacting with the announcement bar. api_version: 2025-07 api_name: checkout-ui-extensions source_url: html: >- https://shopify.dev/docs/api/checkout-ui-extensions/2025-07/target-apis/platform-apis/announcement-api md: >- https://shopify.dev/docs/api/checkout-ui-extensions/2025-07/target-apis/platform-apis/announcement-api.md --- Migrate to Polaris Version 2025-07 is the last API version to support React-based UI components. Later versions use [web components](https://shopify.dev/docs/api/checkout-ui-extensions/latest/polaris-web-components), native UI elements with built-in accessibility, better performance, and consistent styling with [Shopify's design system](https://shopify.dev/docs/apps/design). Check out the [migration guide](https://shopify.dev/docs/api/checkout-ui-extensions/2026-04/upgrading-to-2026-04) to upgrade your extension. # Announcement API The API for interacting with the announcement bar. ### Support Targets (1) ### Supported targets * purchase.​thank-you.​announcement.​render ## AnnouncementApi The API object provided to the `purchase.thank-you.announcement.render` extension target. * **announcement** **Announcement** **required** ### Announcement * addEventListener Listen for events from the announcement bar. ```ts (type: "close", cb: () => void) => void ``` * close Close the Announcement bar. ```ts () => void ``` * removeEventListener Remove a listener for events from the announcement bar. ```ts (type: "close", cb: () => void) => void ``` ## Related [Reference - Targets](https://shopify.dev/docs/api/checkout-ui-extensions/targets) [Reference - Components](https://shopify.dev/docs/api/checkout-ui-extensions/components) [Reference - Configuration](https://shopify.dev/docs/api/checkout-ui-extensions/configuration) [Learn - Tutorials](https://shopify.dev/apps/checkout)