Back to API Overview

App Builder API

Create and manage app builder projects, pages, and components.

63 endpoints

Endpoints

POST
/api/v1/appBuilder/listProjects

List all app builder projects. Returns array with id, name, description, linkedBaseId, page count, component count.

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/listProjects \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{}'
POST
/api/v1/appBuilder/getProject

Get a project with its pages, components, linkedBase, and triggers

Parameters

idstringrequired

Project ID from listProjects

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/getProject \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example"
}'
POST
/api/v1/appBuilder/createProject

Create a new app builder project

Parameters

namestringrequired

Project name

descriptionstring

Optional project description

colorstring

Hex color code (default: #3B82F6)

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/createProject \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "example",
  "description": "example",
  "color": "example"
}'
POST
/api/v1/appBuilder/updateProject

Update project settings including branding and dependencies

Parameters

idstringrequired

Project ID from listProjects

namestring

New project name

descriptionstring

New description

colorstring

New hex color code

logostring

URL to logo image (recommended: 200x50px PNG or SVG)

faviconstring

URL to favicon image (recommended: 32x32px PNG or ICO)

dependenciesobject

NPM packages to bundle. Example: {"framer-motion": "^10.0.0", "chart.js": "^4.4.0"}. Packages are installed via Bun and bundled by Vite for production. Tailwind CSS is included by default.

aiKnowledgestring

AI project knowledge - persistent instructions for AI including project goals, coding style, and constraints

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/updateProject \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example",
  "name": "example",
  "description": "example"
}'
POST
/api/v1/appBuilder/updateProjectAuth

Update project authentication settings

Parameters

idstringrequired

Project ID

authEnabledboolean

Enable authentication for this app

authAllowSignupboolean

Allow new users to sign up

authRequireEmailboolean

Require email verification

authAllowSocialboolean

Allow social login (Google, GitHub)

authCustomFieldsarray

Custom signup form fields - added after email/password/name

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/updateProjectAuth \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example",
  "authEnabled": true,
  "authAllowSignup": true
}'
POST
/api/v1/appBuilder/listEnvVars

List environment variables for a project

Parameters

projectIdstringrequired

Project ID

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/listEnvVars \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example"
}'
POST
/api/v1/appBuilder/createEnvVar

Create a new environment variable

Parameters

projectIdstringrequired

Project ID

namestringrequired

Variable name (e.g., OPENAI_API_KEY)

valuestringrequired

Variable value

descriptionstring

Optional description

isSecretboolean

If true, value is masked in UI

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/createEnvVar \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "name": "example",
  "value": "example"
}'
POST
/api/v1/appBuilder/updateEnvVar

Update an environment variable

Parameters

idstringrequired

Environment variable ID

valuestring

New value (only if changing)

descriptionstring

New description

isSecretboolean

Update secret flag

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/updateEnvVar \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example",
  "value": "example",
  "description": "example"
}'
POST
/api/v1/appBuilder/deleteEnvVar

Delete an environment variable

Parameters

idstringrequired

Environment variable ID to delete

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/deleteEnvVar \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example"
}'
POST
/api/v1/appBuilder/updateCustomDomain

Update custom domain settings

Parameters

idstringrequired

Project ID

customDomainstring

Custom domain (e.g., myapp.com)

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/updateCustomDomain \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example",
  "customDomain": "example"
}'
POST
/api/v1/appBuilder/getAppUsers

Get users who signed up to this published app

Parameters

projectIdstringrequired

Project ID

limitnumber
offsetnumber

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/getAppUsers \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "limit": 0,
  "offset": 0
}'
POST
/api/v1/appBuilder/deleteAppUser

Delete a user from this published app

Parameters

projectIdstringrequired

Project ID

userIdstringrequired

App user ID to delete

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/deleteAppUser \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "userId": "example"
}'
POST
/api/v1/appBuilder/createAppUser

Manually create a user for this published app

Parameters

projectIdstringrequired

Project ID

emailstringrequired

User email

namestring

User name

passwordstringrequired

User password (min 8 chars)

rolestring

User role

sendWelcomeEmailboolean

Send welcome email with credentials

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/createAppUser \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "email": "example",
  "name": "example"
}'
POST
/api/v1/appBuilder/resetAppUserPassword

Reset password for an app user

Parameters

projectIdstringrequired

Project ID

userIdstringrequired

App user ID

newPasswordstringrequired

New password (min 8 chars)

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/resetAppUserPassword \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "userId": "example",
  "newPassword": "example"
}'
POST
/api/v1/appBuilder/updateAppUserRole

Update role for an app user

Parameters

projectIdstringrequired

Project ID

userIdstringrequired

App user ID

rolestringrequired

New role

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/updateAppUserRole \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "userId": "example",
  "role": "example"
}'
POST
/api/v1/appBuilder/deleteProject

Delete a project, its linked Base, and all pages/components

Parameters

idstringrequired

Project ID to delete

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/deleteProject \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example"
}'
POST
/api/v1/appBuilder/createPage

Create a new page in a project

Parameters

projectIdstringrequired

Project ID from listProjects

namestringrequired

Page name (e.g., "About", "Contact")

pathstringrequired

URL path (e.g., "/about", "/contact")

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/createPage \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "name": "example",
  "path": "example"
}'
POST
/api/v1/appBuilder/createComponent

Create a new component in a project

Parameters

projectIdstringrequired

Project ID from listProjects

namestringrequired

Component name

descriptionstring

Optional component description

typestring

Component type: "custom", "layout", "ui", or "data"

isGlobalboolean

Whether component is globally accessible

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/createComponent \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "name": "example",
  "description": "example"
}'
POST
/api/v1/appBuilder/listPages

List all pages in a project

Parameters

projectIdstringrequired

Project ID from listProjects

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/listPages \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example"
}'
POST
/api/v1/appBuilder/getPage

Get page details including content

Parameters

idstringrequired

Page ID from listPages

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/getPage \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example"
}'
POST
/api/v1/appBuilder/readPage

Read page content with line numbers. Use offset/limit to read specific sections of large files.

Parameters

idstringrequired

Page ID from listPages

offsetnumber

Line number to start from (1-indexed). If not specified, starts from line 1.

limitnumber

Number of lines to read. If not specified, reads entire file.

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/readPage \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example",
  "offset": 0,
  "limit": 0
}'
POST
/api/v1/appBuilder/readComponent

Read component content with line numbers. Use offset/limit for large files.

Parameters

idstringrequired

Component ID from listComponents

offsetnumber

Line number to start from (1-indexed)

limitnumber

Number of lines to read

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/readComponent \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example",
  "offset": 0,
  "limit": 0
}'
POST
/api/v1/appBuilder/updatePage

Update page properties and content

Parameters

idstringrequired

Page ID from listPages

namestring

New page name

pathstring

New URL path

contentstring

Page content (React component code or JSON)

layoutstring

Layout template name

isHomePageboolean

Set as home page

sortOrdernumber

Sort order for navigation

titlestring

Page title for SEO

descriptionstring

Page description for SEO

isProtectedboolean

Require authentication to access

requiredRolestring

Required role to access (null = any authenticated user)

redirectIfUnauthstring

Redirect path for unauthenticated users

commitMessagestring

Custom git commit message. If not provided, auto-generated based on action

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/updatePage \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example",
  "name": "example",
  "path": "example"
}'
POST
/api/v1/appBuilder/editPage

Edit page content by replacing specific text. The oldString must match exactly (including whitespace/indentation). If not unique, either provide more surrounding context or use replaceAll=true.

Parameters

idstringrequired

Page ID from listPages

oldStringstringrequired

The exact text to find and replace. Must be unique in the file unless using replaceAll.

newStringstringrequired

The replacement text (must be different from oldString)

replaceAllboolean

Replace all occurrences. If false (default), oldString must be unique in the file.

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/editPage \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example",
  "oldString": "example",
  "newString": "example"
}'
POST
/api/v1/appBuilder/searchPage

Search page content for specific text/patterns. Returns matching lines with context. More efficient than getPage for finding specific code.

Parameters

idstringrequired

Page ID from listPages

patternstringrequired

Text or regex pattern to search for

contextLinesnumber

Number of lines to show before and after each match (default: 3)

maxMatchesnumber

Maximum number of matches to return (default: 5)

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/searchPage \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example",
  "pattern": "example",
  "contextLines": 0
}'
POST
/api/v1/appBuilder/deletePage

Delete a page from the project

Parameters

idstringrequired

Page ID to delete

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/deletePage \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example"
}'
POST
/api/v1/appBuilder/listComponents

List all components in a project

Parameters

projectIdstringrequired

Project ID from listProjects

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/listComponents \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example"
}'
POST
/api/v1/appBuilder/getComponent

Get component details including content

Parameters

idstringrequired

Component ID from listComponents

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/getComponent \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example"
}'
POST
/api/v1/appBuilder/updateComponent

Update component properties and code

Parameters

idstringrequired

Component ID from listComponents

namestring

New component name

descriptionstring

Component description

contentstring

Component code (React/TSX)

typestring

Component type

isGlobalboolean

Whether globally accessible

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/updateComponent \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example",
  "name": "example",
  "description": "example"
}'
POST
/api/v1/appBuilder/editComponent

Edit component content by replacing specific text. The oldString must match exactly (including whitespace/indentation). If not unique, provide more context or use replaceAll=true.

Parameters

idstringrequired

Component ID from listComponents

oldStringstringrequired

The exact text to find and replace. Must be unique unless using replaceAll.

newStringstringrequired

The replacement text (must be different from oldString)

replaceAllboolean

Replace all occurrences. If false (default), oldString must be unique.

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/editComponent \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example",
  "oldString": "example",
  "newString": "example"
}'
POST
/api/v1/appBuilder/searchComponent

Search component content for specific text/patterns. Returns matching lines with context.

Parameters

idstringrequired

Component ID from listComponents

patternstringrequired

Text or regex pattern to search for

contextLinesnumber

Lines to show before/after match

maxMatchesnumber

Maximum matches to return

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/searchComponent \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example",
  "pattern": "example",
  "contextLines": 0
}'
POST
/api/v1/appBuilder/deleteComponent

Delete a component from the project

Parameters

idstringrequired

Component ID to delete

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/deleteComponent \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example"
}'
POST
/api/v1/appBuilder/listTriggers

List all triggers (event-flow mappings) in a project

Parameters

projectIdstringrequired

Project ID from listProjects

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/listTriggers \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example"
}'
POST
/api/v1/appBuilder/createTrigger

Create a trigger to execute a flow when an event occurs

Parameters

projectIdstringrequired

Project ID from listProjects

eventstringrequired

Event type

flowIdstringrequired

Flow ID to execute when event fires

targetPageIdstring

Page ID for page-specific events

targetElementIdstring

Element ID for element-specific events (button clicks, form submits)

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/createTrigger \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "event": "example",
  "flowId": "example"
}'
POST
/api/v1/appBuilder/updateTrigger

Update trigger settings

Parameters

idstringrequired

Trigger ID from listTriggers

flowIdstring

New Flow ID

isActiveboolean

Enable/disable trigger

orderIndexnumber

Execution order

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/updateTrigger \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example",
  "flowId": "example",
  "isActive": true
}'
POST
/api/v1/appBuilder/deleteTrigger

Delete a trigger

Parameters

idstringrequired

Trigger ID to delete

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/deleteTrigger \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example"
}'
POST
/api/v1/appBuilder/publish

Publish an app to production. Builds all pages and uploads to R2 for serving.

Parameters

idstringrequired

Project ID to publish

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/publish \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example"
}'
POST
/api/v1/appBuilder/unpublish

Unpublish an app (keeps files in R2 but marks as unpublished)

Parameters

idstringrequired

Project ID to unpublish

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/unpublish \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example"
}'
POST
/api/v1/appBuilder/verifyCustomDomain

Verify custom domain ownership via DNS TXT record lookup

Parameters

idstringrequired

Project ID

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/verifyCustomDomain \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "example"
}'
POST
/api/v1/appBuilder/getCodeGuide

Get coding guide for writing App Builder pages. Call this BEFORE writing any page code to understand available globals and patterns.

Parameters

topicstring

Topic: "all", "sdk", "globals", "hooks", "navigation", "libraries", "styling", "components", "examples", "errors"

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/getCodeGuide \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "topic": "example"
}'
POST
/api/v1/appBuilder/getStripeConnection

Get Stripe connection status for a project

Parameters

projectIdstringrequired

Project ID

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/getStripeConnection \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example"
}'
POST
/api/v1/appBuilder/updateStripeConnection

Save Stripe API key and/or webhook secret for test or live mode

Parameters

projectIdstringrequired

Project ID

modestringrequired

Which mode to update

secretKeystring

Stripe Secret Key (sk_test_xxx or sk_live_xxx)

webhookSecretstring

Stripe Webhook Secret (whsec_xxx)

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/updateStripeConnection \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "mode": "example",
  "secretKey": "example"
}'
POST
/api/v1/appBuilder/toggleStripeMode

Switch between test and live Stripe mode

Parameters

projectIdstringrequired

Project ID

modestringrequired

Mode to switch to

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/toggleStripeMode \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "mode": "example"
}'
POST
/api/v1/appBuilder/syncStripeProducts

Sync products and prices from Stripe account

Parameters

projectIdstringrequired

Project ID

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/syncStripeProducts \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example"
}'
POST
/api/v1/appBuilder/listStripeProducts

List synced Stripe products

Parameters

projectIdstringrequired

Project ID

modestring

Filter by mode (default: current mode)

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/listStripeProducts \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "mode": "example"
}'
POST
/api/v1/appBuilder/disconnectStripe

Remove Stripe connection for test or live mode

Parameters

projectIdstringrequired

Project ID

modestringrequired

Which mode to disconnect

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/disconnectStripe \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "mode": "example"
}'
POST
/api/v1/appBuilder/createStripeProduct

Create a new product with price in Stripe

Parameters

projectIdstringrequired

Project ID

namestringrequired

Product name

descriptionstring

Product description

amountintegerrequired

Price amount in cents (e.g., 999 = $9.99)

currencystring

Currency code (default: usd)

intervalstring

Billing interval for subscriptions

intervalCountinteger

Number of intervals between billings

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/createStripeProduct \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "name": "example",
  "description": "example"
}'
POST
/api/v1/appBuilder/getGitConnection

Get Git connection status. Param "projectId". Returns: connected, repoOwner, repoName, branch, lastCommitSha, AI permission flags.

Parameters

projectIdstringrequired

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/getGitConnection \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example"
}'
POST
/api/v1/appBuilder/connectGitHub

Connect a GitHub repository. Params: projectId (required), repoOwner (GitHub username or org), repoName (repo name), OR createNew (true) with newRepoName to create a new repo.

Parameters

projectIdstringrequired
repoOwnerstring
repoNamestring
createNewboolean
newRepoNamestring

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/connectGitHub \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "repoOwner": "example",
  "repoName": "example"
}'
POST
/api/v1/appBuilder/disconnectGitHub

Disconnect GitHub from project. Param "projectId". Clears all Git settings and token.

Parameters

projectIdstringrequired

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/disconnectGitHub \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example"
}'
POST
/api/v1/appBuilder/updateGitPermissions

Update AI Git permissions. Params: projectId (required), plus any of: - allowAiCommit: boolean - Allow AI to commit changes - allowAiPull: boolean - Allow AI to pull from remote - allowAiPush: boolean - Allow AI to push to remote - allowAiCreateBranch: boolean - Allow AI to create branches/repos

Parameters

projectIdstringrequired
allowAiCommitboolean
allowAiPullboolean
allowAiPushboolean
allowAiCreateBranchboolean

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/updateGitPermissions \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "allowAiCommit": true,
  "allowAiPull": true
}'
POST
/api/v1/appBuilder/listGitHubRepos

List user GitHub repos for selection. Param "projectId". Returns array of {fullName, name, owner, private, defaultBranch}.

Parameters

projectIdstringrequired

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/listGitHubRepos \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example"
}'
POST
/api/v1/appBuilder/gitPull

Pull latest changes from GitHub remote

Parameters

projectIdstringrequired

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/gitPull \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example"
}'
POST
/api/v1/appBuilder/gitPush

Push commits to GitHub remote

Parameters

projectIdstringrequired

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/gitPush \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example"
}'
POST
/api/v1/appBuilder/gitCommit

Create a new commit with current source files

Parameters

projectIdstringrequired
messagestringrequired

Commit message

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/gitCommit \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "message": "example"
}'
POST
/api/v1/appBuilder/gitCreateBranch

Create a new branch from current HEAD

Parameters

projectIdstringrequired
namestringrequired

New branch name

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/gitCreateBranch \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "name": "example"
}'
POST
/api/v1/appBuilder/gitSwitchBranch

Switch to an existing branch

Parameters

projectIdstringrequired
namestringrequired

Branch name to switch to

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/gitSwitchBranch \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "name": "example"
}'
POST
/api/v1/appBuilder/gitMerge

Merge one branch into another

Parameters

projectIdstringrequired
fromstringrequired

Source branch to merge from

tostringrequired

Target branch to merge into

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/gitMerge \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "from": "example",
  "to": "example"
}'
POST
/api/v1/appBuilder/gitListCommits

Get commit history

Parameters

projectIdstringrequired
limitnumber

Maximum number of commits to return

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/gitListCommits \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "limit": 0
}'
POST
/api/v1/appBuilder/gitRollback

Restore project to a previous commit

Parameters

projectIdstringrequired
shastringrequired

Commit SHA to rollback to

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/gitRollback \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "sha": "example"
}'
POST
/api/v1/appBuilder/gitStatus

Get current Git status

Parameters

projectIdstringrequired

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/gitStatus \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example"
}'
POST
/api/v1/appBuilder/gitCreateRepo

Create a new GitHub repository

Parameters

projectIdstringrequired
namestringrequired

Repository name

isPrivateboolean

Whether the repo should be private

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/gitCreateRepo \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example",
  "name": "example",
  "isPrivate": true
}'
POST
/api/v1/appBuilder/gitListBranches

List all branches in the repository

Parameters

projectIdstringrequired

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/appBuilder/gitListBranches \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "example"
}'
App Builder API - Serenities