Skip to main content
Migrate to Polaris

Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.

Action Extension API

Requires the AdminAction component.

The Action Extension API lets you build action extensions that merchants access from the More actions menu on details and index pages. Use this API to create workflows for processing resources, configuring settings, or integrating with external systems.

  • Modal workflows: Build action extensions that display in modal overlays from More actions menus.
  • Resource context: Access the current resource (product, order, customer) to display contextual actions.
  • Bulk operations: Process multiple selected resources in bulk action workflows.
  • Modal control: Close modals programmatically after completing operations or saving data.
Support
Targets (23)

The Action Extension API object provides properties for action extensions that render in modal overlays. Access the following properties on the API object to interact with the current context, control the modal, and display picker dialogs.

required

Provides methods for authenticating calls to your app backend. Use the idToken() method to retrieve a signed JWT token that verifies the current user's identity for secure server-side operations.

Anchor to close
close
() => void
required

Closes the extension modal. Use this when your extension completes its task or the merchant wants to exit. Equivalent to clicking the close button in the overlay corner.

required

An array of currently viewed or selected resource identifiers. Use this to access the IDs of items in the current context, such as selected products in an index page or the product being viewed on a details page. The available IDs depend on the extension target and user interactions.

Anchor to extension
extension
{ target: ; }
required

The identifier of the running extension target. Use this to determine which target your extension is rendering in and conditionally adjust functionality or UI based on the extension context.

required

Utilities for translating content according to the current localization of the admin. Use these methods to provide translated strings that match the merchant's language preferences, ensuring your extension is accessible to a global audience.

Anchor to intents
intents
required

Provides information to the receiver of an intent. Use this to access data passed from other extensions or parts of the admin when your extension is launched through intent-based navigation.

Anchor to picker
picker
required

Opens a custom Picker dialog for selecting from a list of custom options. Use this when you need merchants to choose from app-specific data that isn't a standard Shopify resource.

Anchor to query
query
< = unknown, Variables = { [key: string]: unknown; }>(query: string, options?: { variables?: Variables; version?: Omit<, "2023-04">; }) => Promise<{ data?: ; errors?: []; }>
required

Executes GraphQL queries against the GraphQL Admin API. Use this to fetch shop data, manage resources, or perform mutations. Queries are automatically authenticated with the current user's permissions. Optionally specify GraphQL variables and API version for your query.

Anchor to resourcePicker
resourcePicker
required

Opens the Resource Picker modal for selecting products, variants, or collections. Use this to let merchants choose resources that your extension needs to work with.


  • Check array length for bulk operations: When actions appear on index pages with bulk selection, api.data.selected can contain multiple resources. Check the array length and handle batch operations accordingly.

  • Action extensions must call api.close() to dismiss the modal. Modal actions remain open indefinitely until explicitly closed.
  • Modal overlays can't be resized. The modal dimensions are fixed by the Shopify admin.
  • Action extensions can't modify the page layout underneath the modal or persist UI after closing.
  • Multiple modals can't be stacked. Opening a picker closes the current modal context temporarily.

Was this page helpful?