Developer documentation

From an agent to a live business website

Prepare a structured one-page website, get the owner’s verified permission, and publish it with hosting, HTTPS and a built-in contact form. API, MCP and CLI use the same site permissions and publishing service.

Rollout status: Agent endpoints are gated during the pilot. A 503 agent_access_disabled response means the environment has not been enabled. These docs describe the implementation; production acceptance and npm publication are release gates.

API quickstart

Download the example document, edit the business content, and validate it against the document schema. GET /api/v1/catalog provides current templates, industries, styles and a complete starter document.

export COCKATOO_ORIGIN=https://app.cockatoo.com.au
curl -fsS "$COCKATOO_ORIGIN/api/v1/catalog" > catalog.json
curl -fsS https://cockatoo.com.au/agent-example-site.json > site.json
# Edit site.json, then build the onboarding request:
jq --arg email [email protected] --arg agentName "My website agent"   '{email:$email,agentName:$agentName,document:.}' site.json > onboarding.json
curl -fsS "$COCKATOO_ORIGIN/api/v1/onboarding"   -H 'Content-Type: application/json'   -H "Idempotency-Key: $(uuidgen)" --data-binary @onboarding.json

Keep continuationCredential private. Give only approvalUrl to the owner. The owner signs up or signs in, verifies their email, reviews the draft and grants site access. For an existing website, the owner chooses whether to keep or replace the draft. No invitation email is sent automatically.

export ONBOARDING_ID='the-returned-id'
export COCKATOO_CONTINUATION='the-private-continuation-credential'
curl -fsS "$COCKATOO_ORIGIN/api/v1/onboarding/$ONBOARDING_ID"   -H "Authorization: Bearer $COCKATOO_CONTINUATION"
# After state becomes approved, exchange once; save the response securely.
curl -fsS -X POST "$COCKATOO_ORIGIN/api/v1/onboarding/$ONBOARDING_ID/exchange"   -H "Authorization: Bearer $COCKATOO_CONTINUATION"   -H "Idempotency-Key: $(uuidgen)"
export COCKATOO_TOKEN='the-returned-api-token'
curl -fsS "$COCKATOO_ORIGIN/api/v1/site"   -H "Authorization: Bearer $COCKATOO_TOKEN"

Approval applies the proposed draft when the owner has no site. Existing owners can instead create a token in Agent access, then call POST /site with {"document":{...}} if they do not yet have a website.

# Upload an image and save its returned assetId in logo or gallery, with alt text.
curl -fsS "$COCKATOO_ORIGIN/api/v1/site/assets"   -H "Authorization: Bearer $COCKATOO_TOKEN" -H 'Content-Type: image/png'   -H "Idempotency-Key: $(uuidgen)" --data-binary @photo.png
# Read the latest revision. Put the edited document and revision in save.json.
curl -fsS -X PUT "$COCKATOO_ORIGIN/api/v1/site"   -H "Authorization: Bearer $COCKATOO_TOKEN" -H 'Content-Type: application/json'   -H "Idempotency-Key: $(uuidgen)" --data-binary @save.json
curl -fsS "$COCKATOO_ORIGIN/api/v1/site/preview"   -H "Authorization: Bearer $COCKATOO_TOKEN" > preview.json
# Replace 2 with the latest revision returned by the service.
curl -fsS "$COCKATOO_ORIGIN/api/v1/site/publish"   -H "Authorization: Bearer $COCKATOO_TOKEN" -H 'Content-Type: application/json'   -H "Idempotency-Key: $(uuidgen)" --data '{"revision":2,"slug":"my-business"}'
curl -fsS "$COCKATOO_ORIGIN/api/v1/site/publication"   -H "Authorization: Bearer $COCKATOO_TOKEN"

Check state: live, the published revision and liveUrl, then open the URL. Draft saves do not publish. Unpublish with POST /site/unpublish and the current revision.

Connect through MCP

Remote endpoint: https://app.cockatoo.com.au/mcp. Add this URL in a client that supports Streamable HTTP and OAuth with PKCE. Discovery starts at /.well-known/oauth-protected-resource/mcp. Clients register HTTPS or loopback redirect URIs through the advertised registration endpoint. Tokens are bound to the MCP resource; API tokens cannot be reused as MCP tokens.

Public tools: catalog, start_onboarding, onboarding_status, exchange_onboarding. Website tools request owner authorization: get_site, create_site, save_site, list_images, upload_image, preview_site, publication_status, publish_site, unpublish_site.

Start with catalog, prepare the document, then call start_onboarding. Give the owner the approval URL. After approval, connect their account through OAuth to operate the site in MCP. The optional exchange returns an API token for API or CLI use. Supply a fresh random idempotencyKey for each write. Image uploads take base64 plus a MIME type. OAuth access tokens expire after one hour; reconnect to renew authorization.

Use the CLI

The package is @cockatoo/cli. A versioned CLI package and SHA-256 checksum are available directly from Cockatoo. Install the download with npm install -g https://cockatoo.com.au/downloads/cockatoo-cli-0.1.1.tgz. Until npm publication, you can also run node packages/cli/bin/cockatoo.mjs from the source checkout. After publication:

npm install -g @cockatoo/cli
cockatoo templates --json
cockatoo industries --json
cockatoo onboard --email [email protected] --name "My agent" --file site.json --json
# Share the returned approvalUrl; set COCKATOO_CONTINUATION privately.
cockatoo onboard status "$ONBOARDING_ID" --json
cockatoo onboard exchange "$ONBOARDING_ID" --json
# Set COCKATOO_TOKEN privately from the exchange response.
cockatoo sites get --json
cockatoo assets upload --file photo.png --mime image/png --json
# Put the assetId and alt text in site.json; use the latest returned revision.
cockatoo sites save --file site.json --revision 1 --json
cockatoo preview --json
cockatoo publish --revision 2 --slug my-business --json
cockatoo sites status --json

cockatoo login provides the account token page. Pipe a token to cockatoo login --token-stdin to store it locally with restricted file permissions, or use COCKATOO_TOKEN without local persistence. logout removes the local credential; revoke the grant in Cockatoo to disable all copies. Do not commit tokens, continuation credentials or exchange output.

Exit codes: 0 success, 1 request failure, 2 usage error, 3 authentication or permission error, 4 conflict, 5 network/rate-limit/service failure. --json produces structured stdout; diagnostics go to stderr. Failed writes report their idempotency key.

API reference

This endpoint list is generated from the OpenAPI 3.1 contract. Base URL: https://app.cockatoo.com.au/api/v1.

MethodPathOperation
GET/tokenInspect the current API grant without requiring site-read permission
GET/catalogList templates, industries, style presets and an example document
POST/onboardingPrepare a private owner-approved account and website handoff
GET/onboarding/{id}Check pending_owner_approval, approved, denied, processing or exchanged
POST/onboarding/{id}/exchangeExchange approved onboarding for an API token
GET/siteRead the owner’s site
POST/siteCreate a structured draft
PUT/siteReplace the draft with revision checking
GET/site/assetsList the site’s retained uploaded images
POST/site/assetsUpload up to 5 MiB of JPEG, PNG or WebP
GET/site/previewReturn private draft preview HTML; forms disabled
GET/site/publicationRead live state and published revision
POST/site/publishPublish a saved revision
POST/site/unpublishRemove the public publication while retaining the draft

Permissions, limits and safe retries

Hosting and pricing

Free includes one hosted site, HTTPS, a Cockatoo address, contact form and owner enquiry inbox, with Cockatoo branding. Pro is A$29/year for one custom hostname and branding removal. Domain registration and mailboxes are separate. See pricing.