> ## Documentation Index
> Fetch the complete documentation index at: https://docs.serval.com/llms.txt
> Use this file to discover all available pages before exploring further.

# App Store Connect

> Connect App Store Connect to Serval with a team API key to manage TestFlight testers, app access, and other App Store Connect data from workflows.

## About the integration

Serval connects to the App Store Connect API using a **team API key**. Workflows can manage TestFlight testers and groups, app and build assignments, invitations, users, and app permissions. They can also call other App Store Connect API endpoints. Serval signs the API tokens for you; you don't need to generate or renew them yourself.

The connection uses an Issuer ID, Key ID, and `.p8` private key from App Store Connect. **Individual API keys are not supported.** A team key's role determines what workflows can do, and Apple applies team keys across all apps in the account. Choose a role with only the permissions your workflows need.

## Create a team API key

If API access has not been enabled for your account, the Account Holder must [request access](https://developer.apple.com/help/app-store-connect/get-started/app-store-connect-api/) first. An Account Holder or Admin can then create a team key.

**1. Open the App Store Connect API settings**

In [App Store Connect](https://appstoreconnect.apple.com), go to **Users and Access → Integrations → App Store Connect API → Team Keys**.

**2. Generate a team key**

Select **Generate API Key** (or **+**), enter a name, choose the role your workflows require, and select **Generate**.

**3. Copy the IDs and download the key**

Copy the **Issuer ID** and the new key's **Key ID** from the API settings. Download the matching `.p8` private key and keep it secure. Apple lets you download it only once.

See [Apple's team key instructions](https://developer.apple.com/help/app-store-connect/get-started/app-store-connect-api/) for current permissions and screens. If you lose the private key or need a different role, revoke the key and create a new one.

## Connect in Serval

In Serval, open **Integrations**, select **All integrations**, and choose **App Store Connect**. Enter:

| Field | Value |
| - | - |
| Connection Name | Optional label for this Apple account. |
| Issuer ID | The team API key's Issuer ID. |
| Key ID | The Key ID of the downloaded key. |
| Private Key | The entire contents of the matching `.p8` file, including the `BEGIN PRIVATE KEY` and `END PRIVATE KEY` lines. |

Save the connection, then run **Test App Store Connect Connection**. The test makes a read-only request to list one app. A successful test confirms that Serval can sign a token and call Apple's API; individual workflow operations still depend on the key's role.

To connect multiple Apple accounts, create a named connection with a team key from each account. Choose the appropriate connection when building or running a workflow.

## Troubleshooting

* **The connection cannot be saved:** Check that the Issuer ID is a valid UUID and that the `.p8` contents are complete. Serval requires the EC P-256 private key provided by Apple.
* **The connection test fails:** Check that the Issuer ID, Key ID, and private key belong to the same active team key, and that the key's role can list apps.
* **A workflow gets a permission error:** Check the team key's role in App Store Connect. A passing connection test does not grant additional API permissions.

For the full API surface and request formats, see [Apple's App Store Connect API documentation](https://developer.apple.com/documentation/appstoreconnectapi).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.