Create a brief from a user-pasted text brief (Entry #2)
Inserts the brief in `queued` status and enqueues the parser pipeline asynchronously, returning the briefId in <100ms. The pipeline parses the raw text via Claude Sonnet (outline_extraction → enrichment), populates the brief document, and lands the brief in `brief_editing`. Skips the 14-step research pipeline and does NOT auto-start content generation — the caller (UI or agent) must walk the brief editor and trigger content generation through `POST /domains/:domainId/content-briefs/:briefId/content/generate`. The full CONTENT_GENERATION credit cost is checked there, but this endpoint also runs a pre-flight CONTENT_COST_MIN floor check so callers without the minimum content credits fail fast (mirrors the AI flow's BRIEF_GENERATION pre-flight) — that is what produces a 402 here. Subscribe to `subscribe_content_brief` socket events with the returned briefId to follow parser progress.
In: header
Path Parameters
Domain ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/domains/string/content-briefs/from-user-brief" \ -H "Content-Type: application/json" \ -d '{ "market": "us", "language": "en", "userBriefRawText": "H1: Internal Audit Explained\\nH2: What is an internal audit\\n..." }'{ "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "keyword": "best running shoes", "market": "US", "language": "en", "targetArticleTitle": "How to choose running shoes", "status": "completed", "kanbanStatus": "briefs", "currentStep": 14, "totalSteps": 14, "currentStepName": "title_suggestions", "detectedArticleType": "guide", "createdAt": "2026-05-25T10:30:00.000Z", "completedAt": "2026-05-25T10:35:00.000Z", "errorMessage": "SERP provider returned no results", "autopilotMode": false, "fromContentGap": true}