Skip to content

Frontend API

MethodPathPurpose
POST/v1/{app_id}/frontend/deploymentsCreate a deployment
POST/v1/{app_id}/frontend/deployments/{id}/startStart a deployment
GET/v1/{app_id}/frontend/deploymentsList deployment history
GET/v1/{app_id}/frontend/deployments/{id}Get deployment details
POST/v1/{app_id}/frontend/deployments/{id}/syncForce-sync status
POST/v1/{app_id}/frontend/deployments/{id}/cancelCancel deployment
DELETE/v1/{app_id}/frontend/deployments/{id}Delete a deployment
PUT/v1/{app_id}/frontend/envSet environment variables
GET/v1/{app_id}/frontend/envList environment variable keys
POST /v1/{app_id}/frontend/deployments
Authorization: Bearer {token}
{
"framework": "react-vite"
}

Response:

{
"id": "deployment-uuid",
"uploadUrl": "https://...",
"expiresIn": 900,
"maxSizeBytes": 104857600
}
FrameworkValue
React (Vite)react-vite
Next.js (static)nextjs-static
Static HTMLstatic
Otherother

Upload zip:

Terminal window
curl -X PUT "{uploadUrl}" \
-H "Content-Type: application/zip" \
--data-binary @frontend.zip

Start deployment:

POST /v1/{app_id}/frontend/deployments/{id}/start
StatusMeaning
WAITINGCreated, awaiting upload
UPLOADINGProcessing
BUILDINGBuilding
READYSucceeded
ERRORFailed
CANCELEDCanceled
PUT /v1/{app_id}/frontend/env
{
"VITE_API_URL": "https://api.butterbase.ai/v1/app_abc123",
"NEXT_PUBLIC_API_KEY": "pk_test_123"
}

Values are encrypted at rest. Only keys are returned when listing.

LimitValue
Max size100 MB (compressed)
Upload expiration15 minutes
Free plan1 active deployment
Pro planUnlimited
MethodPathPurpose
POST/v1/{app_id}/custom-domainsAdd a custom domain
GET/v1/{app_id}/custom-domainsList custom domains
GET/v1/{app_id}/custom-domains/{id}/statusCheck verification status
POST/v1/{app_id}/custom-domains/{id}/verifyRe-trigger verification
DELETE/v1/{app_id}/custom-domains/{id}Remove a custom domain
POST /v1/{app_id}/custom-domains
Authorization: Bearer {token}
{
"hostname": "app.example.com"
}

Response:

{
"domain": {
"id": "uuid",
"hostname": "app.example.com",
"status": "pending",
"ssl_status": "pending"
},
"cname_target": "butterbase.dev",
"instructions": "Add a CNAME record..."
}

The response instructions field contains the exact CNAME setup steps for your DNS provider. If your DNS is managed by Cloudflare, the record must be set to DNS-only (grey cloud). Proxied (orange cloud) CNAMEs between different Cloudflare accounts produce Error 1014 and will not work.

GET /v1/{app_id}/custom-domains/{id}/status

Returns current verification and SSL status from Cloudflare. Poll this endpoint after adding a domain (typically resolves within 5–15 minutes).

ErrorMeaning
feature_not_availablePlan doesn’t include custom domains (upgrade to Pro)
RESOURCE_ALREADY_EXISTSHostname is already registered
RESOURCE_NOT_FOUNDDomain ID not found