Examples

Copy and adapt these examples to call the Weekly Promo API from your backend or scripts.

cURL

curl -X POST https://app.cliploop.site/api/public/weekly-promo \ -H "Authorization: Bearer $CLIPLOOP_API_KEY" \ -H "Idempotency-Key: $IDEMPOTENCY_KEY" \ -H "Content-Type: application/json" \ -d '{ "appName": "ClipLoop", "appWebsiteUrl": "https://cliploop.site", "weeklyUpdate": "ClipLoop now has a public API for weekly promo generation.", "targetAudience": "indie app builders and SaaS founders", "callToAction": "Try ClipLoop", "channel": "x", "tone": "clear, sharp, builder focused" }'

JavaScript (fetch)

const response = await fetch("https://app.cliploop.site/api/public/weekly-promo", { method: "POST", headers: { Authorization: `Bearer ${process.env.CLIPLOOP_API_KEY}`, "Idempotency-Key": `promo-${Date.now()}`, "Content-Type": "application/json" }, body: JSON.stringify({ appName: "ClipLoop", appWebsiteUrl: "https://cliploop.site", weeklyUpdate: "ClipLoop now has a public API for weekly promo generation.", targetAudience: "indie app builders and SaaS founders", callToAction: "Try ClipLoop", channel: "x", tone: "clear, sharp, builder focused" }) }); const data = await response.json(); if (!response.ok) throw new Error(data.error?.message || `HTTP ${response.status}`);

Node.js

const response = await fetch("https://app.cliploop.site/api/public/weekly-promo", { method: "POST", headers: { Authorization: `Bearer ${process.env.CLIPLOOP_API_KEY}`, "Idempotency-Key": `promo-${Date.now()}`, "Content-Type": "application/json" }, body: JSON.stringify({ appName: "ClipLoop", appWebsiteUrl: "https://cliploop.site", weeklyUpdate: "ClipLoop now has a public API for weekly promo generation.", targetAudience: "indie app builders and SaaS founders", callToAction: "Try ClipLoop", channel: "x", tone: "clear, sharp, builder focused" }) }); const data = await response.json(); if (!response.ok) throw new Error(data.error?.message || `HTTP ${response.status}`);

Environment variables

CLIPLOOP_API_KEY=clp_li... IDEMPOTENCY_KEY=promo-2026-05-30-cliploop
⚠️ Never commit real API keys to source control. Store them in environment variables or a secrets manager.