Skip to main content
The Deploys API lets you submit a completed build directly to Google Play, the Apple App Store, or TestFlight without leaving your terminal or CI environment. You provide the build ID and your store credentials, and Capwrapper handles the submission on your behalf. Before deploying, make sure you have a successful build — see the Builds API for how to create and check builds.

Deploy to an app store

POST /api/v1/deploys Submit a completed build to Google Play, the App Store, or TestFlight.
The build referenced by buildId must have a status of "success" before you can deploy it. Attempting to deploy a build that is still queued, building, or failed will return a 400 error.

Request body

buildId
string
required
The ID of a successful build to deploy. Returned by POST /api/v1/builds and visible in GET /api/v1/builds/:id.
platform
string
required
Target deployment platform. Accepted values:
  • "android" — submits to Google Play Store
  • "ios" — submits to the Apple App Store
  • "testflight" — submits to TestFlight for beta distribution
storeConfig
object
required
Platform-specific store credentials and metadata. The required fields differ by platform:
  • Android: provide serviceAccountKey (your Play Store service account JSON as a string) and track (e.g. "production", "beta", or "internal").
  • iOS / TestFlight: provide apiKey (your App Store Connect API private key), issuerId (your issuer ID from App Store Connect), and keyId (your key ID from App Store Connect).

Example request (Android)

curl -X POST https://api.capwrapper.com/v1/deploys \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "buildId": "bld_abc123xyz",
    "platform": "android",
    "storeConfig": {
      "serviceAccountKey": "{ ... your Play Store service account JSON ... }",
      "track": "production"
    }
  }'

Response

{
  "id": "dep_xyz789",
  "status": "submitted",
  "buildId": "bld_abc123xyz",
  "platform": "android",
  "createdAt": "2026-04-11T10:05:00Z"
}
id
string
Unique deploy identifier.
status
string
Current deploy status. "submitted" means Capwrapper has handed the build off to the store API. Final review and processing times are determined by Google or Apple.
buildId
string
ID of the build that was deployed.
platform
string
The platform this deploy targets: android, ios, or testflight.
createdAt
string
ISO 8601 timestamp of when the deploy was created.

Store credentials in storeConfig grant access to publish apps on your behalf. Never commit them to version control, paste them into chat tools, or log them to stdout. Use environment variables or a secrets manager to inject them at runtime.
If you are deploying from a CI/CD pipeline, the Capwrapper CLI is a simpler alternative to calling this endpoint directly. The CLI reads credentials from environment variables and handles the full deploy flow with a single command: capwrap deploy.