The App Store Connect API lets scripts manage builds, TestFlight groups, metadata, screenshots, phased releases and review submissions using a JSON Web Token signed with an API key. An AI coding agent is well suited to write and maintain these scripts, but the API key should live only in CI secrets, the key's role should be as narrow as possible, and actions such as submitting for review or releasing should keep a human approval step.
On this page
Most of what you click in App Store Connect can also be done through its REST API. For teams that release often, that turns a half-day of manual work into a pipeline step. Coding agents such as Claude Code or Codex are good at writing the glue: they read the API documentation, generate typed clients, handle pagination and build the scripts that keep metadata in sync. The design question is not whether the agent can automate the release, but which steps should be automated and which should stay behind a human decision.
What the API covers
At the time of writing, the App Store Connect API covers the main release objects: apps, builds, TestFlight beta groups and testers, beta build localizations ("What to Test" text), App Store versions and their localizations (description, keywords, promotional text, release notes), screenshot sets and app previews, pricing and availability, in-app purchases and subscriptions, phased releases, review submissions, customer reviews and responses, and sales and finance reports. Uploading the binary itself has traditionally been done through Xcode, Transporter or command-line tools that authenticate with the same API key; check Apple's current documentation for the latest upload options.
The API is strict about the order of operations. A version must exist before you attach localizations, screenshots must be reserved, uploaded and committed in separate calls, and a build must finish processing before it can be assigned. Agents handle these sequences well once they have the documentation in context, and they write the polling and retry logic most humans skip.
Authentication and key hygiene
Requests are authorized with a short-lived JSON Web Token signed with an API private key. You create the key in App Store Connect under Users and Access, in the integrations section, and you can download the .p8 file only once. Each team key has a role, such as Admin, App Manager or Developer, and the role defines what the key can do. Pick the narrowest role that covers your pipeline.
The agent writes the code that creates the token; it never needs the key itself. Store the key ID, the issuer ID and the private key in your CI secret store, inject them at runtime, and make sure your agent's environment does not contain them. If a key appears in a log, a commit or an agent transcript, revoke it in App Store Connect and create a new one. More on this boundary in our guide to code signing and certificates for AI-built apps.
A release pipeline with approval gates
- Build and upload on every merge to the release branch, with an automatically incremented build number.
- Distribute to internal testers automatically once processing completes, with "What to Test" notes generated from the merged pull requests.
- Gate one, human: a person promotes the build to external testers after a smoke test.
- Sync metadata from files in the repository: descriptions, keywords and release notes per language, plus screenshots generated by UI tests.
- Gate two, human: a person reviews the diff of metadata and screenshots, then triggers the review submission.
- Release manually or with a phased release over seven days, and pause it automatically if crash rates exceed a threshold you define.
- Monitor customer reviews through the API and route new ones to your support channel.
Keeping metadata in the repository has a second benefit: changes become reviewable pull requests, and the agent can draft localized release notes for every language, which a native speaker then checks.
What not to automate
Some actions should not run without a person looking. Submitting for review sends your app and your claims about it to Apple; a wrong privacy answer or an outdated demo account in the review notes costs days. Price and availability changes affect revenue immediately. Responses to customer reviews are public and represent your brand. Agreements, tax and banking information are not available through the API, and account-level decisions should remain manual anyway. Let the agent prepare these actions as drafts or dry runs, and require an explicit approval to execute them.
Also be careful with agents that have live API access in an interactive session. An agent that is debugging a script with a production key can, by mistake, delete a localization or expire a build. Use a separate test app record for script development where possible.
Tools you can combine
You do not need to write everything against the raw API. Fastlane wraps many endpoints in tested actions, Xcode Cloud covers building and TestFlight distribution, and several open-source clients exist for different languages. A pragmatic mix is Fastlane for building and uploading, plus small agent-written scripts for anything Fastlane does not cover. Our article on Fastlane plus Claude Code shows that setup. For timing expectations once the submission is out, see App Store and Google Play review times.
Getting started
If you release a few times a year, automation may not pay back, and a service is the simpler route. AppSubmitter.io handles the publishing process by hand, including listings, screenshots, privacy forms and review communication, until the app is live. If you release weekly, invest in the pipeline and in the skills to maintain it; the neoOutput workshops on Claude Code and Codex include release automation with safe secret handling.
Frequently asked questions
Can an AI agent submit my app for review through the API?
Technically yes, the API supports review submissions. We recommend letting the agent prepare the submission and requiring a person to approve and trigger it.
Which API key role should a CI pipeline use?
The narrowest role that covers its tasks. Many pipelines that upload builds and manage TestFlight work with App Manager or Developer permissions rather than Admin; check Apple's current role definitions.
Can I download the API private key again later?
No. The .p8 file can be downloaded only once. If it is lost, revoke the key and create a new one.