API Overview
Complete reference for the Boring API endpoints, authentication, and general usage.
Base URL
https://boring.aiagent-me.com
All API requests should be made to this base URL.
Authentication
API Key Authentication
All API requests (except OAuth callbacks) require an API key in the request header:
boring-api-key: boring_xxxxxxxxxxxxx
How to get an API key:
- Sign in to the Boring Dashboard
- Navigate to the Settings page
- Click "Generate New API Key"
- Copy and store the key securely
See the API Keys guide for more details.
Request Format
Content Type
All requests must include:
Content-Type: application/json
Request Body
The request body should be valid JSON:
{
"post": {
"accountId": "uuid-string",
"content": {
"text": "Post content",
"mediaUrls": ["https://example.com/image.jpg"],
"platform": "facebook|instagram|threads"
},
"target": {
"targetType": "facebook|instagram|threads"
}
}
}
Response Format
Success Response
All successful responses return JSON with success: true:
{
"success": true,
"message": "Operation completed successfully",
"data": {
// Response-specific data
}
}
Error Response
All error responses return JSON with success: false:
{
"success": false,
"error": "Error type",
"message": "Detailed error message"
}
Common HTTP status codes:
200- Success400- Bad request (invalid parameters)401- Unauthorized (invalid API key)404- Not found (account or resource doesn't exist)500- Server error
See Errors for complete error reference.
Endpoints
Publishing API
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /v2/posts |
Publish content to social platforms | API Key |
See Publishing for detailed documentation.
Account Management
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /api/accounts |
List connected accounts | Session |
| DELETE | /api/accounts/{id} |
Disconnect account | Session |
| POST | /api/token/info |
Validate token | Session |
Note: Account management endpoints require dashboard authentication (session cookie), not an API key.
Publishing History
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /api/published-posts |
Get publish history | Session |
Query parameters:
limit- Number of posts to return (default: 20, max: 100)
Note: Requires dashboard authentication.
API Key Management
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /api/keys |
List API keys | Session |
| POST | /api/keys |
Generate new API key | Session |
| DELETE | /api/keys/{id} |
Delete API key | Session |
Note: Requires dashboard authentication.
Rate Limits
Rate limits vary by platform:
| Platform | Limit | Window |
|---|---|---|
| 200 calls | Per hour per page | |
| 200 calls | Per hour per user | |
| Threads | 250 calls | Per hour per user |
Rate Limit Headers
Responses include rate limit information:
X-RateLimit-Limit: 200
X-RateLimit-Remaining: 150
X-RateLimit-Reset: 1642780800
Handling Rate Limits
If you exceed rate limits, you'll receive:
{
"success": false,
"error": "RateLimitExceeded",
"message": "Rate limit exceeded. Try again in 3600 seconds.",
"retry_after": 3600
}
Best practices:
- Implement exponential backoff
- Cache responses when possible
- Batch operations during off-peak hours
- Monitor rate limit headers
Subscription Plans & Usage Limits
Boring API offers two subscription plans with different usage limits:
Free Plan
- Monthly API Calls: 10 calls per month
- Pricing: Free
- Reset: Based on registration date (e.g., registered on Jan 15 → resets on 15th of each month)
Pro Plan
- Monthly API Calls: Unlimited
- Pricing: $8/month (billed annually at $96/year) or $12/month (billed monthly)
- Additional Features: Priority support, advanced analytics
Checking Your Usage
To check your current API usage and subscription status:
Endpoint: GET /api/subscription/status
Authentication: Requires session authentication (dashboard login)
Request Example:
curl -X GET https://boring.aiagent-me.com/api/subscription/status \
-H "Cookie: boring_token=YOUR_JWT_TOKEN"
Response for Free Plan:
{
"success": true,
"subscription": {
"status": "free",
"plan": "free"
},
"api_usage": {
"current_usage": 5,
"limit": 10,
"remaining": 5,
"current_month": "2025-12"
}
}
Response for Pro Plan:
{
"success": true,
"subscription": {
"status": "active",
"plan": "pro",
"plan_type": "annual",
"current_period_end": "2026-12-05T00:00:00Z"
},
"api_usage": {
"current_usage": 150,
"limit": -1,
"remaining": -1,
"current_month": "2025-12"
}
}
Response Fields:
current_usage- Number of API calls made this monthlimit- Monthly limit (10 for Free, -1 for Unlimited)remaining- Remaining calls this month (-1 for Unlimited)current_month- Current billing month (YYYY-MM format)
Usage Limit Exceeded
When Free plan users exceed 10 API calls per month, the API returns:
HTTP Status: 429 Too Many Requests
Response:
{
"error": "本月使用次數已滿,請升級到 Pro 方案或等待下個月",
"error_en": "Monthly usage limit reached. Please upgrade to Pro plan or wait for next month.",
"current_usage": 10,
"limit": 10,
"plan": "free"
}
Upgrading to Pro
To upgrade from Free to Pro plan:
- Visit the Boring Dashboard
- Click the "Upgrade to Pro" button
- Choose annual (save 33%) or monthly billing
- Complete payment via Stripe
- Start using unlimited API calls immediately
Idempotency
The Boring API does not currently support idempotency keys. Duplicate requests will create duplicate posts.
Recommendation: Implement your own deduplication logic using the post_submission_id from responses.
Pagination
Currently, only the publishing history endpoint supports pagination:
GET /api/published-posts?limit=20&offset=0
Parameters:
limit- Number of results (default: 20, max: 100)offset- Skip N results (default: 0)
Response:
{
"posts": [...],
"total": 150,
"limit": 20,
"offset": 0
}
Timeouts
- API timeout: 60 seconds for most endpoints
- Publishing timeout: 300 seconds (5 minutes) for video uploads
- Thread publishing: 360 seconds (6 minutes) for long threads
If a request times out:
- Check the publishing history to see if it succeeded
- Retry after a few minutes
- Contact support if issue persists
Webhooks
Webhooks are not currently supported. To monitor publishing status:
- Poll the publishing history endpoint
- Check the dashboard
- Implement your own logging
API Versioning
Current API version: v2
Version is included in the endpoint path:
POST /v2/posts
Deprecation policy:
- Old versions supported for 6 months after new version release
- Deprecation notices sent via email
- Migration guides provided
SDK Support
Official SDKs:
- Python: Coming soon
- JavaScript/Node.js: Coming soon
- PHP: Coming soon
Currently, use standard HTTP libraries:
- Python:
requests - JavaScript:
fetchoraxios - cURL: Direct commands
See Examples for code samples.
Testing
Test Accounts
Use your own test accounts:
- Create test Facebook Pages
- Use Instagram test accounts
- Create separate Threads accounts
Sandbox Mode
There is no sandbox mode. All API calls publish to live accounts.
Recommendation:
- Use dedicated test accounts
- Generate separate API keys for testing
- Mark test posts with [TEST] prefix
Best Practices
1. Error Handling
Always handle errors gracefully:
try:
response = requests.post(API_URL, headers=headers, json=data)
result = response.json()
if not result.get("success"):
log_error(result["message"])
notify_admin(result)
return None
return result["data"]
except requests.exceptions.Timeout:
log_error("Request timed out")
# Retry logic here
except requests.exceptions.RequestException as e:
log_error(f"Request failed: {e}")
# Handle network errors
2. Retry Logic
Implement exponential backoff:
import time
def publish_with_retry(data, max_retries=3):
for attempt in range(max_retries):
try:
response = requests.post(API_URL, headers=headers, json=data)
result = response.json()
if result.get("success"):
return result
if result.get("error") == "RateLimitExceeded":
wait_time = result.get("retry_after", 60)
time.sleep(wait_time)
continue
except Exception as e:
if attempt == max_retries - 1:
raise
time.sleep(2 ** attempt) # Exponential backoff
return None
3. Logging
Log all API interactions:
import logging
logger = logging.getLogger(__name__)
logger.info(f"Publishing to {platform}: {account_id}")
response = requests.post(API_URL, headers=headers, json=data)
logger.info(f"Response: {response.status_code} - {response.text}")
4. Security
- Never log API keys
- Use environment variables for sensitive data
- Rotate keys regularly
- Implement IP allowlisting on your server
- Use HTTPS only
5. Performance
- Compress images before uploading
- Use CDN for media hosting
- Batch requests when possible
- Cache account IDs locally
- Monitor response times
Support
Need help?
- Documentation: boring-doc.aiagent-me.com
- Dashboard: boring.aiagent-me.com
- Issues: Create an issue or contact support
Next Steps
- Publishing API - Learn the publishing endpoint
- Errors - Error codes and troubleshooting
- Examples - See code examples