Distribute custom app via GraphQL

Topic summary

Main goal: automate the setup and distribution of custom Shopify apps for merchant stores.

  • Progress: Programmatic creation of custom apps achieved by reverse-engineering the Shopify CLI.
  • Roadblock: Distributing the app (assigning it to a .myshopify.com store and obtaining an install URL) is blocked by authentication/access issues.

Technical details:

Key question:

  • Is there a way to call customAppAgreementCreate (or an equivalent) from a CLI/program to distribute custom apps?

Status: No answer or resolution provided yet; guidance on using the web UI mutation programmatically or an alternative endpoint is requested.

Summarized with AI on January 23. AI used: gpt-5.

Hi,

I am working to automate some of the process of setting up custom apps for merchants that I work with. I have succeeded in reverse-engineering the Shopify CLI source code as others have suggested, and can now programmatically create custom apps. However I am now trying to distribute the app (assign it to the .myshopify.com store URL and get an install URL back), and am coming up against issues related to authentication/access.

The web UI uses the mutation “customAppAgreementCreate” to distribute the app on the GraphQL endpoint: https://partners.shopify.com/[ORG_ID]/api/graphql

This mutation is not available on the CLI GraphQL endpoint: https://partners.shopify.com/api/cli/graphql.

Is it possible to use this mutation (or something that achieves the same outcome) from a CLI/program?