API
Nearly everything you can do in the editor can also be done programmatically through a REST API.
Use the REST API to make automated updates to your site. You can do this by writing scripts you trigger or by giving an AI Agent like Claude access to your site through an API token.
What You Can Do
You can do a lot. The API offers more than the ability to create and edit pages and posts. You can create blocks from scratch, adjust the theme and even deploy a preview. These are the exact things an AI agent needs to create a site from scratch or convert an existing one to Geppetto.
Site Tokens
A token is how a script or agent proves it's allowed to touch your site.
- Open Settings → API Tokens (you need the Developer or Owner role).
- Click Create token, give it a name, and copy it.
- You only see the full token once. Save it someplace safe.
Token Boundaries:
- Scoped to one site. A token only works for the site it was created on.
- Revocable anytime. Delete a token and it stops working immediately.
Site tokens are a Team-plan feature. Upgrade a site to Team to enable token creation. (Account-level tokens that can create new sites are a separate Pro API add-on.)
Making a Request
The base URL is https://api.geppetto.build. Pass your token as a bearer token in the Authorization header.
Writes are plain JSON. Creating a post is a POST to /pages with the post type's id and a name (the name becomes the slug); setting its content is a follow-up PATCH.
# List the pages and posts on a site
curl -H "Authorization: Bearer $TOKEN" \
"https://api.geppetto.build/pages?site_id=YOUR_SITE_ID"
# Create a post (postTypeId comes from GET /postTypes)
curl -X POST https://api.geppetto.build/pages \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Hello World",
"site_id": "YOUR_SITE_ID",
"postTypeId": "POST_TYPE_ID"
}'
The Full Reference
API Documentation
A live Swagger UI you can make authenticated calls from.
https://api.geppetto.build/docs
Machine-readable spec
The OpenAPI document, for generating a client or feeding into your tools