---
title: "Export a Capacitor app project for a site"
method: POST
path: "/sites/{id}/app-export"
tags: ["Sites"]
---

# Export a Capacitor app project for a site

`POST /sites/{id}/app-export`

## Request

- Base URL: `https://api.hypamoon.com/api/v1`
- URL: `https://api.hypamoon.com/api/v1/sites/{id}/app-export`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://app.hypamoon.com/oauth/authorize`, token URL `https://api.hypamoon.com/oauth/token`, scopes: `sites:write`)

Builds a Capacitor project that opens the site at its connected domain or hypamoon.app address, with the icon and splash from the site, a proposed app id in reverse domain form, an offline screen and push registration through Hypamoon, plus a README for building in Android Studio and Xcode. Returns a signed download link to a zip, valid for 15 minutes; a new export replaces the previous one. The zip contains no keys, tokens or passwords. Building and submitting in the cloud will come in a later phase.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `app_id` string: Reverse domain form, like com.example.app. Leave it out for a proposal from the domain or the site's address. Cannot change after the first upload to a store.
  - `app_name` string: The name under the icon. Leave it out to use the site's name.
  - `icon_path` string: Path of an image on the site to use as the icon, like /icon-1024.png (square PNG, 1024x1024). Leave it out to pick the best icon the site has.
  - `background_color` string: Background of the icon and splash screen as a hex color, like #ffffff. Leave it out to use the site's theme color.

## Response `201`

The project is ready to download.

- object
  - `download_url` string, required: A signed link to the zip, valid for 15 minutes. Give it to the user; never store it.
  - `expires_at` string, required
  - `app_id` string, required
  - `app_id_reason` string, required
  - `app_name` string, required
  - `app_url` string, required: The address the app opens: the connected domain, or the site's hypamoon.app address.
  - `icon` string, nullable, required: Where the icon is in the zip, or null when the user must add one.
  - `background_color` string, required
  - `files` string[], required
  - `bytes` integer, required
  - `warnings` string[], required
  - `test` boolean, required

## Other responses

- `400`: Bad Request: invalid_json.
- `401`: Unauthorized: unauthorized, missing_api_key, invalid_api_key, api_key_revoked, project_deleted.
- `403`: Forbidden: project_not_enabled, key_mode_mismatch, missing_scope, verification_required.
- `404`: Not Found: not_found.
- `422`: Unprocessable Content: validation_failed.
- `429`: Too Many Requests: rate_limited.
- `500`: Internal Server Error: internal_error.
- `503`: Service Unavailable: service_unavailable.

---

[API](https://skmtc.dev/hypamoon/apis/hypamoon-api.md) · [All operations](https://skmtc.dev/hypamoon/apis/hypamoon-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hypamoon/apis/hypamoon-api/revisions/9f0b90004c06?raw)
