API & MCP Reference
Every action in ContentIQ is available to an agent or a script. There are two ways in, both over the same 102-tool catalog and the same API key: MCP for AI clients that speak it, and a single REST endpoint for everything else.
Base URL
https://contentiq.media/api
Everything below lives under this host. Use these URLs rather than any backend address you may have seen previously - the routes here are stable, and what they point at can change without breaking your integration.
Endpoints
| Method | Path | Auth | What it does |
|---|---|---|---|
GET | /api/mcp | None | Server manifest: protocol version, transport, and the number of tools exposed. No key needed, so a client can discover the server before authenticating. |
POST | /api/mcp | API key | MCP JSON-RPC. initialize and ping answer unauthenticated; tools/list and tools/call require a team API key. |
GET | /api/agent | None | Lists every tool with its name, description, and JSON Schema for parameters. |
POST | /api/agent | API key | Calls one tool. Body is {"tool": "<name>", "params": { ... }}. Requires a team API key. |
That is the entire public surface. Any other path under /api/ is refused at the edge.
Authentication
Both endpoints take a team API key. Generate one from Team → API Keys (owners and admins only). Keys use the ciq_ prefix and carry the permissions of the team they belong to.
Authorization: Bearer ciq_your_api_key_here
MCP (Model Context Protocol)
The MCP server exposes all 102 tools to any MCP client - Claude, Claude Code, Cursor, or your own. It speaks JSON-RPC 2.0 over Streamable HTTP at protocol version 2025-06-18. It is a transport over the same catalog the REST endpoint uses, not a separate, smaller tool set.
Connect a client
Most clients take a URL and a header. In Claude Code, add it with:
claude mcp add --transport http contentiq https://contentiq.media/api/mcp \ --header "Authorization: Bearer ciq_your_key_here"
Or, for a client that reads a JSON config:
{
"mcpServers": {
"contentiq": {
"type": "http",
"url": "https://contentiq.media/api/mcp",
"headers": {
"Authorization": "Bearer ciq_your_key_here"
}
}
}
}Methods
| Method | Auth | Notes |
|---|---|---|
initialize | No | Returns protocol version, server info, and capabilities. Answers before authentication so a client can complete the handshake and report a clear error later if the key is wrong. |
ping | No | Liveness check. Returns an empty result. |
notifications/* | No | Accepted and acknowledged with 202 and no body, per the spec. |
tools/list | Yes | All 102 tools with name, description, and inputSchema. |
tools/call | Yes | Runs one tool. A tool that fails returns a normal result with isError: true rather than a transport error, so the model can read what went wrong and recover. |
Handshake by hand
curl -X POST https://contentiq.media/api/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": { "protocolVersion": "2025-06-18" }
}'Call a tool
curl -X POST https://contentiq.media/api/mcp \
-H "Authorization: Bearer ciq_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "get_workspace_stats",
"arguments": {}
}
}'JSON-RPC error codes
| Code | Meaning |
|---|---|
-32700 | Parse error - the body was not valid JSON |
-32600 | Invalid request - includes a missing or malformed Authorization header |
-32601 | Method not found, or the named tool does not exist |
-32603 | Internal error |
Rate limit
Up to 200 tool calls per hour per user (every key one person created shares the allowance), on a rolling window. initialize, ping, and tools/list do not count against it.
n8n
There is a first-party n8n community node, so you do not have to build HTTP requests by hand. Install n8n-nodes-contentiq from Settings → Community Nodes in n8n, or npm install n8n-nodes-contentiq on a self-hosted instance.
It ships an action node covering analytics, library, hooks, scripts, Clone Studio and jobs, a polling trigger, and a Custom operation that reaches any of the 102 tools your key allows. Three of its nodes need no ContentIQ account at all.
REST API
One endpoint, one tool per call. Use this for Zapier, Make, or anything that speaks plain HTTP. If you are on n8n, use the community node above instead — it has a far higher rate limit.
POST https://contentiq.media/api/agent
Request
{
"tool": "tool_name",
"params": {
// tool-specific parameters
}
}Response
// Success
{
"success": true,
"result": { /* tool-specific response */ }
}
// Error
{
"error": "Error message describing what went wrong"
}Discover the tools
A GET on the same URL returns every tool with its description and parameter schema, so you do not have to hardcode a list.
curl https://contentiq.media/api/agent
Rate limit
Each API key is limited to 30 requests per hour. Exceeding this returns 429. The window is rolling. Note this is lower than the MCP limit; if you are driving a high volume of calls, use MCP.
Examples
Queue a URL for analysis
{
"tool": "queue_content_analysis",
"params": {
"url": "https://www.tiktok.com/@user/video/123456"
}
}Search analyzed content
{
"tool": "search_library",
"params": {
"query": "morning routine",
"platform": "tiktok"
}
}Generate a script from patterns
{
"tool": "generate_script",
"params": {
"content_ids": [
"uuid-1",
"uuid-2"
],
"content_type": "educational"
}
}Get workspace overview
{
"tool": "get_workspace_stats",
"params": {}
}Find outlier content
{
"tool": "discover_outliers",
"params": {
"hashtag": "productivity",
"platform": "tiktok"
}
}Set the post for a destination (then publish_now with a publish-scoped key)
{
"tool": "publish_set_post",
"params": {
"queue_id": "uuid",
"destinations": [
{
"destination_id": "yt:uuid",
"title": "Why your CRM is lying to you",
"tags": [
"crm",
"sales"
],
"target": {
"privacyStatus": "unlisted"
}
}
],
"thumbnail_url": "https://example.com/thumb.jpg"
}
}GET https://contentiq.media/api/agent or MCP tools/list for the full, always-current catalog, or see the AI Agent page for what each one does.cURL
curl -X POST https://contentiq.media/api/agent \
-H "Authorization: Bearer ciq_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"tool": "queue_content_analysis",
"params": { "url": "https://www.tiktok.com/@user/video/123" }
}'JavaScript
const response = await fetch("https://contentiq.media/api/agent", {
method: "POST",
headers: {
"Authorization": "Bearer ciq_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
tool: "search_library",
params: { query: "productivity tips" },
}),
});
const data = await response.json();
console.log(data.result);HTTP status codes
These apply to the REST endpoint. MCP returns 200 with a JSON-RPC error object instead, per the spec.
| Status | Meaning |
|---|---|
400 | Missing or invalid tool / params |
401 | Missing, invalid, or expired API key |
404 | Unknown path under /api/ |
429 | Rate limit exceeded (30/hour) |
500 | Internal server error during tool execution |