API Documentation

Everything you need to integrate the Repurpose API.

Getting Started

1. Get your API key by signing up:

curl -X POST https://your-app.vercel.app/api/auth/signup \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com"}'

This returns your API key. Store it securely — it won't be shown again.

2. Make your first request:

curl -X POST https://your-app.vercel.app/api/v1/repurpose \
  -H "Content-Type: application/json" \
  -H "x-api-key: rp_live_your_key_here" \
  -d '{
    "content": "Your blog post or article text here...",
    "platforms": ["twitter", "linkedin"],
    "tone": "professional"
  }'

Authentication

Include your API key in the x-api-key header with every request.

HeaderValueRequired
x-api-keyYour API key (rp_live_...)Yes
Content-Typeapplication/jsonYes

POST /api/v1/repurpose

Transform content into platform-specific posts.

Request Body

FieldTypeRequiredDescription
contentstring*The source content to repurpose (10-50,000 chars)
source_urlstring*URL to extract content from (alternative to content)
platformsstring[]YesArray of: twitter, linkedin, reddit, email, instagram
tonestringNoprofessional, casual, witty, authoritative, friendly (default: professional)
languagestringNoISO language code (default: en)
hashtagsbooleanNoInclude hashtags in output (default: true)
threadbooleanNoGenerate Twitter thread instead of single tweet (default: false)

* Either content or source_url must be provided.

Response

{
  "success": true,
  "data": {
    "twitter": "string | string[]",
    "linkedin": "string",
    "reddit": { "title": "string", "body": "string" },
    "email": { "subject": "string", "preview_text": "string", "body": "string" },
    "instagram": "string"
  },
  "meta": {
    "platforms": ["twitter", "linkedin"],
    "tone": "professional",
    "tokens_used": 847,
    "latency_ms": 1203,
    "requests_remaining": 99
  }
}

Error Codes

StatusCodeDescription
400BAD_REQUESTInvalid JSON body
400VALIDATION_ERRORRequest body validation failed
401UNAUTHORIZEDMissing or invalid API key
403PLAN_RESTRICTEDPlatform not available on your plan
422URL_FETCH_ERRORFailed to fetch content from source URL
429RATE_LIMITEDMonthly request limit exceeded
500INTERNAL_ERRORServer error

Rate Limits

Rate limits are tracked via response headers:

HeaderDescription
X-RateLimit-LimitYour monthly request limit
X-RateLimit-RemainingRequests remaining this month
PlanRequests/moPlatformsPrice
Free100Twitter, LinkedIn, Reddit$0
Starter1,000All platforms$29/mo
Pro5,000All + bulk$79/mo
Scale25,000All + webhooks$199/mo