--- title: Extension API description: The API for interacting with the metadata of an extension. api_version: 2025-07 api_name: customer-account-ui-extensions source_url: html: >- https://shopify.dev/docs/api/customer-account-ui-extensions/2025-07/target-apis/platform-apis/extension-api md: >- https://shopify.dev/docs/api/customer-account-ui-extensions/2025-07/target-apis/platform-apis/extension-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/customer-account-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/customer-account-ui-extensions/2025-10/upgrading-to-2025-10) to upgrade your extension. # Extension API The API for interacting with the metadata of an extension. ## StandardApi The base API object provided to this and other `customer-account` extension targets. * **extension** **Extension** **required** Metadata about the extension, including its target, version, and editor context. For configuration details, see [`shopify.extension.toml`](https://shopify.dev/docs/api/customer-account-ui-extensions/2025-07#configuration). ### Extension Metadata about the extension, including its target, version, and editor context. For configuration details, see \[\`shopify.extension.toml\`]\(/docs/api/customer-account-ui-extensions/2025-07#configuration). * apiVersion The API version that was set in the extension config file. ```ts ApiVersion ``` * capabilities The allowed capabilities of the extension, defined in your \[\`shopify.extension.toml\`]\(/docs/api/customer-account-ui-extensions/2025-07#configuration) file. \* \[\`api\_access\`]\(/docs/api/customer-account-ui-extensions/2025-07#configuration): the extension can access the Storefront API. \* \[\`network\_access\`]\(/docs/api/customer-account-ui-extensions/2025-07#configuration): the extension can make external network calls. \* \[\`block\_progress\`]\(/docs/api/customer-account-ui-extensions/2025-07#configuration): the extension can block a buyer's progress and the merchant has allowed this blocking behavior. ```ts StatefulRemoteSubscribable ``` * editor Information about the editor where the extension is being rendered. The value is undefined if the extension isn’t rendering in an editor. ```ts Editor ``` * rendered Whether your extension is currently rendered to the screen. Shopify may render your extension before it's visible in the UI to pre-render content. Your extension may also continue running after the buyer navigates away so it's immediately available if they return. ```ts StatefulRemoteSubscribable ``` * scriptUrl The URL of the JavaScript file that powers this extension target. ```ts string ``` * target The identifier that specifies where in Shopify’s UI your code is being injected. This will be one of the targets you have included in your extension’s configuration file. For available targets, see the \[extension targets overview]\(/docs/api/customer-account-ui-extensions/2025-07/extension-targets-overview). For configuration details, see \[extension targets]\(/docs/apps/app-extensions/configuration#targets). ```ts Target ``` * version The published version of the running extension. For unpublished extensions, the value is \`undefined\`. ```ts string ``` ### ApiVersion The supported GraphQL Admin API versions. Use this to specify which API version your GraphQL queries should execute against. Each version includes specific features, bug fixes, and breaking changes. The \`unstable\` version provides access to the latest features, and can change without notice because it's not subject to versioning guarantees. ```ts '2023-04' | '2023-07' | '2023-10' | '2024-01' | '2024-04' | '2024-07' | '2024-10' | '2025-01' | '2025-04' | 'unstable' ``` ### Capability The capabilities an extension has access to. \* \`api\_access\`: The extension can access the Storefront API. \* \`network\_access\`: The extension can make external network calls. \* \`block\_progress\`: The extension can block a buyer's progress and the merchant has allowed this blocking behavior. \* \`collect\_buyer\_consent.sms\_marketing\`: The extension can collect buyer consent for SMS marketing. \* \`collect\_buyer\_consent.customer\_privacy\`: The extension can register buyer consent decisions that will be honored on Shopify-managed services. \* \`iframe.sources\`: The extension can embed an external URL in an iframe. ```ts 'api_access' | 'network_access' | 'block_progress' | 'collect_buyer_consent.sms_marketing' | 'collect_buyer_consent.customer_privacy' | 'iframe.sources' ``` ### Editor Information about the editor where the extension is being rendered. * type Indicates whether the extension is rendering in the checkout editor. ```ts "checkout" ``` ## use​Extension() Returns the metadata of the extension. ### Returns * **Extension** ### ### ExtensionMetadata about the extension, including its target, version, and editor context. For configuration details, see [`shopify.extension.toml`](https://shopify.dev/docs/api/customer-account-ui-extensions/2025-07#configuration). * **apiVersion** **ApiVersion** The API version that was set in the extension config file. * **capabilities** **StatefulRemoteSubscribable\** The allowed capabilities of the extension, defined in your [`shopify.extension.toml`](https://shopify.dev/docs/api/customer-account-ui-extensions/2025-07#configuration) file. * [`api_access`](https://shopify.dev/docs/api/customer-account-ui-extensions/2025-07#configuration): the extension can access the Storefront API. * [`network_access`](https://shopify.dev/docs/api/customer-account-ui-extensions/2025-07#configuration): the extension can make external network calls. * [`block_progress`](https://shopify.dev/docs/api/customer-account-ui-extensions/2025-07#configuration): the extension can block a buyer's progress and the merchant has allowed this blocking behavior. * **rendered** **StatefulRemoteSubscribable\** Whether your extension is currently rendered to the screen. Shopify may render your extension before it's visible in the UI to pre-render content. Your extension may also continue running after the buyer navigates away so it's immediately available if they return. * **scriptUrl** **string** The URL of the JavaScript file that powers this extension target. * **target** **Target** The identifier that specifies where in Shopify’s UI your code is being injected. This will be one of the targets you have included in your extension’s configuration file. For available targets, see the [extension targets overview](https://shopify.dev/docs/api/customer-account-ui-extensions/2025-07/extension-targets-overview). For configuration details, see [extension targets](https://shopify.dev/docs/apps/app-extensions/configuration#targets). * **editor** **Editor** Information about the editor where the extension is being rendered. The value is undefined if the extension isn’t rendering in an editor. * **version** **string** The published version of the running extension. For unpublished extensions, the value is `undefined`. ## use​Extension​Editor() Returns information about the editor where the extension is being rendered. ### Returns * **Editor | undefined**