Skip to main content
Hosting methods are available on the authenticated @embeddables/admin client. Reads require project.read; writes require project.write.

Install

Example:

Project and apps

string
required
Project UUID.
GetHostingProjectResult
{ slug, enrolled, app_count }.
string
required
Project UUID.
string
required
A 3–16 character hosting slug.
GetHostingProjectResult
Updated enrollment.
string
required
Project UUID.
HostingApp[]
Registered apps.
string
required
Project UUID.
string
required
A unique 3–12 character app slug.
string | null
Optional repository path.
string
Git branch to auto-promote; defaults to main.
HostingApp
Created app.
string
required
Project UUID.
string
required
Hosting app UUID.
string | null
New repository path.
string
New production branch. Its latest deploy is promoted when the value changes and a deploy exists.
HostingApp
Updated app.
string
required
Project UUID.
string
required
Hosting app UUID.
true
Confirms deletion.
The project slug accepts 3–16 characters and the app slug 3–12 characters. Both use lowercase letters, numbers, and single hyphens. The project slug is set once, and app slugs do not change. production_branch defaults to main. Changing production_branch immediately promotes that branch’s latest deploy when one exists.

Deploy keys

string
required
Project UUID.
CreateHostingDeployKeyResult
{ id, prefix, secret, created_at }.
string
required
Project UUID.
HostingDeployKey[]
Key ids, prefixes, creation, revocation, and last-used timestamps.
string
required
Project UUID.
string
required
Deploy-key UUID.
true
Confirms revocation.
createHostingDeployKey is the only response that contains the plaintext edk_… secret. Store it immediately. listHostingDeployKeys returns only the key id, prefix, creation and revocation timestamps, and last-used timestamp.

Previews and production

string
required
Project UUID.
string
required
Git branch name.
HostingPreview[]
Branch previews across the project’s apps.
string
required
Project UUID.
string
required
Hosting app UUID.
number
1–100; defaults to 20.
HostingDeploy[]
Commit builds, newest first.
HostingPreview & { script_name: string } | null
What production serves now, even when outside the returned page.
string
required
Project UUID.
string
required
Hosting app UUID.
GetHostingProductionResult
{ production_label, script_name, updated_at }.
string
required
Project UUID.
string
required
Hosting app UUID.
number
1–100.
HostingPromotion[]
Promotions, newest first.
string
required
Project UUID.
string
required
Hosting app UUID.
string
required
Branch or immutable commit preview label. Older commit labels support rollback.
PromoteHostingPreviewResult
{ production_label, script_name }.
Deploy and promotion limits accept 1–100. Deploys default to 20. Manual promotion can select an older immutable commit preview for rollback.

Custom domains

string
required
Project UUID.
string
required
Hosting app UUID.
HostingDomain[]
Domains and their current status.
string
required
Project UUID.
string
required
Hosting app UUID.
string
required
Full hostname, without a scheme or path.
HostingDomain
Created domain in pending status.
string
required
Project UUID.
string
required
Hosting app UUID.
string
required
Hosting-domain UUID.
true
Confirms removal.
After you add a domain, follow the dashboard’s DNS instructions. Embeddables activates it after verification.

Returns

object
{ id, project_id, slug, repo_path, production_branch, created_at }.
object
{ id, project_id, app_id, hostname, status, cloudflare_hostname_id, verified_at, created_at }. Status is pending, active, or failed.
object
{ label, url, app_slug, project_slug, ref }. Production has a null ref.
HostingPreview
Also includes { commit, committed_at, created_at, branches, is_production }.
object
{ id, from_script_name, to_script_name, source_label, trigger, created_at }.

Errors

All SDK failures extend AdminError.