API DocumentationBETA
Complete REST API reference for Cognitor CMS
Total Endpoints
114
AI Features
12
Public Access
14
Avg Timeout
45s
Authentication
Most endpoints require JWT authentication. Public endpoints are clearly marked.
Token Type
JWT Bearer Token
Header Format
Token Expiration
24 hours
User Roles
Authentication & Users7 endpoints
User management, authentication, and authorization endpoints
/auth/loginUser login with email and password
/auth/currentuserGet details of currently authenticated user
/users/List all users (requires authentication)
/users/Create a new user account
/users/{user_id}Get user details by ID
/users/{user_id}Update user information (username, email, role)
/users/{user_id}Delete user account (admin or self)
Sites & Content Management11 endpoints
Multi-site management and content operations
/sites/List all sites with pagination
/sites/Create a new site
/sites/{site_identifier}Get site details by identifier
/sites/{site_identifier}Update site information
/sites/{site_identifier}Delete a site
/{site_identifier}/posts/List posts for a specific site
/{site_identifier}/posts/Create a new post
/{site_identifier}/posts/{post_id}Get specific post details
/{site_identifier}/posts/{post_id}Update post content and metadata
/{site_identifier}/posts/{post_id}Delete a post
/{site_identifier}/posts/{post_id}/transformTransform post content using AI prompts
User-Site Associations4 endpoints
Manage user assignments to sites
/sites/{site_identifier}/users/{user_id}Assign a user to a site (admin only)
/sites/{site_identifier}/users/{user_id}Remove a user from a site (admin only)
/sites/{site_identifier}/usersList users assigned to a site
/users/{user_id}/sitesList sites a user is assigned to
AI-Powered Media Generation12 endpoints
Artificial intelligence features for content creation
/{site_identifier}/media/generateGenerate images using AI (FLUX, Stable Diffusion)
/{site_identifier}/media/generatevideoGenerate videos using Kling 2.5 Turbo Pro (without audio)
/{site_identifier}/media/generatevideo-veo3Generate videos using Google VEO 3.1 Fast (with audio support)
/{site_identifier}/media/generatevideo-sora2Generate videos using OpenAI Sora 2 Standard (720p, cost-effective, with audio)
/{site_identifier}/media/ttsConvert text to speech using OpenAI TTS
/{site_identifier}/media/{media_id}/edit-with-aiEdit images using AI (FLUX Kontext Max)
/{site_identifier}/media/{media_id}/generate-metadataGenerate SEO metadata using GPT-4o Vision
/{site_identifier}/seo/generatetextGenerate text content using OpenAI GPT models
/{site_identifier}/seo/analyzeAnalyze content for SEO optimization
/{site_identifier}/generate-website/Generate complete websites using v0 AI
/{site_identifier}/generate-website/previewPreview website generation without creating files
/{site_identifier}/generate-website/deploy-to-netlifyGenerate and deploy website directly to Netlify
Media Library & Storage11 endpoints
File management, uploads, and media organization
/{site_identifier}/media/List media files with pagination and filtering
/{site_identifier}/media/Upload new media files
/{site_identifier}/media/{media_id}Get media file details
/{site_identifier}/media/{media_id}Update media metadata
/{site_identifier}/media/{media_id}Delete media file
/{site_identifier}/media/countGet total media count for site
/{site_identifier}/media/{media_id}/moveMove media file to different folder
/{site_identifier}/media/{media_id}/image-editor-accessValidate image editor access for media item
/{site_identifier}/media/{media_id}/save-edited-imageSave edited image as new version or replace original
/{site_identifier}/media/{media_id}/image-versionsGet all versions of an image
/{site_identifier}/media/webhook/falWebhook endpoint for FAL AI service results
Media Folders7 endpoints
Hierarchical folder organization for media files
/{site_identifier}/media/folders/List media folders with optional parent filtering
/{site_identifier}/media/folders/Create new media folder
/{site_identifier}/media/folders/treeGet complete folder tree structure
/{site_identifier}/media/folders/{folder_id}Get specific folder details
/{site_identifier}/media/folders/{folder_id}Update folder name or parent
/{site_identifier}/media/folders/{folder_id}Delete folder and optionally its contents
/{site_identifier}/media/folders/{folder_id}/moveMove folder to new parent location
Content Types & Elements13 endpoints
Dynamic content types and content element management
/{site_identifier}/contenttypes/List content types for site
/{site_identifier}/contenttypes/Create new content type
/{site_identifier}/contenttypes/{type_id}Get specific content type details
/{site_identifier}/contenttypes/{type_id}Update content type schema
/{site_identifier}/contenttypes/{type_id}Delete content type
/{site_identifier}/contenttypes/validateValidate content type schema
/{site_identifier}/contenttypes/{type_id}/dependenciesGet content type dependencies
/{site_identifier}/elements/List content elements with type filtering
/{site_identifier}/elements/Create content element
/{site_identifier}/elements/{element_id}Get specific content element
/{site_identifier}/elements/{element_id}Update content element data
/{site_identifier}/elements/{element_id}Delete content element
/{site_identifier}/elements/{element_id}/forceForce delete content element (admin cleanup)
Pages & Page Builder8 endpoints
Page management and content element composition
/{site_identifier}/pages/List pages with content elements
/{site_identifier}/pages/Create new page
/{site_identifier}/pages/{page_id}Get specific page with content elements
/{site_identifier}/pages/{page_id}Update page metadata
/{site_identifier}/pages/{page_id}Delete page
/{site_identifier}/pages/{page_id}/elementsAdd content element to page
/{site_identifier}/pages/{page_id}/elements/{element_id}Update page element position and layout
/{site_identifier}/pages/{page_id}/elements/{element_id}Remove element from page
Search & Analytics7 endpoints
Elasticsearch-powered search and analytics features
/search/sites/{site_identifier}Search content across site (public endpoint)
/search/sites/{site_identifier}/suggestGet search suggestions/autocomplete
/search/sites/{site_identifier}/statsGet search statistics (requires auth)
/search/sites/{site_identifier}/analyticsGet search analytics with trends
/search/admin/sites/{site_identifier}/reindexReindex site content for search (admin only)
/search/admin/healthGet Elasticsearch cluster health (admin only)
/search/admin/sites/{site_identifier}/indexDelete entire search index for site (admin only)
Transactions & Credits8 endpoints
Cost tracking, credit management, and usage analytics
/{site_identifier}/transactions/cost-settingsGet cost settings for site
/{site_identifier}/transactions/cost-settingsUpdate cost settings for site
/{site_identifier}/transactions/credits/balanceGet current user's credit balance
/{site_identifier}/transactions/credits/addAdd credits to user balance (admin only)
/{site_identifier}/transactions/credits/checkCheck if user has sufficient credits
/{site_identifier}/transactions/List transactions with filtering and pagination
/{site_identifier}/transactions/statsGet transaction statistics
/{site_identifier}/transactions/monthly-usageGet monthly usage statistics
Prompts & System Configuration8 endpoints
Reusable prompts and system prompt management
/transferprompts/List reusable transfer prompts
/transferprompts/Create new transfer prompt (admin only)
/transferprompts/{prompt_id}Update transfer prompt
/transferprompts/{prompt_id}Delete transfer prompt
/system-prompts/Get all system prompts (requires auth)
/system-prompts/{prompt_type}Get system prompt by type (image, video, text)
/system-prompts/{prompt_type}Create or update system prompt (admin only)
/system-prompts/{prompt_type}Delete system prompt (admin only)
Cache Management3 endpoints
Redis cache management and optimization
/admin/cache/allClear entire Redis cache (admin only)
/admin/cache/site/{site_id}Clear cache for specific site
/admin/cache/element/{element_id}/site/{site_id}Clear cache for specific content element
System Administration7 endpoints
Admin-only endpoints for monitoring and system management
/admin/monitoring/system-healthGet overall system health status
/admin/monitoring/cache-statisticsGet detailed cache performance statistics
/admin/monitoring/rate-limit-statsGet rate limiting statistics
/admin/monitoring/performance-metricsGet comprehensive performance metrics
/admin/monitoring/cache-cleanupManually trigger cache cleanup
/admin/monitoring/threat-intelligenceGet threat intelligence and security trends
/admin/monitoring/security-dashboardGet comprehensive security monitoring dashboard
Public API8 endpoints
Public endpoints for website rendering and content access
/public/{site_identifier}/pagesGet published pages (public access)
/public/{site_identifier}/pages/{page_id}Get specific published page with content elements
/public/{site_identifier}/elementsList published content elements (public access)
/public/{site_identifier}/elements/{element_id}Get content element for public rendering
/public/{site_identifier}/elements/{element_id}/referencesFind all pages and content elements referencing this element (NEW 2024)
/public/{site_identifier}/media/{media_id}Get media file metadata (public access, NEW 2024)
/public/{site_identifier}/media/{media_id}/viewView/download media file (public access)
/API root endpoint
Quick Start
Get started with the Cognitor CMS API in minutes
1. Authentication
curl -X POST "https://api.cognitor.com/login" \
-H "Content-Type: application/json" \
-d '{"email": "your@email.com", "password": "password"}'2. Make API Calls
curl -X GET "https://api.cognitor.com/sites/" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"