Agent API Portal
Agent API Port Enabled
External agents can manage articles, page content and system settings via API. All write operations require API Key authentication.
API Endpoints
Article Management
POST /api/agent/articles— Create articlePUT /api/agent/articles/[slug]— Update articleDELETE /api/agent/articles/[slug]— Delete article
Page Content
POST /api/agent/page/[pageKey]— Update page content
System Settings
PUT /api/agent/settings/[key]— Update settings
Authentication
All write operations require API Key in request header:
x-api-key: your_agent_api_keyRequest Examples
// Create article
POST /api/agent/articles
Headers: x-api-key: fundao_agent_xxx
Body: {
"titleZh": "Article Title ZH",
"titleEn": "Article Title EN",
"slug": "article-slug",
"category": "news",
"contentZh": "Chinese content",
"contentEn": "English content",
"published": true
}
// Update page content
POST /api/agent/page/home
Headers: x-api-key: fundao_agent_xxx
Body: {
"lang": "zh",
"content": {
"hero": {
"title": "New Title",
"subtitle": "New Subtitle"
}
}
}Data Model
Article
titleZh/titleEn— Chinese/English titlesslug— URL identifier (unique)category— Category (news/industry)contentZh/contentEn— Chinese/English contentexcerptZh/excerptEn— Chinese/English excerptscoverImage— Cover image URLtags— Tags arraypublished— Whether published