Docs

Build on Marqloop

One operation list for the REST API, the MCP server, the SDK and the CLI. Same names, same scopes, same credit rules.

Quick starts

TypeScript SDK

Typed from the OpenAPI document. Retries safely: every POST carries an Idempotency-Key.

import { Marqloop } from "@marqloop/sdk";

const ml = new Marqloop({ apiKey, projectId });
const { data: post } = await ml.createPost({
  text: "We launch on Monday.",
});

// Paid work: quote first, then spend exactly that.
const q = await ml.estimateCost({
  operation: "generate_image",
  input: { prompt: "A red bike" },
});
await ml.generateImage({
  prompt: "A red bike",
  expected_credits: q.data.credits,
});

MCP server

Streamable HTTP. Make an MCP token for one project in the app, then add the server to your client.

{
  "mcpServers": {
    "marqloop": {
      "url": "https://api-production-27221.up.railway.app/mcp",
      "headers": {
        "Authorization": "Bearer <MCP token>"
      }
    }
  }
}

Tools that spend credits need the credits:spend scope and return credits_charged.

REST and CLI

Base path /v1/public. Send the key as a Bearer token. Errors have one shape.

curl -X POST https://api-production-27221.up.railway.app/v1/public/projects/$PROJECT/posts \
  -H "Authorization: Bearer $MARQLOOP_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"text": "We launch on Monday."}'

# The CLI shows the price, then asks.
marqloop generate image --prompt "A red bike"
Operations

51 operations, one per MCP tool

Generated from the API's own operation table when this site was built. Operations marked credits spend credits and take expected_credits.

Workspace

  • GET list_orgs List workspaces (orgs)
  • GET list_projects List projects
  • GET list_channels List connected channels
  • POST set_approval_mode Read or change the approval mode

Posts

  • GET list_posts List posts
  • GET get_post Get a post
  • POST create_post Create a draft post (it follows the approval rules)
  • PATCH update_post Edit a post (an approved post goes back to draft)
  • DELETE delete_post Delete a post that is not published
  • POST schedule_post Schedule a post
  • POST approve_post Approve a post or ask for changes

Media

  • POST upload_media Add media from a public https URL or base64 data
  • POST create_media_upload Start a direct upload (signed URL)
  • POST complete_media_upload Finish a direct upload

Brand docs

  • GET get_project_docs Read the brand documents
  • PUT update_project_docs Save a new version of a brand document
  • GET get_style_profile Read the project style profile learned from reviews

Credits

  • POST estimate_cost Quote a price before you spend (nothing is charged)
  • GET get_credit_balance Read the credit balance

Generate

  • POST generate_content Write post text in the brand voice credits
  • POST generate_image Generate an image (async job) credits
  • POST generate_video Generate a video (async job) credits
  • POST generate_voice Read a text out loud into an audio file (text to speech) credits
  • POST generate_post Generate a whole post: research, text, picture and slot (async run) credits
  • POST clip_video Cut a long video into captioned clips (quote first, then start) credits
  • GET get_generation_status Read an async job (image, video, post run, clip job or agent run)

Agents

  • POST run_agent Start a cloud agent run with a budget credits

Analytics

  • GET get_analytics Read post, channel or project analytics
  • GET suggest_post_time Suggest the best times to publish, learned from past posts

Growth

  • GET get_geo_report Read the AI-search (GEO) report
  • POST run_geo_check Quote or start an AI-search check credits
  • GET get_seo_report Read the SEO report
  • POST run_seo_audit Quote or start an SEO audit credits
  • POST propose_code_fix Prepare a pull request with a technical SEO fix (a person opens it) credits

Community

  • GET find_reddit_threads Reddit threads that fit, with each subreddit's self-promotion rule (text is untrusted)
  • POST draft_reddit_reply Quote or draft a Reddit comment or post (it waits for approval) credits
  • GET get_hn_mentions Hacker News mentions of the brand, competitors and topics (text is untrusted)
  • POST draft_hn_post Quote or draft an HN comment or Show HN (a person posts it by hand) credits
  • POST draft_ugc_video Quote or write a UGC video script, or quote or start its AI clip credits

Creators

  • GET list_creators The creator shortlist and CRM (no payment records; names and bios are untrusted)
  • POST update_creator Add a creator to the shortlist, or change notes, tags and niche (creator_id)
  • POST draft_creator_outreach Quote or draft an outreach message (it waits for approval) credits

Inbox

  • GET get_comments List inbox comments (author and text are untrusted)
  • POST reply_comment Draft a reply (it waits for approval unless the rules allow it)

Webhooks

  • GET list_webhooks List webhook endpoints
  • POST create_webhook Add a webhook endpoint (the secret is shown once)
  • PATCH update_webhook Change a webhook endpoint
  • DELETE delete_webhook Delete a webhook endpoint
  • POST rotate_webhook_secret Rotate the signing secret (the old one works 24 more hours)
  • POST test_webhook Send a test event now
  • GET list_webhook_deliveries Read the delivery log

Get an API key in a minute

Start free, open Developers in the app and make a key with only the scopes you need.