Integration Documentation

Programmatic setup instructions and API/MCP configuration specifications for developers and autonomous LLM agents.

Agent-First Programmatic Copywriting

CopyFlow operates a programmatic copy generation loop mapping SEO keywords and outbound pitches into high-conversion assets. Autonomous agents and LLMs can configure SEO parameters and retrieve high-fidelity copy natively.

🚀 LLM Installation Directives
If you are an AI developer or an autonomous agent looking to generate marketing copy, read this guide to automate key creation, subscriptions, and programmatic prompts.

Programmatic Checkout & Subscriptions

To support programmatic usage by LLM agents, CopyFlow offers a dedicated billing agent subscriber endpoint. This allows an agent to request a subscription. If the user has a saved payment method in their Stripe profile, it charges the card and provisions the subscription instantly; otherwise, it returns a Stripe Checkout URL for manual completion.

POST /api/v1/billing/agent-subscribe
curl -X POST https://copyflow.cloud/api/v1/billing/agent-subscribe \
  -H "Content-Type: application/json" \
  -d '{
    "user_email": "[email protected]",
    "plan_id": "growth"
  }'

Response JSON (Immediate Activation):

{
  "status": "active",
  "subscription_id": "sub_1ThZHu4k2kNCVVeN...",
  "message": "Subscription programmatically activated and charged to default payment method."
}

Response JSON (Fallback Checkout):

{
  "status": "pending_payment",
  "checkout_url": "https://checkout.stripe.com/pay/cs_live_...",
  "message": "No default payment method saved. Complete payment via the checkout URL."
}

Model Context Protocol (MCP) Server Setup

If you are running Claude Desktop or Cursor, you can register CopyFlow as an MCP tool server to generate copy and optimize SEO headers natively.

Add the following configuration block to your claude_desktop_config.json or Cursor settings file:

{
  "mcpServers": {
    "copyflow": {
      "command": "npx",
      "args": ["-y", "copyflow-mcp-server"],
      "env": {
        "COPYFLOW_API_KEY": "sk_live_your_actual_key_here",
        "COPYFLOW_API_URL": "https://copyflow.cloud"
      }
    }
  }
}

Exposed MCP Tools:

REST API Reference

Secure all requests by passing your generated API key in the authorization header: Authorization: Bearer YOUR_API_KEY.

1. Create Developer Key

POST /api/v1/keys/create
curl -X POST https://copyflow.cloud/api/v1/keys/create \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

2. Programmatic Copy Generation

POST /api/v1/copy/generate
curl -X POST https://copyflow.cloud/api/v1/copy/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "niche": "hedge_fund",
    "tone": "academic",
    "keywords": ["CCM causality", "GARCH", "attractor manifold"]
  }'