Skip to content
SDKProductSites and appsSite

Site methods: publish

The Site Verbs publish as typed SDK methods, with inputs, result, refusals and an example.

Reference for Site, one group of Site methods.

Site.publish

Publish puts a Site’s current Pages live on its Domains, under its Brand. Verb page.

TypeScript
interface SiteVerbs {
  publish(input: SitePublishInput, options?: SB.CallOptions): SB.Call<Site>
}

Emits Site.published.

Inputs

InputTypeRequiredDescription
siteSiterequiredThe Site to publish.

Returns

OutputTypeRequiredDescription
siteSiterequiredThe Site, now live.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.
The record is not in a state that allows this Verb, so the call is refused.refusedRead the record, run the Verb that moves it to an allowed state, then retry.None.

Example

TypeScript
import { $ } from 'startup-builder'

const site = await $.Site.publish({ site: 'site_kqt1HxwFab' })