Customer Account API: expose customer segment membership for the authenticated customer (feature request)

Hi Shopify team,

We build Customer Account UI extensions (Preact, api_access enabled) where merchants configure content blocks that should show or hide based on whether the logged-in customer belongs to one of the store’s customer segments (Admin → Customers → Segments, ShopifyQL-defined). Shopify already evaluates segment membership for admin and marketing workflows, but that membership is not available on the customer-facing APIs extensions use at render time.

Environment

  • Surface: Customer Account UI Extension
  • Targets (examples): customer-account.order-status.block.render, customer-account.page.render
  • @shopify/ui-extensions: 2026.4.3
  • Extension api_version: 2026-04
  • Runtime: customer account web extension

What exists today

Admin GraphQL API exposes segment data and membership checks, with read_customers scope:

Customer Account API Customer includes profile, orders, tags, metafields, etc., but no field or query for segment membership.

Storefront API Customer likewise has no segment membership (tags and metafields only).

Practical workaround: the extension calls the app backend on each render; the backend uses an offline Admin API token and customerSegmentMembership for the authenticated customer’s ID (from session / Customer Account API) and segment IDs the merchant configured in the app (loaded earlier via Admin API). That works but adds latency, backend load, and an extra network hop for data Shopify has already computed.

What we’re asking for

Expose segment membership for the authenticated customer only on the Customer Account API (and optionally the same shape through Customer Account UI extension query / shopify://customer-account/api/.../graphql.json), mirroring Admin’s customerSegmentMembership semantics without exposing other customers or open-ended segment enumeration from the customer context.

Proposed shape on Customer Account API Customer (or an equivalent top-level field scoped to the session):

segmentMemberships(segmentIds: [ID!]!): [SegmentMembership!]!

Where SegmentMembership is { segmentId: ID!, isMember: Boolean! }.

  • Input: only segment IDs the app already knows (e.g. from Admin API when the merchant picks segments in app settings).
  • Output: membership for the logged-in customer only — no listing all members of a segment, no other customers’ data.
  • Privacy: same information a merchant could infer by targeting that segment in admin; the customer only learns whether they match segments the merchant explicitly wired into the storefront experience.

Desired query from an extension (illustrative)

const SEGMENT_IDS = [  'gid://shopify/Segment/1234567890',  'gid://shopify/Segment/0987654321',];
const response = await fetch(  'shopify://customer-account/api/2026-04/graphql.json',  {    method: 'POST',    headers: { 'Content-Type': 'application/json' },    body: JSON.stringify({      query: `        query SegmentMembership($segmentIds: [ID!]!) {          customer {            segmentMemberships(segmentIds: $segmentIds) {              segmentId              isMember            }          }        }      `,      variables: { segmentIds: SEGMENT_IDS },    }),  },);

Admin API equivalent available today (contrast)

query CustomerSegmentMembership($customerId: ID!, $segmentIds: [ID!]!) {  customerSegmentMembership(customerId: $customerId, segmentIds: $segmentIds) {    memberships {      segmentId      isMember    }  }}

(customerSegmentMembership docs)

Why this matters

Merchants already think in segments for email, discounts, and analytics. Customer Account extensions are the natural place to personalize order status, profile, and custom pages — without routing every page view through app infrastructure just to read membership booleans.

Thanks.