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.
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
| Tier | Limit | Window |
|---|---|---|
| General API | 100 requests | 10 seconds |
| AI Generation | 5 requests | 1 minute |
| Strict (sensitive ops) | 5 requests | 1 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
| Name | Type | Required | Description |
|---|---|---|---|
| strategyId | string | Required | UUID of the strategy to base content on |
| platform | string | Optional | Target platform: linkedin, twitter, facebook, instagram, tiktok, pinterest, bluesky, email |
| contentType | string | Optional | Content type: social_post, blog, email, ad |
| count | number | Optional | Number of pieces to generate (1-10, default: 3) |
| tone | string | Optional | Override brand voice tone |
| additionalContext | string | Optional | Extra context for the AI generator |
Example Request
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
{ "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
| Name | Type | Required | Description |
|---|---|---|---|
| content | string | Required | Raw text or HTML content to score |
Example Request
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
{ "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
| Name | Type | Required | Description |
|---|---|---|---|
| query | string | Optional | Search against email, name, or company |
| status | string | Optional | Filter by status: new, contacted, qualified, converted, lost |
| limit | number | Optional | Results limit (1-100, default: 20) |
Example Request
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
{ "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
| Name | Type | Required | Description |
|---|---|---|---|
| pipelineId | string | Optional | UUID of specific pipeline (returns all if omitted) |
| status | string | Optional | Filter: pending, running, completed, failed, cancelled |
| limit | number | Optional | Results limit (1-50, default: 10) |
Example Request
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
{ "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
| Name | Type | Required | Description |
|---|---|---|---|
| pipelineId | string | Required | UUID of the pipeline to execute |
Example Request
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
{ "runId": "...", "status": "pending", "message": "Pipeline execution started" }Error Codes
| Code | Name | Description |
|---|---|---|
| 401 | Unauthorized | Missing or invalid API key. Check your Authorization header. |
| 403 | Forbidden | Your plan does not include API access. Upgrade to Business or above. |
| 429 | Too Many Requests | Rate limit exceeded. Wait and retry. Check the Retry-After header. |
| 500 | Internal Server Error | Something went wrong on our end. Retry with exponential backoff. |
Code Examples
JavaScript (fetch)
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)
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
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