API Reference

Integrate MarketChamp into your tools and workflows. Generate content, score quality, manage leads, and run campaigns programmatically.

Authentication

All API requests require a Bearer token in the Authorization header. Get your API key from Dashboard → Settings → API Access.

Header format
Authorization: Bearer mc_your_api_key_here

API access is available on Business, Agency, and Enterprise plans.

Base URL

https://marketchamp.ai/api/mcp/server

Tool discovery: GET https://marketchamp.ai/api/mcp/server — returns a list of available tools.

Rate Limits

TierLimitWindow
General API100 requests10 seconds
AI Generation5 requests1 minute
Strict (sensitive ops)5 requests1 minute

When rate limited, you'll receive a 429 response. Check the Retry-After header for wait time.

generateContent

Generate marketing content (social posts, blogs, emails, ads) based on a strategy.

Endpoint

POST https://marketchamp.ai/api/mcp/server/tools/generateContent

Parameters

NameTypeRequiredDescription
strategyIdstringRequiredUUID of the strategy to base content on
platformstringOptionalTarget platform: linkedin, twitter, facebook, instagram, tiktok, pinterest, bluesky, email
contentTypestringOptionalContent type: social_post, blog, email, ad
countnumberOptionalNumber of pieces to generate (1-10, default: 3)
tonestringOptionalOverride brand voice tone
additionalContextstringOptionalExtra context for the AI generator

Example Request

curl
curl -X POST https://marketchamp.ai/api/mcp/server/tools/generateContent \
  -H "Authorization: Bearer mc_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"strategyId":"abc-123-def","platform":"linkedin","count":3}'

Example Response

JSON
{ "results": [{ "content": "...", "platform": "linkedin", "type": "social_post" }] }

scoreContent

Analyze content quality and return readability, engagement score, and actionable issues.

Endpoint

POST https://marketchamp.ai/api/mcp/server/tools/scoreContent

Parameters

NameTypeRequiredDescription
contentstringRequiredRaw text or HTML content to score

Example Request

curl
curl -X POST https://marketchamp.ai/api/mcp/server/tools/scoreContent \
  -H "Authorization: Bearer mc_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"content":"Your marketing copy text here..."}'

Example Response

JSON
{ "score": 82, "readability": "good", "issues": [{ "type": "passive_voice", "severity": "low" }] }

searchLeads

Search leads by email, name, company, status, or tag.

Endpoint

POST https://marketchamp.ai/api/mcp/server/tools/searchLeads

Parameters

NameTypeRequiredDescription
querystringOptionalSearch against email, name, or company
statusstringOptionalFilter by status: new, contacted, qualified, converted, lost
limitnumberOptionalResults limit (1-100, default: 20)

Example Request

curl
curl -X POST https://marketchamp.ai/api/mcp/server/tools/searchLeads \
  -H "Authorization: Bearer mc_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"query":"acme","status":"qualified","limit":10}'

Example Response

JSON
{ "leads": [{ "id": "...", "email": "...", "company": "Acme Corp", "score": 85 }] }

getCampaignStatus

Get status of automation pipeline runs with step-level results.

Endpoint

POST https://marketchamp.ai/api/mcp/server/tools/getCampaignStatus

Parameters

NameTypeRequiredDescription
pipelineIdstringOptionalUUID of specific pipeline (returns all if omitted)
statusstringOptionalFilter: pending, running, completed, failed, cancelled
limitnumberOptionalResults limit (1-50, default: 10)

Example Request

curl
curl -X POST https://marketchamp.ai/api/mcp/server/tools/getCampaignStatus \
  -H "Authorization: Bearer mc_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"status":"completed","limit":5}'

Example Response

JSON
{ "runs": [{ "id": "...", "pipelineId": "...", "status": "completed", "steps": [...] }] }

runPipeline

Trigger execution of an automation pipeline by ID.

Endpoint

POST https://marketchamp.ai/api/mcp/server/tools/runPipeline

Parameters

NameTypeRequiredDescription
pipelineIdstringRequiredUUID of the pipeline to execute

Example Request

curl
curl -X POST https://marketchamp.ai/api/mcp/server/tools/runPipeline \
  -H "Authorization: Bearer mc_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"pipelineId":"pipeline-uuid-here"}'

Example Response

JSON
{ "runId": "...", "status": "pending", "message": "Pipeline execution started" }

Error Codes

CodeNameDescription
401UnauthorizedMissing or invalid API key. Check your Authorization header.
403ForbiddenYour plan does not include API access. Upgrade to Business or above.
429Too Many RequestsRate limit exceeded. Wait and retry. Check the Retry-After header.
500Internal Server ErrorSomething went wrong on our end. Retry with exponential backoff.

Code Examples

JavaScript (fetch)

JavaScript
const response = await fetch('https://marketchamp.ai/api/mcp/server/tools/generateContent', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer mc_your_api_key',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    strategyId: 'your-strategy-id',
    platform: 'linkedin',
    count: 3,
  }),
});

const data = await response.json();
console.log(data.results);

Python (requests)

Python
import requests

response = requests.post(
    'https://marketchamp.ai/api/mcp/server/tools/generateContent',
    headers={
        'Authorization': 'Bearer mc_your_api_key',
        'Content-Type': 'application/json',
    },
    json={
        'strategyId': 'your-strategy-id',
        'platform': 'linkedin',
        'count': 3,
    },
)

data = response.json()
print(data['results'])

curl

Shell
curl -X POST https://marketchamp.ai/api/mcp/server/tools/generateContent \
  -H "Authorization: Bearer mc_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"strategyId": "your-strategy-id", "platform": "linkedin", "count": 3}'

Webhooks

MarketChamp supports webhooks for real-time event notifications:

  • Video Render — notified when a video render completes or fails (configured per project)
  • Stripe Billing — payment events (subscription changes, failed payments)
  • Print Orders — order status updates from print providers

Webhook URLs are configured in your dashboard settings. All webhooks include HMAC signature verification.

Need help? Contact support@marketchamp.ai