Back to API Reference

AI Layer - Claude Coop API

Unlike platforms that treat AI as UI-only features (chat windows, help buttons), Data Publisher exposes AI capabilities as API endpoints — invokable at any point in any workflow.

Overview

The AI Layer (/claude-coop) sits orthogonally across all three core layers (Data, Document Engine, Distribution). It provides natural language analysis and suggestions that are contextually aware of the platform's capabilities and data structures.

Available Endpoints

POST /api/claude-coop/analyze

Accepts campaign analytics payloads and returns natural language interpretation of open rates, click patterns, and engagement trends.

Use Cases

POST /api/claude-coop/suggest

Accepts template HTML content and returns actionable recommendations contextually aware of platform variable syntax and email client compatibility.

Use Cases

Integration Opportunities

Campaign Analysis

Post campaign analytics to the AI layer for natural language interpretation:

// Get campaign analytics
const analytics = await fetch('/api/email-campaigns/123/analytics');

// Send to AI for analysis
const analysis = await fetch('/api/claude-coop/analyze', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${token}` },
  body: JSON.stringify(analytics)
});

// Display human-readable insights
console.log(analysis.insights);

Template Improvement Assistant

Get AI-powered suggestions for template optimization:

// Get template content
const template = await fetch('/api/email-templates/456');

// Request AI suggestions
const suggestions = await fetch('/api/claude-coop/suggest', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${token}` },
  body: JSON.stringify({ 
    content: template.htmlContent,
    context: 'email-template'
  })
});

// Display recommendations
console.log(suggestions.recommendations);

Intake Assistants

Convert client descriptions into structured template outlines:

Benefits

Intelligence Native to Document Automation

The AI layer understands:

API-First Design

Unlike bolt-on AI features, the AI layer is:

Authentication

AI endpoints require JWT Bearer token authentication. See Authentication Documentation for details.

Rate Limiting

AI endpoints are subject to the general API rate limit of 1000 requests per 15 minutes.

Note: The AI layer is designed for integration, not real-time conversation. Responses focus on actionable insights and specific recommendations rather than open-ended dialogue.

Next Steps