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

const client = new Whop({
  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});

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

console.log(appBuild.id);
{
  "id": "apbu_xxxxxxxxxxxxx",
  "platform": "ios",
  "file_url": "https://cdn.whop.com/builds/abc123.zip",
  "created_at": "2023-12-01T05:00:00.401Z",
  "status": "draft",
  "checksum": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "supported_app_view_types": [
    "hub"
  ],
  "review_message": "App crashes on launch. Please fix and resubmit.",
  "is_production": true
}

Authorizations

Authorization
string
header
required

A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************

Body

application/json

Parameters for CreateAppBuild

attachment
FileInputWithId · object
required

The build file to upload. For iOS and Android, this should be a .zip archive containing a main_js_bundle.hbc file and an optional assets folder. For web, this should be a JavaScript file.

checksum
string
required

A client-generated checksum of the build file, used to verify file integrity when unpacked on a device.

platform
enum<string>
required

The target platform for the build. Accepted values: ios, android, web.

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

The identifier of the AI prompt that generated this build, if applicable.

Example:

"prmt_xxxxxxxxxxxxx"

app_id
string | null

The unique identifier of the app to create the build for. Defaults to the app associated with the current API key.

Example:

"app_xxxxxxxxxxxxxx"

supported_app_view_types
enum<string>[] | null

The view types this build supports. A build can support multiple view types but should only list the ones its code implements.

The different types of an app view

Available options:
hub,
discover,
dash,
dashboard,
analytics

Response

A successful response

A versioned build artifact for a Whop React Native App, submitted for review and deployment to a specific platform.

id
string
required

The unique identifier for the app build.

Example:

"apbu_xxxxxxxxxxxxx"

platform
enum<string>
required

The target platform for this build.

Available options:
ios,
android,
web
file_url
string
required

A URL to download the app build as a .zip archive.

Example:

"https://cdn.whop.com/builds/abc123.zip"

created_at
string<date-time>
required

The datetime the app build was created.

Example:

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

status
enum<string>
required

The current review status of this build.

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

A SHA-256 hash of the uploaded build file, generated by the client and used to verify file integrity.

Example:

"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

supported_app_view_types
enum<string>[]
required

The list of view types this build supports, as declared by the developer.

The different types of an app view

Available options:
hub,
discover,
dash,
dashboard,
analytics
review_message
string | null
required

Feedback from the reviewer explaining why the build was rejected. Null if the build has not been reviewed or was approved.

Example:

"App crashes on launch. Please fix and resubmit."

is_production
boolean
required

Whether this build is the currently active production build for its platform.