{"openapi":"3.1.0","info":{"title":"LinkGecko API","version":"1.2.0","description":"See which brands AI answer engines recommend for a market, the pages behind those answers, and the moves that get a brand named. Authenticate with an API key from Settings in the app (Bearer ar_...). Reading results is free; operations marked x-credits spend credits from the monthly plan. Typical flow: listBrands, then getReport or getActionPlan on the brand's latest analysis; or createBrand, runAnalysis, poll getAnalysis until complete."},"servers":[{"url":"https://linkgecko.com"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Link opportunities"},{"name":"Competitors"},{"name":"Analyses"},{"name":"Results"},{"name":"Drafts"},{"name":"Reports"},{"name":"Sentiment"},{"name":"Brands"},{"name":"Account"}],"paths":{"/v1/projects/{project_id}/signals":{"get":{"operationId":"getLinkOpportunities","summary":"Get link opportunities","description":"Live requests matched to the brand: journalists asking for an expert quote (type pr_quote) and podcasts booking guests (type podcast). Each has a 1-10 fit score, the angle this brand brings, a deadline and how to reply. Empty until find_link_opportunities has run. Paid plan.","tags":["Link opportunities"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"project_id","in":"path","required":true,"description":"Brand id, e.g. proj_abc123 (from list_brands).","schema":{"type":"string","description":"Brand id, e.g. proj_abc123 (from list_brands)."}}]}},"/v1/projects/{project_id}/signals/refresh":{"post":{"operationId":"findLinkOpportunities","summary":"Find new link opportunities","description":"Scores every live journalist and podcast request against the brand and keeps the strong fits. Spends one credit. Returns the refreshed list directly. New requests arrive daily. Costs 1 credit.","tags":["Link opportunities"],"x-credits":1,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"project_id","in":"path","required":true,"description":"Brand id, e.g. proj_abc123 (from list_brands).","schema":{"type":"string","description":"Brand id, e.g. proj_abc123 (from list_brands)."}}]}},"/v1/signals/{signal_id}/draft":{"post":{"operationId":"draftLinkPitch","summary":"Draft a pitch","description":"Writes the reply to a journalist or podcast request, in the brand's voice, with placeholders for any number it cannot source. Spends one credit; get_link_pitch reopens it free. Costs 1 credit.","tags":["Link opportunities"],"x-credits":1,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"signal_id","in":"path","required":true,"description":"Link opportunity id (from get_link_signals).","schema":{"type":"string","description":"Link opportunity id (from get_link_signals)."}}]},"get":{"operationId":"getLinkPitch","summary":"Get a drafted pitch","description":"The pitch already drafted for a link opportunity, or null when none exists yet.","tags":["Link opportunities"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"signal_id","in":"path","required":true,"description":"Link opportunity id (from get_link_signals).","schema":{"type":"string","description":"Link opportunity id (from get_link_signals)."}}]}},"/v1/signals/{signal_id}/status":{"post":{"operationId":"setLinkOpportunityStatus","summary":"Track a link opportunity","description":"Marks a link opportunity new, saved, dismissed or done, so the list reflects what the team handled.","tags":["Link opportunities"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"signal_id","in":"path","required":true,"description":"Link opportunity id (from get_link_signals).","schema":{"type":"string","description":"Link opportunity id (from get_link_signals)."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"The new status.","enum":["new","saved","dismissed","done"]}},"required":["status"]}}}}}},"/v1/projects/{project_id}/entities":{"get":{"operationId":"listEntities","summary":"List brands, sources and questions","description":"Every competitor, cited site and question across a brand's recent analyses, each with the slug that get_competitor_profile, get_source_profile and get_question_profile take.","tags":["Competitors"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"project_id","in":"path","required":true,"description":"Brand id, e.g. proj_abc123 (from list_brands).","schema":{"type":"string","description":"Brand id, e.g. proj_abc123 (from list_brands)."}}]}},"/v1/projects/{project_id}/brands/{slug}":{"get":{"operationId":"getCompetitorProfile","summary":"Get a competitor profile","description":"Competitor analysis for one brand named in the answers: the questions it holds, the ones it never appears in, the pages cited beside it, and its trend.","tags":["Competitors"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"project_id","in":"path","required":true,"description":"Brand id, e.g. proj_abc123 (from list_brands).","schema":{"type":"string","description":"Brand id, e.g. proj_abc123 (from list_brands)."}},{"name":"slug","in":"path","required":true,"description":"Competitor slug (from list_entities), e.g. roastly.","schema":{"type":"string","description":"Competitor slug (from list_entities), e.g. roastly."}}]}},"/v1/projects/{project_id}/sources/{domain}":{"get":{"operationId":"getSourceProfile","summary":"Get a cited site profile","description":"One cited site: which questions cite it, which brands it names, and whether the brand is on it.","tags":["Competitors"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"project_id","in":"path","required":true,"description":"Brand id, e.g. proj_abc123 (from list_brands).","schema":{"type":"string","description":"Brand id, e.g. proj_abc123 (from list_brands)."}},{"name":"domain","in":"path","required":true,"description":"The cited domain, e.g. wirecutter.com.","schema":{"type":"string","description":"The cited domain, e.g. wirecutter.com."}}]}},"/v1/projects/{project_id}/questions/{slug}":{"get":{"operationId":"getQuestionProfile","summary":"Get a question profile","description":"One buyer question across analyses: who the answers named each time and which pages they cited.","tags":["Competitors"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"project_id","in":"path","required":true,"description":"Brand id, e.g. proj_abc123 (from list_brands).","schema":{"type":"string","description":"Brand id, e.g. proj_abc123 (from list_brands)."}},{"name":"slug","in":"path","required":true,"description":"Question slug (from list_entities).","schema":{"type":"string","description":"Question slug (from list_entities)."}}]}},"/v1/runs/{run_id}/analyze-competitor":{"post":{"operationId":"analyzeCompetitor","summary":"Analyse a competitor","description":"Starts a full analysis of a competitor named in an analysis, on the same market, so you can see where it wins and why. Spends one credit. Poll get_analysis on the new run id. Costs 1 credit.","tags":["Competitors"],"x-credits":1,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brand":{"type":"string","description":"The competitor's name as it appears in get_score."}},"required":["brand"]}}}}}},"/v1/projects/{project_id}/runs":{"post":{"operationId":"runAnalysis","summary":"Run a new analysis","description":"Starts a new analysis of a brand: it gathers real search phrases, drafts the questions buyers ask AI, asks live AI answer engines, and records every brand named and page cited. Spends one credit. Returns the run id at once; the analysis takes a few minutes, so poll get_analysis until status is complete. Prefer the existing latest_run_id when the user only wants current standing. Costs 1 credit.","tags":["Analyses"],"x-credits":1,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"project_id","in":"path","required":true,"description":"Brand id, e.g. proj_abc123 (from list_brands).","schema":{"type":"string","description":"Brand id, e.g. proj_abc123 (from list_brands)."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"topic":{"type":"string","description":"Optional focus within the brand's market: a product line, use case or audience."}},"required":[]}}}}}},"/v1/scans":{"post":{"operationId":"scanKeyword","summary":"Scan a keyword","description":"Who AI recommends for a keyword or buyer question, with no brand needed: the brands named and how often, the pages and threads behind them, the questions around the keyword, and the open ones nobody owns. Spends one credit. Returns the run id at once; poll get_analysis until complete, then call get_report. Scanning the same keyword again builds its history. Costs 1 credit.","tags":["Analyses"],"x-credits":1,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keyword":{"type":"string","description":"A keyword or buyer question, e.g. best crm for startups."}},"required":["keyword"]}}}}}},"/v1/runs/{run_id}":{"get":{"operationId":"getAnalysis","summary":"Check an analysis","description":"Status of one analysis: queued, running, complete or failed, the current stage, and timestamps. Poll this after run_analysis; results tools only have data once status is complete.","tags":["Analyses"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}}]}},"/v1/runs":{"get":{"operationId":"listAnalyses","summary":"List analyses","description":"Your recent analyses across all brands, newest first, with brand, topic, status and answer share.","tags":["Analyses"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/runs/{run_id}/reanalyze":{"post":{"operationId":"rerunAnalysis","summary":"Run an analysis again","description":"Runs a finished analysis again with the same brand and topic, to measure what changed after work was done. Spends one credit. Poll get_analysis on the new run id. Costs 1 credit.","tags":["Analyses"],"x-credits":1,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}}]}},"/v1/runs/{run_id}/explore":{"post":{"operationId":"discoverMoreQuestions","summary":"Discover more questions","description":"Keyword discovery: adds a fresh batch of buyer questions to a finished analysis and asks AI each one, so the question set and results grow. Spends one credit. The results stay readable while it runs. Costs 1 credit.","tags":["Analyses"],"x-credits":1,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}}]}},"/v1/runs/{run_id}/plan":{"get":{"operationId":"getActionPlan","summary":"Get the action plan","description":"The ranked plan for one analysis, the same one the app shows: each action has the evidence behind it, the competitors benefiting, effort, and a ready deliverable (an outreach email, a thread to reply in, a page to write, a pitch, or a fix). Also returns the brief and the pages behind the leading competitor.","tags":["Results"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}}]}},"/v1/runs/{run_id}/score":{"get":{"operationId":"getScore","summary":"Get answer share","description":"Headline numbers for one analysis: answer share (how many answers name the brand) and every brand the answers named, with the share of questions each wins.","tags":["Results"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}}]}},"/v1/runs/{run_id}/prompts":{"get":{"operationId":"getQuestions","summary":"Get buyer questions","description":"The buyer questions an analysis asked, built from real search phrases: each with intent (informational, commercial, transactional, comparison), buying stage, persona, topic cluster, a demand signal, and whether the brand was named. Use it for keyword and topic research.","tags":["Results"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}}]}},"/v1/runs/{run_id}/transcript":{"get":{"operationId":"getTranscript","summary":"Get the answers","description":"Every AI answer the analysis collected, word for word, with the brands each named and the pages each cited. The evidence behind every number.","tags":["Results"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}}]}},"/v1/runs/{run_id}/opportunities":{"get":{"operationId":"getOpportunities","summary":"Get questions to win back","description":"High-demand questions where the brand is missing, each with the competitor winning it and the pages that answer cites.","tags":["Results"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}}]}},"/v1/runs/{run_id}/content-opportunities":{"get":{"operationId":"getContentGaps","summary":"Get content gaps","description":"Content to create so the brand wins future answers: each idea has intent, relevance, a suggested format, difficulty, demand, the likely current winner and a priority. The first call for an analysis can take about 30 seconds.","tags":["Results"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}}]}},"/v1/runs/{run_id}/sources":{"get":{"operationId":"getCitations","summary":"Get cited pages","description":"The third-party pages AI cites in this market, by domain, each flagged with whether the brand appears there. Getting onto the missing ones is one of the fastest ways into the answers.","tags":["Results"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}}]}},"/v1/runs/{run_id}/communities":{"get":{"operationId":"getCommunities","summary":"Get community threads","description":"The Reddit, Quora and forum threads the answers quote in this market, with the question that surfaced each. A genuine reply that mentions the brand can end up quoted in future answers.","tags":["Results"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}}]}},"/v1/runs/{run_id}/fixes":{"get":{"operationId":"getFixes","summary":"Get the fix list","description":"Ranked fixes for one analysis, each with impact, effort and a done flag the user sets. Focus advice on what is not done.","tags":["Results"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}}]}},"/v1/runs/{run_id}/fixes/{fix_id}":{"patch":{"operationId":"setFixDone","summary":"Mark a fix done","description":"Ticks a fix done, or not done, so the list and the next report reflect progress.","tags":["Results"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}},{"name":"fix_id","in":"path","required":true,"description":"Fix id (from get_fixes).","schema":{"type":"string","description":"Fix id (from get_fixes)."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"done":{"type":"boolean","description":"true to mark done, false to reopen."}},"required":["done"]}}}}}},"/v1/projects/{project_id}/plan-progress":{"put":{"operationId":"setPlanActionDone","summary":"Mark a plan action done","description":"Ticks an action from get_action_plan done, or not done. Progress is kept per brand, so it carries over to the next analysis.","tags":["Results"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"project_id","in":"path","required":true,"description":"Brand id, e.g. proj_abc123 (from list_brands).","schema":{"type":"string","description":"Brand id, e.g. proj_abc123 (from list_brands)."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionId":{"type":"string","description":"The action id from get_action_plan, e.g. source:wirecutter.com."},"done":{"type":"boolean","description":"true to mark done, false to reopen."}},"required":["actionId","done"]}}}}}},"/v1/projects/{project_id}/changes":{"get":{"operationId":"getChanges","summary":"Get what changed","description":"What moved between a brand's two latest analyses: questions won and lost, competitors that entered or left, pages that started or stopped being cited.","tags":["Results"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"project_id","in":"path","required":true,"description":"Brand id, e.g. proj_abc123 (from list_brands).","schema":{"type":"string","description":"Brand id, e.g. proj_abc123 (from list_brands)."}}]}},"/v1/projects/{project_id}/history":{"get":{"operationId":"getTrend","summary":"Get the trend","description":"Every finished analysis of a brand over time, oldest first, with answer share and how many questions named it. Use it to say whether visibility is improving.","tags":["Results"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"project_id","in":"path","required":true,"description":"Brand id, e.g. proj_abc123 (from list_brands).","schema":{"type":"string","description":"Brand id, e.g. proj_abc123 (from list_brands)."}}]}},"/v1/runs/{run_id}/communities/draft":{"post":{"operationId":"draftCommunityReply","summary":"Draft a community reply","description":"Writes a genuine, helpful reply for a thread from get_communities, after reading the thread. Spends one credit; get_community_reply reopens it free. Costs 1 credit.","tags":["Drafts"],"x-credits":1,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"The thread URL, exactly as get_communities returned it."}},"required":["url"]}}}}},"get":{"operationId":"getCommunityReply","summary":"Get a drafted reply","description":"The reply already drafted for a community thread, or null when none exists yet.","tags":["Drafts"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}},{"name":"url","in":"query","required":true,"description":"The thread URL.","schema":{"type":"string","description":"The thread URL."}}]}},"/v1/runs/{run_id}/content-draft":{"post":{"operationId":"draftContent","summary":"Draft a page","description":"Writes a page for a content gap or a missed question, answer-first and structured for AI to quote. ref is 'copp:<id>' for an item from get_content_gaps or 'prm:<promptId>' for a question from get_opportunities. Spends one credit; get_content_draft reopens it free. Costs 1 credit.","tags":["Drafts"],"x-credits":1,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ref":{"type":"string","description":"copp:<content gap id> or prm:<prompt id>."}},"required":["ref"]}}}}},"get":{"operationId":"getContentDraft","summary":"Get a drafted page","description":"The page already drafted for a content gap or question, or null when none exists yet.","tags":["Drafts"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}},{"name":"ref","in":"query","required":true,"description":"copp:<content gap id> or prm:<prompt id>.","schema":{"type":"string","description":"copp:<content gap id> or prm:<prompt id>."}}]}},"/v1/runs/{run_id}/report":{"get":{"operationId":"getReport","summary":"Get the full report","description":"A complete, presentable report for one analysis: summary, answer share, competitors, why the leader gets named, the action plan with outreach emails, missing questions, cited pages, community threads, content gaps, fixes, sentiment if run, and method. format 'markdown' is ready to paste into a doc or show to a client; 'json' is structured for other tools.","tags":["Reports"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"text/markdown":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}},{"name":"format","in":"query","required":false,"description":"markdown (default) or json.","schema":{"type":"string","description":"markdown (default) or json.","enum":["markdown","json"]}}]}},"/v1/runs/{run_id}/publish":{"post":{"operationId":"shareReport","summary":"Create a share link","description":"Publishes a public, read-only summary of the analysis (answer share, competitors, cited sites) and returns its link. The plan and drafts stay private.","tags":["Reports"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}}]}},"/v1/runs/{run_id}/sentiment":{"post":{"operationId":"runSentiment","summary":"Run sentiment analysis","description":"Reads reviews, complaints, support stories, press, expert opinion and forum threads about the brand, plus a head-to-head with its top competitor, and scores trust, authority, reputation and overall sentiment. Spends one credit, charged when the report is ready. Once per brand per week. Poll get_sentiment. Costs 1 credit.","tags":["Sentiment"],"x-credits":1,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}}]},"get":{"operationId":"getSentiment","summary":"Get sentiment","description":"The brand's latest sentiment report: overall, trust, authority and reputation scores (0-100, red below 40, green from 65), themes with quotes and sources, actions, and when the next run opens.","tags":["Sentiment"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"run_id","in":"path","required":true,"description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses).","schema":{"type":"string","description":"Analysis id, e.g. run_abc123 (from list_brands.latest_run_id or list_analyses)."}}]}},"/v1/projects":{"get":{"operationId":"listBrands","summary":"List brands","description":"Every brand you track, and every keyword you have scanned (kind 'market'), with its id, domain, market, competitors, Auto-agent setting and latest analysis id (latest_run_id). Start here: it gives the ids every other tool needs. A null latest_run_id means nothing has been run yet.","tags":["Brands"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createBrand","summary":"Add a brand","description":"Adds a brand to track. Free. Brands are unlimited; analyses are what the plan counts. Run lookup_domain first to prefill the market and competitors, then run_analysis to measure it.","tags":["Brands"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Brand name as buyers say it."},"domain":{"type":"string","description":"The brand's website, e.g. acme.com."},"category":{"type":"string","description":"The market in buyers' words, e.g. coffee subscriptions."},"competitors":{"type":"array","description":"Competitor names to always report on.","items":{"type":"string"}},"aliases":{"type":"array","description":"Other names answers may use for the brand.","items":{"type":"string"}},"kind":{"type":"string","description":"own for your or a client's brand, competitor for a rival you watch. Defaults to own.","enum":["own","competitor"]}},"required":["name"]}}}}}},"/v1/projects/{project_id}":{"get":{"operationId":"getBrand","summary":"Get brand","description":"One brand's settings: name, domain, market, aliases, tracked competitors, Auto-agent cadence and latest analysis id.","tags":["Brands"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"project_id","in":"path","required":true,"description":"Brand id, e.g. proj_abc123 (from list_brands).","schema":{"type":"string","description":"Brand id, e.g. proj_abc123 (from list_brands)."}}]},"patch":{"operationId":"updateBrand","summary":"Update brand settings","description":"Changes a brand's settings. Only the fields you pass change. watch_cadence 'weekly' turns on the Auto-agent: a new analysis every week (one credit each) and an email of what moved. It needs a paid plan.","tags":["Brands"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"project_id","in":"path","required":true,"description":"Brand id, e.g. proj_abc123 (from list_brands).","schema":{"type":"string","description":"Brand id, e.g. proj_abc123 (from list_brands)."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Brand name."},"domain":{"type":"string","description":"Website."},"category":{"type":"string","description":"Market in buyers' words."},"competitors":{"type":"array","description":"Full list of tracked competitors (replaces the old list).","items":{"type":"string"}},"aliases":{"type":"array","description":"Full list of aliases (replaces the old list).","items":{"type":"string"}},"watchCadence":{"type":"string","description":"Auto-agent: 'weekly' re-runs the analysis every week.","enum":["off","weekly"]}},"required":[]}}}}}},"/v1/projects/describe":{"post":{"operationId":"lookupDomain","summary":"Look up a domain","description":"Reads a website and suggests its brand name, market (category) and likely competitors. Free, and it saves nothing: use the result to fill create_brand.","tags":["Brands"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"A domain such as acme.com."}},"required":["domain"]}}}}}},"/v1/credits":{"get":{"operationId":"getCredits","summary":"Check credits","description":"Credits left in the current billing window, when the window resets, and what each action costs. Reads are free; only actions marked as spending a credit use one. Check this before running several paid actions in a row.","tags":["Account"],"x-credits":0,"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan or trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Out of credits for this window, or rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An LinkGecko API key (ar_...) or OAuth access token."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}