API Documentation
Build custom integrations with the BlackOps Center REST API. Access your content library, voice profiles, and AI generation features programmatically.
Authentication
The API uses token-based authentication for extension endpoints. Include your API token in the Authorization header of each request.
Base URL
Content Library API
/ext/content-librarySave content to your Content Library. Supports articles, tweets, links, and blog posts.
Request Body
{
"url": "https://example.com/article",
"title": "Article Title",
"content_type": "article",
"excerpt": "Brief description...",
"author": "Author Name",
"tags": ["tag1", "tag2"],
"notes": "Personal notes about this content"
}Response
{
"success": true,
"id": "uuid-of-saved-content",
"message": "Content saved successfully"
}/ext/content-libraryRetrieve saved content from your library with optional filtering.
Query Parameters
| content_type | Filter by type: article, tweet, link, blog_post |
| tag | Filter by tag |
| search | Full-text search query |
| limit | Number of results (default: 50) |
Twitter API
/ext/twitter/compose-tweetGenerate a tweet using your voice profile. Returns AI-generated content matching your style.
Request Body
{
"topic": "Content topic or idea",
"context": "Additional context or requirements",
"tone": "optional tone override"
}/ext/twitter/generate-replyGenerate a contextual reply to a tweet. Uses your voice profile and considers the original tweet's content.
Request Body
{
"tweet_text": "Text of the tweet to reply to",
"tweet_author": "Author's username",
"intent": "agree, challenge, add_value, ask_question"
}Voice Profile API
/admin/ai-content/voice-profileRetrieve your voice profile data including tone scores, style features, and AI analysis. Requires session authentication (admin endpoints).
Response
{
"voiceProfile": {
"total_activities": 150,
"aggregated_tone": {
"casual": 0.7,
"professional": 0.6,
"humorous": 0.4
},
"aggregated_style": {
"avg_tweet_length": 180,
"uses_emojis": true,
"emoji_frequency": 0.3
},
"ai_analysis": {
"communication_style": "...",
"topics": ["tech", "productivity"],
"style_traits": ["concise", "direct"]
}
}
}Error Handling
The API returns standard HTTP status codes and JSON error responses:
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing token |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Resource doesn't exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Server Error - Something went wrong |
Rate Limits
API requests are rate limited to ensure fair usage:
- •Extension API: 100 requests per minute
- •Content Generation: 10 requests per minute
- •Bulk Operations: 5 requests per minute
Rate limit headers are included in all responses: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
Example: Save Content from Node.js
const response = await fetch('https://blackopscenter.com/api/ext/content-library', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://example.com/great-article',
title: 'Great Article Title',
content_type: 'article',
tags: ['inspiration', 'content-ideas']
})
});
const result = await response.json();
console.log(result);