Deploy site

POST /api/apps/{appId}/deploy
Generates all pages (privacy policy, support page, data deletion page, privacy labels, TestFlight page, AASA file) and deploys them to production. Requires an active subscription.

Parameters

Name Type Description
appIdrequired string The app's unique identifier Example: -NtestApp123

Responses

200 Site deployed
Name Type Description
url string (uri) Primary site URL
customDomainUrl string (uri) Custom domain URL (if configured)
deployedAt integer Unix timestamp
pages object
privacyPolicy string (uri)
supportPage string (uri)
dataDeletion string (uri)
nutritionLabels string (uri) Privacy labels page URL
aasa string (uri) AASA file URL
testflight string (uri) TestFlight page URL
customDomainPages object
privacyPolicy string (uri)
supportPage string (uri)
dataDeletion string (uri)
nutritionLabels string (uri) Privacy labels page URL
aasa string (uri) AASA file URL
testflight string (uri) TestFlight page URL
400 Validation failed
Name Type Description
errorrequired object
coderequired string Machine-readable error code UNAUTHORIZEDFORBIDDENNOT_FOUNDVALIDATION_FAILEDRATE_LIMITEDSLUG_TAKENSLUG_RESERVEDDOMAIN_IN_USEAPP_LIMIT_REACHEDSUBSCRIPTION_REQUIREDSUBSCRIPTION_EXISTSNO_PAYMENT_METHODNO_ACTIVE_SUBSCRIPTIONNOT_CANCELINGALREADY_CANCELINGSUBSCRIPTION_CANCELINGSAME_PLANCARD_ERRORPAYMENT_ERRORNO_STRIPE_CUSTOMERCERT_CREATION_FAILEDDEPLOY_FAILEDAPI_KEY_LIMIT_REACHEDINVALID_IDEMPOTENCY_KEYIDEMPOTENCY_KEY_REUSEINTERNAL_ERROR
messagerequired string Human-readable error description
docUrl string (uri) Link to relevant API documentation for this error Example: https://orbitkit.io/api/errors/#unauthorized
details object[] Additional validation details (Zod errors)
401 Missing, invalid, or expired authentication token
Name Type Description
errorrequired object
coderequired string Machine-readable error code UNAUTHORIZEDFORBIDDENNOT_FOUNDVALIDATION_FAILEDRATE_LIMITEDSLUG_TAKENSLUG_RESERVEDDOMAIN_IN_USEAPP_LIMIT_REACHEDSUBSCRIPTION_REQUIREDSUBSCRIPTION_EXISTSNO_PAYMENT_METHODNO_ACTIVE_SUBSCRIPTIONNOT_CANCELINGALREADY_CANCELINGSUBSCRIPTION_CANCELINGSAME_PLANCARD_ERRORPAYMENT_ERRORNO_STRIPE_CUSTOMERCERT_CREATION_FAILEDDEPLOY_FAILEDAPI_KEY_LIMIT_REACHEDINVALID_IDEMPOTENCY_KEYIDEMPOTENCY_KEY_REUSEINTERNAL_ERROR
messagerequired string Human-readable error description
docUrl string (uri) Link to relevant API documentation for this error Example: https://orbitkit.io/api/errors/#unauthorized
details object[] Additional validation details (Zod errors)
403 Active subscription required
Name Type Description
errorrequired object
coderequired string Machine-readable error code UNAUTHORIZEDFORBIDDENNOT_FOUNDVALIDATION_FAILEDRATE_LIMITEDSLUG_TAKENSLUG_RESERVEDDOMAIN_IN_USEAPP_LIMIT_REACHEDSUBSCRIPTION_REQUIREDSUBSCRIPTION_EXISTSNO_PAYMENT_METHODNO_ACTIVE_SUBSCRIPTIONNOT_CANCELINGALREADY_CANCELINGSUBSCRIPTION_CANCELINGSAME_PLANCARD_ERRORPAYMENT_ERRORNO_STRIPE_CUSTOMERCERT_CREATION_FAILEDDEPLOY_FAILEDAPI_KEY_LIMIT_REACHEDINVALID_IDEMPOTENCY_KEYIDEMPOTENCY_KEY_REUSEINTERNAL_ERROR
messagerequired string Human-readable error description
docUrl string (uri) Link to relevant API documentation for this error Example: https://orbitkit.io/api/errors/#unauthorized
details object[] Additional validation details (Zod errors)
404 Resource not found
Name Type Description
errorrequired object
coderequired string Machine-readable error code UNAUTHORIZEDFORBIDDENNOT_FOUNDVALIDATION_FAILEDRATE_LIMITEDSLUG_TAKENSLUG_RESERVEDDOMAIN_IN_USEAPP_LIMIT_REACHEDSUBSCRIPTION_REQUIREDSUBSCRIPTION_EXISTSNO_PAYMENT_METHODNO_ACTIVE_SUBSCRIPTIONNOT_CANCELINGALREADY_CANCELINGSUBSCRIPTION_CANCELINGSAME_PLANCARD_ERRORPAYMENT_ERRORNO_STRIPE_CUSTOMERCERT_CREATION_FAILEDDEPLOY_FAILEDAPI_KEY_LIMIT_REACHEDINVALID_IDEMPOTENCY_KEYIDEMPOTENCY_KEY_REUSEINTERNAL_ERROR
messagerequired string Human-readable error description
docUrl string (uri) Link to relevant API documentation for this error Example: https://orbitkit.io/api/errors/#unauthorized
details object[] Additional validation details (Zod errors)
429 Too many requests
Name Type Description
errorrequired object
coderequired string Machine-readable error code UNAUTHORIZEDFORBIDDENNOT_FOUNDVALIDATION_FAILEDRATE_LIMITEDSLUG_TAKENSLUG_RESERVEDDOMAIN_IN_USEAPP_LIMIT_REACHEDSUBSCRIPTION_REQUIREDSUBSCRIPTION_EXISTSNO_PAYMENT_METHODNO_ACTIVE_SUBSCRIPTIONNOT_CANCELINGALREADY_CANCELINGSUBSCRIPTION_CANCELINGSAME_PLANCARD_ERRORPAYMENT_ERRORNO_STRIPE_CUSTOMERCERT_CREATION_FAILEDDEPLOY_FAILEDAPI_KEY_LIMIT_REACHEDINVALID_IDEMPOTENCY_KEYIDEMPOTENCY_KEY_REUSEINTERNAL_ERROR
messagerequired string Human-readable error description
docUrl string (uri) Link to relevant API documentation for this error Example: https://orbitkit.io/api/errors/#unauthorized
details object[] Additional validation details (Zod errors)
Language
URL
POST https://api.orbitkit.io/api/apps/{appId}/deploy
curl -X POST "https://api.orbitkit.io/api/apps/-NtestApp123/deploy" \
  -H "Authorization: Bearer $ORBITKIT_API_KEY"
const response = await fetch(`https://api.orbitkit.io/api/apps/-NtestApp123/deploy`, {
  method: "POST",
  headers: {
    "Authorization": "Bearer " + apiKey,
  },
});

const data = await response.json();
console.log(data);
var request = URLRequest(url: URL(string: "https://api.orbitkit.io/api/apps/-NtestApp123/deploy")!)
request.httpMethod = "POST"
request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")

let (data, _) = try await URLSession.shared.data(for: request)
let json = try JSONSerialization.jsonObject(with: data)
print(json)
200
{
  "url": "https://sites.orbitkit.io/my-weather-app/",
  "deployedAt": 1712345678000,
  "pages": {
    "privacyPolicy": "https://sites.orbitkit.io/my-weather-app/privacy",
    "supportPage": "https://sites.orbitkit.io/my-weather-app/support",
    "dataDeletion": "https://sites.orbitkit.io/my-weather-app/delete"
  }
}
400
{
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "Validation failed",
    "docUrl": "https://orbitkit.io/api/errors/#validation-failed",
    "details": [
      {
        "field": "appName",
        "message": "Required"
      }
    ]
  }
}
401
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or expired token",
    "docUrl": "https://orbitkit.io/api/errors/#unauthorized"
  }
}
403
{
  "error": {
    "code": "SUBSCRIPTION_REQUIRED",
    "message": "An active subscription is required to deploy"
  }
}
404
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found",
    "docUrl": "https://orbitkit.io/api/errors/#not-found"
  }
}
429
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Too many requests",
    "docUrl": "https://orbitkit.io/api/errors/#rate-limited"
  }
}