Update site configuration

PATCH /api/apps/{appId}/site
Partially updates site fields. Only provided fields are changed. Returns the merged site.

Parameters

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

Request Body

Name Type Description
appName string New display name for the app 1โ€“200 characters Example: My Weather App
description string Short description shown on the site landing page Max 4000 characters
slug string URL slug for the site path 1โ€“63 characters ยท Pattern: lowercase alphanumeric with hyphens Example: my-weather-app

Responses

200 Updated site
Name Type Description
appName string Display name of the app Example: My Weather App
description string Short description shown on the site landing page Example: A beautiful weather app for iOS
slug string URL slug used in the site path (e.g. orbitkit.io/s/my-app) Example: my-weather-app
iconUrl string (uri) URL of the uploaded app icon (512x512 PNG)
customDomain string Custom domain assigned to this site, if any Example: privacy.myapp.com
smartBanner object
appStoreIdrequired string Numeric App Store ID Max 20 characters ยท Pattern: digits only
affiliateData string Max 200 characters
appArgument string Max 500 characters
appClipBundleId string Max 200 characters
appClipDisplay string bannercard
wellKnownFiles object Which Apple well-known verification files have been uploaded
appleDeveloperDomainAssociation boolean Whether the Sign in with Apple domain file is uploaded
appleDeveloperMerchantId boolean Whether the Apple Pay domain file is uploaded
subscriptionId string Stripe subscription ID for this app Example: sub_1abc2def3ghi
subscriptionStatus string Current subscription status for this app noneactivepast_duecanceled
cancelAtPeriodEnd boolean Whether the subscription is scheduled for cancellation at period end
currentPeriodEnd integer Unix timestamp of the current billing period end
deployed boolean Whether the site has been deployed at least once
deployedAt integer Unix timestamp (ms) of the last deploy Example: 1712345678000
createdAt integer Unix timestamp (ms) when the site was created Example: 1712345678000
updatedAt integer Unix timestamp (ms) of the last update Example: 1712345678000
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)
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)
409 Slug is already taken
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
PATCH https://api.orbitkit.io/api/apps/{appId}/site
curl -X PATCH "https://api.orbitkit.io/api/apps/-NtestApp123/site" \
  -H "Authorization: Bearer $ORBITKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"appName":"My Weather App","description":"string","slug":"my-weather-app"}'
const response = await fetch(`https://api.orbitkit.io/api/apps/-NtestApp123/site`, {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer " + apiKey,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
      "appName": "My Weather App",
      "description": "string",
      "slug": "my-weather-app"
  }),
});

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

let body: [String: Any] = ["appName": "My Weather App", "description": "string", "slug": "my-weather-app"]
request.httpBody = try JSONSerialization.data(withJSONObject: body)

let (data, _) = try await URLSession.shared.data(for: request)
let json = try JSONSerialization.jsonObject(with: data)
print(json)
200
{
  "appName": "My Weather App",
  "description": "A beautiful weather app for iOS",
  "slug": "my-weather-app",
  "iconUrl": "https://example.com",
  "customDomain": "privacy.myapp.com",
  "smartBanner": {
    "appStoreId": "string",
    "affiliateData": "string",
    "appArgument": "string",
    "appClipBundleId": "string",
    "appClipDisplay": "banner"
  },
  "wellKnownFiles": {
    "appleDeveloperDomainAssociation": true,
    "appleDeveloperMerchantId": true
  },
  "subscriptionId": "sub_1abc2def3ghi",
  "subscriptionStatus": "none",
  "cancelAtPeriodEnd": true,
  "currentPeriodEnd": 0,
  "deployed": true,
  "deployedAt": "1712345678000",
  "createdAt": "1712345678000",
  "updatedAt": "1712345678000"
}
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"
  }
}
404
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found",
    "docUrl": "https://orbitkit.io/api/errors/#not-found"
  }
}
409
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "string",
    "docUrl": "https://orbitkit.io/api/errors/#unauthorized",
    "details": []
  }
}