Skip to main content
POST
/
app_builds
JavaScript
import Whop from '@whop/sdk';

const client = new Whop({
  appID: 'app_xxxxxxxxxxxxxx',
  apiKey: 'My API Key',
});

const appBuild = await client.appBuilds.create({
  attachment: { direct_upload_id: 'direct_upload_id' },
  checksum: 'checksum',
  platform: 'ios',
});

console.log(appBuild.id);
{
  "id": "apbu_xxxxxxxxxxxxx",
  "platform": "ios",
  "file_url": "<string>",
  "created_at": "2023-12-01T05:00:00.401Z",
  "status": "draft",
  "checksum": "<string>",
  "supported_app_view_types": [
    "hub"
  ],
  "review_message": "<string>",
  "is_production": true
}

Authorizations

Authorization
string
header
required

The app API key from an app from the /dashboard/developer page

Body

application/json

Parameters for CreateAppBuild

attachment
object
required

Attachment input for the app build file. This should be an upload in .zip format. The zip should contain at least one main_js_bundle.hbc file and optionally an assets folder next to it. Input for an attachment

  • AttachmentInputWithDirectUploadId
  • AttachmentInputWithId
checksum
string
required

Checksum of the app build file. This is generated by the client and used to verify the integrity of the file that is submitted when un-packaged later on a device.

platform
enum<string>
required

The platform of the app build (ios, android, web)

Available options:
ios,
android,
web
app_id
string | null

The ID of the app to create a build for. By default the current app from the api key is used.

Example:

"app_xxxxxxxxxxxxxx"

supported_app_view_types
enum<string>[] | null

Supported app view types for the app build. A build can specify multiple view types, but should only specify ones that its code supports.

Response

A successful response

An App Build object representing a build of an application

id
string
required

The ID of the app build. It will look like apbu_xxxxx.

Example:

"apbu_xxxxxxxxxxxxx"

platform
enum<string>
required

The platform of the app build (ios, android, web)

Available options:
ios,
android,
web
file_url
string
required

The URL to download the app build .zip file.

created_at
string<date-time>
required

When this app build was created.

Example:

"2023-12-01T05:00:00.401Z"

status
enum<string>
required

The status of the app build (draft, approved, rejected, pending, etc)

Available options:
draft,
pending,
approved,
rejected
checksum
string
required

This is generated by the client and used to verify the integrity of the file that is submitted. It is a SHA256 hash of the app build file.

supported_app_view_types
enum<string>[]
required

The supported app view types for the app build. These are the views that the developer has specified that this build supports.

review_message
string | null
required

The review message for the app build, if any. This is populated when the build is rejected and there is a reason specified by the reviewer.

is_production
boolean
required

Whether this app build is currently being used in production.