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.
AuthorizationBearer <token>Session JWT signed with HS256. Verification pins the algorithm and rejects expired tokens, per RFC8725.
domainId*stringDomain ID
application/json- body
market*stringTarget market code (e.g., "us", "fr")
2 <= length <= 5language*stringContent language code (e.g., "en", "fr")
2 <= length <= 5userBriefRawText*stringRaw text brief pasted by the user — parsed by Claude Sonnet (two passes)
200 <= length <= 50000h1?stringOverride for the article H1. When omitted, the parser-extracted value is used.
5 <= length <= 200primaryKeyword?stringOverride for the primary SEO keyword. When omitted, the parser-extracted value is used.
2 <= length <= 200targetWordCount?numberOverride for target word count. When omitted, the parser-extracted value (or 1500 as a fallback) is used. Drives credit cost.
200 <= value <= 10000secondaryKeywords?array<string>Override for secondary keywords. Pass undefined (omit the field) to keep the parser-extracted list; pass [] to clear it explicitly.
articleType?stringArticle type. Drives downstream content-generation prompts and the editor's "Recommended Format" surface. Defaults to guide when omitted.
"guide""how_to""comparatif""definition"Brief queued and parser pipeline enqueued
application/json- response
id*stringBrief ID
keyword*stringPrimary keyword
market*stringTarget market code
language*stringContent language
targetArticleTitle?stringTarget article title (selected or generated)
status*stringCurrent status
"queued""running""pending_title_selection""completed""brief_editing""brief_ready""content_queued""content_generating""content_generated""failed""cancelled"kanbanStatus?|Kanban board column override (null = derived from pipeline status)
"processing""briefs""contents""review""published"currentStep*numberCurrent step number
totalSteps*numberTotal steps
currentStepName?stringCurrent step name
detectedArticleType?stringDetected article type (once article type detection step completes)
"guide""how_to""comparatif""definition"createdAt*stringCreation date
completedAt?stringCompletion date
errorMessage?stringError message if failed
autopilotMode*booleanWhether this brief was created in Autopilot mode
fromContentGap?booleanWhether this brief was created from a content gap analysis
curl -X POST 'https://api.getmint.ai/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}