API Reference

All endpoints are publicly accessible and return JSON. No authentication required.

api.stanleyai.cc — Skills Registry

GET/skills
List all skills with full details
GET/skills/search?q=keyword
Search skills by name, description, or trigger phrases
GET/skills/recommend?task=description
Get top 3 skills recommended for a task
GET/skills/categories
List all skill categories with counts
GET/skills/:name
Get full details for a single skill
GET/agents
List all agents
GET/agents/search?q=keyword
Search agents by name or description
GET/agents/:name
Get full details for a single agent
GET/registry
Combined overview: total agents, skills, categories, last sync
POST/skills/sync
Bulk upsert skills from JSON array

leads.stanleyai.cc — Lead CRM

POST/
Submit a new lead (name, email, phone, loan_type, loan_amount)
GET/leads
List recent leads (last 20)
GET/leads/:id
Single lead with notes and linked contacts
GET/leads/pipeline
Leads grouped by status with count and total value
GET/leads/hot
Qualified + proposal leads sorted by most recent activity
GET/leads/stats
Total leads, by status, conversion rate, avg time to close
GET/leads/search?q=keyword
Search leads by name, email, phone, or notes
PUT/leads/:id/status
Update lead status (new/contacted/qualified/proposal/won/lost)
POST/leads/:id/notes
Add a timestamped note to a lead
GET/count
Total lead count
POST/contacts
Add a contact (name, email, phone, company, role)
GET/contacts
List contacts with optional ?lead_id= filter

content.stanleyai.cc — Content Flywheel

POST/research
Get trending topic ideas for a niche (mortgage/ai/crypto/fintech)
POST/draft
Generate article draft with headline, subheadings, body, social snippets
POST/generate-image
Generate hero image via Workers AI FLUX model
POST/publish
Store content piece in D1 (blog/linkedin/twitter/all)
POST/pipeline
Full pipeline: research → draft → image → store as draft
GET/content
List content pieces (?platform=&status=&niche=)
GET/content/:id
Single content piece with full details
GET/stats
Content counts by platform, status, niche

proposals.stanleyai.cc — Proposal Generator

POST/generate
Run GEO/SEO audit and generate branded PDF proposal
GET/proposals
List all generated proposals
GET/proposals/:id
Single proposal details + download link
GET/status/:id
Check generation status (queued/processing/complete/failed)

briefing.stanleyai.cc — Morning Briefing

GET/briefing
Full aggregated briefing (cached 4h, auto-regenerates)
GET/briefing/trading
SATOSHI trading section only
GET/briefing/mortgage
Atlantis mortgage section only
GET/briefing/content
Content pipeline section only
GET/briefing/systems
System health check for all Workers
POST/trigger
Force-regenerate fresh briefing
GET/history
Last 7 briefings from D1