Content.One Content.One Agent | API Documentation
Back to Agent

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:

Request body — pass instance_zuid and instance_token in the JSON body (POST/PUT endpoints).
Query + Header — pass ?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.

POST /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

ParameterTypeRequiredDescription
instance_zuidstringYesZesty instance ZUID (e.g. 8-xyz...)
instance_tokenstringYesZesty developer token
messagestringYes*The user's message. *Required unless attachments are provided.
requestIdstringNoClient-generated request ID for log streaming. Auto-generated if omitted.
langstringNoLanguage code (en, es, nl). Affects AI response language.
attachmentsarrayNoUp to 10 file attachments. Each: { name, type, data } where data is base64. Max 20MB each.
zpwstringNoPreview 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.

POST /client/cancel Cancel an in-flight request

History & Logs

Retrieve conversation history, streaming logs, and token usage data.

GET /client/history/:instanceZuid Get message history
GET /client/logs/:requestId Stream logs (SSE)
GET /client/stored-logs/:instanceZuid Get stored logs
GET /client/stored-tokens/:instanceZuid Get token usage

Publishing

Approve and publish content items and code views.

GET /client/approve Publish a content item
GET /client/approve-view Publish a code view
POST /client/mark-approved Record approval in history

Schema & Integration

Confirm pending schemas and install scripts/stylesheets.

POST /client/schema/confirm Confirm and create a schema
POST /client/integration/confirm Install a script/stylesheet
DELETE /client/headtag Delete a head tag

Instance Data

Fetch instance configuration, models, views, and domain info.

GET /client/instance-data Get instance settings and metadata
GET /client/models List content models
GET /client/views List template views
GET /client/webengine-domain Get WebEngine preview domain

Blocks

Manage block components and model associations.

POST /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.

GET /client/context Get AI context files
PUT /client/context Update an AI context file

Utility

Health check and system status.

GET /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:

Create Content

Generate full content items with AI-written text, images, and SEO metadata.

"Write a blog post about sustainable farming"

Edit Content

Search for and edit fields on existing content items.

"Change the homepage title to Hello World"

Edit Template

Modify existing Zesty view/template code with natural language.

"Add a sidebar to the articles template"

Create Template

Generate brand-new view files from scratch.

"Create /components/nav.html with a responsive navbar"

Manage Schema

Create models, add fields, or inspect existing schemas.

"Create an articles model with tags"

Create Block

Build complete block components — schema, fields, template, and seed content.

"Make a hero banner block"

Generate Image

Search media library first, then generate with DALL-E 3 if needed.

"Generate a landscape image of a mountain sunset"

Upload Media

Upload pasted or attached images to the media library.

"Upload this image"

Discover Content

Search for content items, media files, code files, blocks, head tags, or settings.

"Find me an article named Rosie the Riveter"

Install Script

Install Tailwind, Bootstrap, Font Awesome, Google Fonts, or custom tags.

"Install Tailwind CSS"

Create Endpoint

Build JSON API endpoints backed by content models.

"Make a search endpoint for articles"

Comments

Add or view comments on views, models, or content items.

"Add comment to loader: script is installed twice"