API

Federated Services Platform

Powerful REST and GraphQL APIs for QR codes, geolocation, analytics, and multi-tenant management across the CMYK ecosystem.

🚀 Production Ready • Version 1.0

Choose Your API Adventure

🔗

REST API

Traditional RESTful endpoints with OpenAPI 3.0 documentation. Perfect for standard HTTP integrations and familiar development workflows.

curl -X POST /api/v1/qrcodes/comma/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "url": "https://comma.cm/product",
    "brand_colors": ["#E91E63", "#00BCD4"],
    "style": "rounded"
  }'

GraphQL API

Flexible query language for efficient data fetching. Request exactly what you need with powerful introspection and real-time subscriptions.

query FederatedClients {
  clients {
    code
    name
    isActive
    qrCodes {
      total
      generated24h
    }
    analytics {
      monthlyQueries
      trafficWeight
    }
  }
}

Specialized API Services

📊

Analytics API

Actionable Analytics platform and personalization services. Transform data into insights with real-time tracking, user segmentation, and behavior-driven personalization across all federated clients.

POST /api/v1/analytics/personalize/
{
  "user_id": "user_abc123",
  "segment": "premium_reader",
  "context": {
    "location": "San Francisco, CA",
    "device": "mobile",
    "interests": ["tech", "business", "culture"]
  },
  "personalize": {
    "content_recommendations": true,
    "dynamic_pricing": true,
    "targeted_campaigns": true
  },
  "action": "optimize_experience"
}
🔑

KEY Services

Revenue operations and circulation across the ecosystem. The flagship KEY platform powers subscriptions, billing, and distribution for MAGENTA Marketing, CYAN Analytics, and YELO Content.

// KEY Circulation & Revenue API
POST /api/v1/circulation/key/
{
  "publication": "BlackLensNews",
  "subscriber": {
    "email": "reader@blacklensnews.com",
    "tier": "premium",
    "region": "US-CA"
  },
  "transaction": {
    "type": "subscription",
    "amount": 9.99,
    "currency": "USD",
    "billing_cycle": "monthly"
  },
  "analytics": {
    "source": "organic",
    "campaign": "key-is-the-new-black"
  }
}

Quick Start Dev Guide

🔑 Authentication

All API endpoints require authentication. Get your API token from the admin dashboard.

Authorization: Bearer YOUR_API_TOKEN

📡 Rate Limits

API rate limits vary by client tier and endpoint. Check response headers for current limits.

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200

🎨 P3 Color Support

QR code APIs support P3 wide color gamut for enhanced branding on modern displays.

"brand_colors": [
  "color(display-p3 0.95 0.1 0.4)",
  "color(display-p3 0 0.9 0.9)"
]

🔍 Error Handling

APIs return consistent error responses with detailed error codes and messages.

{
  "error": "INVALID_COLOR_FORMAT",
  "message": "Color must be valid hex or P3",
  "code": 400
}

⚡ GraphQL + REST

Choose your API style: REST for simplicity or GraphQL for flexibility. Both fully supported.

// REST
GET /api/v1/qrcodes/

// GraphQL
query { qrCodes { id url } }

🚀 Developer Experience

Interactive docs, SDK generation, webhook debugging, and real-time API metrics.

// Auto-generated TypeScript SDK
import { MagentaAPI } from '@magenta/sdk';

const api = new MagentaAPI(token);
await api.qrCodes.create({...});

🎬 YELO Video Streaming

Enterprise-grade video platform with 4K HDR streaming, adaptive bitrate, AI-powered transcoding, and real-time analytics.

// YELO Video API
POST /api/v1/video/yelo/stream
{
  "content_id": "blacklens_episode_42",
  "quality": "4K_HDR",
  "features": {
    "adaptive_bitrate": true,
    "ai_transcoding": true,
    "multi_cdn": true,
    "live_captions": true
  },
  "analytics": ["engagement", "heatmap"]
}

🎭 Workflow Orchestration

Build complex automations with swimlanes, gates, and webhooks. Chain API calls with conditional logic.

// Workflow API
POST /api/v1/workflows/execute
{
  "swimlane": "marketing",
  "gates": ["approval", "budget"],
  "webhooks": ["slack", "email"],
  "chain": ["qr.create", "analytics.track"]
}

Start Building

Join the federated ecosystem and leverage powerful APIs across the CMYK platform.

© 2025 Comma • TermsPrivacyData Policy Powered by Comma ⚡️