Sites & publication
Read business details, save a draft, and publish the reviewed website.
Start with an existing workspace
Create the business workspace through BenjiAds onboarding. A credential then connects to that workspace's site. The initial public API does not create accounts or new workspaces.
Site editing, publication, and lead capture use the existing freemium business rules. The dashboard's onboarding checkout flow and paid-feature gates still apply where configured.
Read and update the site
curl https://api.benjiads.com/v1/site \
-H "Authorization: Bearer $BENJIADS_API_KEY"
curl -X PATCH https://api.benjiads.com/v1/site \
-H "Authorization: Bearer $BENJIADS_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: update-business-details-001" \
-d '{"displayName":"Alex Plumbing","tagline":"Local plumbing in Austin"}'The site response contains its public settings, published siteDoc, and current siteDraft. Private payment and provider account identifiers are omitted.
update_site changes business settings. Fields such as locations, links, and socials replace the supplied collection; first read the existing values to preserve items you intend to keep.
Draft, review, publish
Use save_site_draft to submit a full BenjiAds site document. Begin with the existing siteDoc or siteDraft; preserve its structure and edit the intended blocks. The shared site builder sanitizer validates the document.
Read the draft back to review it, then publish:
curl -X POST https://api.benjiads.com/v1/site/publish \
-H "Authorization: Bearer $BENJIADS_API_KEY" \
-H "Idempotency-Key: publish-reviewed-homepage-001"Publishing copies the saved draft to the published document and clears the draft. It does not purchase a domain. Domain setup remains in the dashboard.
Leads
Public lead capture remains available without a subscription. Reading lead contacts is gated by the workspace's entitlement: list_leads returns gated: true with masked contact details when access is absent. This masking happens on the server and also applies to MCP.