Content.One Agent API
The Content.One Agent API provides programmatic access to an AI-powered assistant for Zesty.io CMS instances. It can create content, edit templates, manage schemas, generate images, install integrations, add comments, and more — all via a single conversational endpoint.
All endpoints are JSON-based. Requests use Content-Type: application/json and responses return JSON objects with an ok boolean field.
Authentication
Most endpoints require a Zesty.io Instance ZUID and Developer Token. These can be provided in two ways:
instance_zuid and instance_token in the JSON body (POST/PUT endpoints).?instance_zuid=... as a query parameter and Authorization: Bearer <token> as a header (GET endpoints).
If omitted, the server falls back to the ZESTY_INSTANCE_ZUID environment variable (where configured).
Base URL
https://agent.content.one
All endpoint paths below are relative to this base URL.
Messaging
Send messages to the AI agent and manage in-flight requests.
/client/message
Send a message to the AI agent
The primary conversational endpoint. Sends a user message (with optional attachments) to the agent, which parses intent, routes to the appropriate sub-agent, and returns a structured response.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
instance_zuid | string | Yes | Zesty instance ZUID (e.g. 8-xyz...) |
instance_token | string | Yes | Zesty developer token |
message | string | Yes* | The user's message. *Required unless attachments are provided. |
requestId | string | No | Client-generated request ID for log streaming. Auto-generated if omitted. |
lang | string | No | Language code (en, es, nl). Affects AI response language. |
attachments | array | No | Up to 10 file attachments. Each: { name, type, data } where data is base64. Max 20MB each. |
zpw | string | No | Preview lock password for gated WebEngine previews. |
Example Request
curl -X POST https://agent.content.one/client/message \
-H "Content-Type: application/json" \
-d '{
"instance_zuid": "8-abcdef1234",
"instance_token": "your-developer-token",
"message": "Write a blog post about sustainable farming"
}'
Response
Returns an ok boolean, a message (markdown), and action-specific fields depending on the agent that handled the request:
{
"ok": true,
"message": "I've created a new article about sustainable farming...",
"previewUrl": "https://xyz.preview.zesty.io/blog/sustainable-farming/",
"approveUrl": "/client/approve?modelZuid=6-...&itemZuid=7-...&version=1",
"durationMs": 4523
}
Additional response fields may include: viewZuid, modelZuid, pendingSchema, pendingScript, discoveryResults, mediaResults, codeSearchResults, blockResults, headTagResults, settingsResults, commentResults, mediaUrl, showHelp, and more.
/client/cancel
Cancel an in-flight request
History & Logs
Retrieve conversation history, streaming logs, and token usage data.
/client/history/:instanceZuid
Get message history
/client/logs/:requestId
Stream logs (SSE)
/client/stored-logs/:instanceZuid
Get stored logs
/client/stored-tokens/:instanceZuid
Get token usage
Publishing
Approve and publish content items and code views.
/client/approve
Publish a content item
/client/approve-view
Publish a code view
/client/mark-approved
Record approval in history
Schema & Integration
Confirm pending schemas and install scripts/stylesheets.
/client/schema/confirm
Confirm and create a schema
/client/integration/confirm
Install a script/stylesheet
/client/headtag
Delete a head tag
Instance Data
Fetch instance configuration, models, views, and domain info.
/client/instance-data
Get instance settings and metadata
/client/models
List content models
/client/views
List template views
/client/webengine-domain
Get WebEngine preview domain
Blocks
Manage block components and model associations.
/client/block/add-to-model
Add a block selector field to a model
Context Files
Manage AI context files that guide brand voice, writing style, image direction, and coding standards.
/client/context
Get AI context files
/client/context
Update an AI context file
Utility
Health check and system status.
/health
Health check
Agent Actions Reference
When you send a message to /client/message, the agent classifies your intent and routes to a specialized sub-agent. Here are all supported actions:
Generate full content items with AI-written text, images, and SEO metadata.
"Write a blog post about sustainable farming"
Search for and edit fields on existing content items.
"Change the homepage title to Hello World"
Modify existing Zesty view/template code with natural language.
"Add a sidebar to the articles template"
Generate brand-new view files from scratch.
"Create /components/nav.html with a responsive navbar"
Create models, add fields, or inspect existing schemas.
"Create an articles model with tags"
Build complete block components — schema, fields, template, and seed content.
"Make a hero banner block"
Search media library first, then generate with DALL-E 3 if needed.
"Generate a landscape image of a mountain sunset"
Upload pasted or attached images to the media library.
"Upload this image"
Search for content items, media files, code files, blocks, head tags, or settings.
"Find me an article named Rosie the Riveter"
Install Tailwind, Bootstrap, Font Awesome, Google Fonts, or custom tags.
"Install Tailwind CSS"
Build JSON API endpoints backed by content models.
"Make a search endpoint for articles"
Add or view comments on views, models, or content items.
"Add comment to loader: script is installed twice"