ContentShelter API Documentation
Secure content delivery API for your websites
Overview
The ContentShelter API allows you to securely fetch content from your ContentShelter account and display it on your websites. All requests must include an API key for authentication.
Authentication
API Key & Secret
Include both your API key and secret in request headers:
Getting API Keys
- Log in to your ContentShelter dashboard
- Navigate to "API Keys" in dashboard
- Click "Create API Key"
- Configure permissions and rate limits
- Copy both API key and secret
- Each API key is website-specific for security
API Endpoints
Get Content List
Parameters
contentType- Content type (blog_post, article, guide, news, faq)limit- Number of items per page (default: 10)page- Page number (default: 1)
Example Request
Response
Get Single Content
Parameters
contentType- Content typeslug- Content slug
Example Request
Response
WordPress Integration
ContentShelter API works seamlessly with WordPress websites. Here are multiple integration methods:
WordPress Plugin Method
Create a custom WordPress plugin for the most robust integration:
Theme Integration Method
Add directly to your WordPress theme's functions.php:
Gutenberg Block Method
Create a custom Gutenberg block for modern WordPress:
Usage in WordPress
Shortcode Method
PHP Template Method
Gutenberg Editor
WordPress REST API Bridge
Create a WordPress REST endpoint to bridge ContentShelter:
WordPress Integration Benefits
- Easy Setup: Plugin installation or theme integration
- Native Feel: Content appears as regular WordPress posts
- SEO Friendly: Content indexed by search engines
- Theme Compatible: Works with any WordPress theme
- Performance: Cached content for fast loading
- Admin Control: Manage from WordPress dashboard
- Multi-site Ready: Use across WordPress networks
JavaScript Embed
Use our JavaScript embed script to easily display content on your website:
Features
- Automatic content loading and display
- Responsive design
- Modal popup for full articles
- Automatic API key extraction from script URL
- Error handling and loading states
Rate Limiting
API requests are rate-limited to prevent abuse. Each API key has configurable limits:
- Default limit: 1,000 requests per hour
- Rate limit headers are included in responses
- Exceeding limits returns HTTP 429 status
- Configure limits in your API key settings
Rate Limit Headers
Error Handling
401 Unauthorized
Missing or invalid API key
403 Forbidden
Insufficient permissions or origin not allowed
404 Not Found
Content not found
429 Too Many Requests
Rate limit exceeded
500 Internal Server Error
Server error occurred
Security
Security Features
- Dual authentication (API key + secret) required for all requests
- Website-specific content isolation for security
- Only published content is accessible via API
- Origin validation for API keys
- HTTPS-only API endpoints
- Rate limiting to prevent abuse
- CORS headers for cross-origin requests
- Request logging and monitoring
- API key deactivation and management
Website Isolation
Each API key is bound to a specific website for maximum security:
- API keys only return content from their assigned website
- Cross-website data access is blocked by default
- Website ID is included in all responses for verification
- API key names help identify integration sources