Skip to content

ButterIX v1 is out: versions, multiple languages, Ask AI, and a per-site MCP server, all built in. →

Set primary domain

POSThttps://api.butterix.com/v1/sites/:site/domains/:domain/primary

Requires the admin role. Canonical URLs, the sitemap, llms.txt, and .md pages switch to this domain, and the live version is redeployed automatically. The domain must be verified and its HTTPS certificate active.

Authentication

AuthorizationBearer

An organization API key, created in the console under Organization settings → API Keys, starting with biti_. It acts as editor and can't do anything that requires admin.

biti_sessionstring

The HttpOnly session cookie set on login. Requests that change data must be same-origin (the Origin header is checked) to prevent CSRF.

Path parameters

sitestringRequired

Site slug or id

domainstringRequired

Response

Primary domain
domainstringOptional
verifiedbooleanOptional
primarybooleanOptional

Whether this is the primary domain

verifyRecordobjectOptional

TXT record to add

type"TXT"Optional
namestringOptional
valuestringOptional
cnamestringOptional

CNAME target

createdAtintegerOptional
deploymentstringOptional

因此开始的部署;不需要或无法重新部署时没有

Errors