{"openapi":"3.1.0","info":{"title":"Sunday Clerk API","version":"1","description":"Authenticate with an API key as a Bearer token. Webhook deliveries are signed; each request body is described under webhooks."},"servers":[{"url":"https://api.sundayclerk.com"}],"security":[{"apiKey":[]}],"paths":{"/v1/home":{"get":{"operationId":"home.get","summary":"The workspace at a glance: its lists and the companies they found, the rows waiting for a person, how many companies it watches, the newest exclusions file's changes to watched companies, the last seven days' changes, and any family of checks that is stale or unavailable.","description":"The workspace at a glance: its lists and the companies they found, the rows waiting for a person, how many companies it watches, the newest exclusions file's changes to watched companies, the last seven days' changes, and any family of checks that is stale or unavailable. Free.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["lists","newestListId","companies","review","watched","exclusions","week","attention"],"properties":{"lists":{"type":"number"},"newestListId":{"type":["string","null"]},"companies":{"type":"number"},"review":{"type":"object","required":["rows","listId"],"properties":{"rows":{"type":"number"},"listId":{"type":["string","null"]}}},"watched":{"type":"number"},"exclusions":{"type":["object","null"],"required":["newestFile","changes"],"properties":{"newestFile":{"type":"string"},"changes":{"type":"array","items":{"type":"object","required":["companyId","company","what","on"],"properties":{"companyId":{"type":"string"},"company":{"type":"string"},"what":{"type":"string"},"on":{"type":"string"}}}}}},"week":{"type":"array","items":{"type":"object","required":["companyId","company","what","on"],"properties":{"companyId":{"type":"string"},"company":{"type":"string"},"what":{"type":"string"},"on":{"type":"string"}}}},"attention":{"type":"array","items":{"type":"object","required":["label","coverage","dataThrough"],"properties":{"label":{"type":"string"},"coverage":{"type":"string","enum":["checking","found","no_match","review_required","stale","unavailable"]},"dataThrough":{"type":["string","null"]}}}}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["workspace_overview"]}},"/v1/companies":{"get":{"operationId":"companies.search","summary":"Companies a name or an identifier finds.","description":"Companies a name or an identifier finds. A UEI or a CAGE code finds its company exactly; a name finds up to 100, 25 a page, each with its identifiers, place, registration status, risk band, adverse records by family, sites, newest record's date and why it came up. Filters narrow them by state, risk band, family of adverse records and active registration, and `facets` counts each option among all the name found. No model decides anything: the caller picks. Free.","parameters":[{"name":"q","in":"query","required":true,"description":"A company name, a UEI or a CAGE code.","schema":{"type":"string","minLength":2,"maxLength":200}},{"name":"mode","in":"query","description":"suggest: what a person has typed so far, answered at once, by names that begin with it and no similar names. search when left out.","schema":{"default":"search","type":"string","enum":["search","suggest"]}},{"name":"page","in":"query","description":"Which page of companies, from 1.","schema":{"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"state","in":"query","description":"Only companies in these states, comma separated, as their registration states them (TX,CA).","schema":{"type":"string","maxLength":500}},{"name":"risk","in":"query","description":"Only companies with these risk bands, comma separated: high, elevated, low, not_enough_checked.","schema":{"type":"string","maxLength":500}},{"name":"findings","in":"query","description":"Only companies with an adverse record in these families, comma separated: registrations, exclusions, workplace, environment, transport, product, health, finance, nonprofits, awards, courts, disclosures, ip, registries.","schema":{"type":"string","maxLength":500}},{"name":"active","in":"query","description":"true: only companies whose registration is active.","schema":{"type":"string","enum":["true"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["query","identified","candidates","total","families","page","pages","facets"],"properties":{"query":{"type":"string"},"identified":{"type":["object","null"],"required":["scheme","value","companyId"],"properties":{"scheme":{"type":"string","enum":["cage","uei"]},"value":{"type":"string"},"companyId":{"type":"string"}}},"candidates":{"type":"array","items":{"type":"object","required":["id","name","place","state","identifiers","risk","findings","sites","latest","why","family"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"place":{"type":["string","null"]},"state":{"type":["string","null"]},"identifiers":{"type":"array","items":{"type":"object","required":["scheme","value"],"properties":{"scheme":{"type":"string","enum":["cage","uei"]},"value":{"type":"string"}}}},"status":{"type":["object","null"],"required":["label","tone"],"properties":{"label":{"type":"string"},"tone":{"type":"string","enum":["attention","good"]}}},"risk":{"type":["string","null"],"enum":["elevated","high","low","not_enough_checked",null]},"findings":{"type":"array","items":{"type":"object","required":["family","label","count"],"properties":{"family":{"type":"string","enum":["awards","courts","disclosures","environment","exclusions","finance","health","ip","nonprofits","product","registrations","registries","transport","workplace"]},"label":{"type":"string"},"count":{"type":"number"}}}},"sites":{"type":"number"},"latest":{"type":["string","null"]},"why":{"type":"array","items":{"type":"string"}},"family":{"type":["object","null"],"required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}},"total":{"type":"number"},"families":{"type":"number"},"page":{"type":"number"},"pages":{"type":"number"},"facets":{"type":"object","required":["states","risk","findings","active"],"properties":{"states":{"type":"array","items":{"type":"object","required":["value","count"],"properties":{"value":{"type":"string"},"count":{"type":"number"}}}},"risk":{"type":"array","items":{"type":"object","required":["value","count"],"properties":{"value":{"type":"string","enum":["elevated","high","low","not_enough_checked"]},"count":{"type":"number"}}}},"findings":{"type":"array","items":{"type":"object","required":["value","label","count"],"properties":{"value":{"type":"string","enum":["awards","courts","disclosures","environment","exclusions","finance","health","ip","nonprofits","product","registrations","registries","transport","workplace"]},"label":{"type":"string"},"count":{"type":"number"}}}},"active":{"type":"number"}}}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["search_companies"]}},"/v1/companies/match":{"post":{"operationId":"companies.match","summary":"Matches one company now, in this request.","description":"Matches one company now, in this request. A UEI or CAGE code finds its company exactly. A name, with its address when you have it, is matched the way a list's row is, and looked up on the web when no record matches. `status`: identified (by UEI or CAGE code), matched (by name), review (the facts were not enough, or more than one company may be it: `candidates` holds them), or unresolved (no matching record in the sources checked). Your lists' rows still waiting that are written the same way take the answer. Free.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"The company's name, as you write it.","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"address":{"description":"Its street address.","anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"city":{"description":"Its city.","anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"state":{"description":"Its state or province.","anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"postal":{"description":"Its postal code.","anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"country":{"description":"Its country.","anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"website":{"description":"Its website.","anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"uei":{"description":"Its UEI, when you have it.","anyOf":[{"type":"string","maxLength":32},{"type":"null"}]},"cage":{"description":"Its CAGE code, when you have it.","anyOf":[{"type":"string","maxLength":16},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["status","company","decidedBy","candidates"],"properties":{"status":{"type":"string","enum":["identified","matched","review","unresolved"]},"company":{"type":["object","null"],"required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"decidedBy":{"type":["string","null"]},"candidates":{"type":"array","items":{"type":"object","required":["id","name","verdict"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"verdict":{"type":"string"}}}}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged. Neither a name, a UEI nor a CAGE code was sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged. `not_in_plan`: matching names comes with Pro; the message says the way to it. A UEI or CAGE code needs no plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"503":{"description":"`unavailable`: the match could not be finished now; try again in a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["match_company"]}},"/v1/companies/records":{"get":{"operationId":"companies.source_records","summary":"One source's records of a company, a page at a time, in the order the company's record shows them (adverse first, then the newest), each citing its source, the record's key and the date of the file it was read from.","description":"One source's records of a company, a page at a time, in the order the company's record shows them (adverse first, then the newest), each citing its source, the record's key and the date of the file it was read from. The company's record answers each source's first page and its total; this answers any page. Same access as companies.get. Free.","parameters":[{"name":"company","in":"query","required":true,"description":"The company's id (sc_ and 16 hex characters).","schema":{"type":"string","pattern":"^sc_[0-9a-f]{16}$"}},{"name":"source","in":"query","required":true,"description":"The source's id, as the company's record names it (src_ and 16 hex characters).","schema":{"type":"string","pattern":"^src_[0-9a-f]{16}$"}},{"name":"page","in":"query","description":"The page, from 1.","schema":{"default":1,"type":"integer","minimum":1,"maximum":100000}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["company","source","page","pages","total","records"],"properties":{"company":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"source":{"type":"string"},"page":{"type":"number"},"pages":{"type":"number"},"total":{"type":"number"},"records":{"type":"array","items":{"type":"object","required":["cite","eventOn","payload","shown","adverse"],"properties":{"cite":{"type":"object","required":["source","kind","key","fileOf"],"properties":{"source":{"type":"string"},"kind":{"type":"string"},"key":{"type":"string"},"fileOf":{"type":["string","null"]}}},"eventOn":{"type":["string","null"]},"payload":{"type":["object","null"],"additionalProperties":{"type":"string"}},"shown":{"type":["object","null"],"required":["facts"],"properties":{"status":{"type":"object","required":["label","tone"],"properties":{"label":{"type":"string"},"tone":{"type":"string","enum":["attention","good"]}}},"facts":{"type":"array","items":{"type":"object","required":["label","value"],"properties":{"label":{"type":"string"},"value":{"type":"string"},"kind":{"type":"string","enum":["date","id","link"]}}}}}},"adverse":{"type":"boolean"},"review":{"type":"string","enum":["belongs","required"]},"via":{"type":"object","required":["role","name","address"],"properties":{"role":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"}}},"covers":{"type":"number"}}}}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"`record_locked`: this company's full record comes with the plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No company has this id, or no source has this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["company_source_records"]}},"/v1/companies/review":{"post":{"operationId":"companies.review","summary":"A person's answer about evidence that reaches a company only through a name and address matching found to be it.","description":"A person's answer about evidence that reaches a company only through a name and address matching found to be it. For a record (`source`, `kind` and `key`, as the company's record cites it: a facility's violation, an enforcement case, a charged-off loan): does it belong to this company? For a facility (`site`, as the company's record lists it under sites, linked by its named operator or owner): is it this company's, for every adverse record reached through it? \"belongs\" counts it for this workspace, \"not_this_company\" removes it from this workspace's view, and \"undo\" takes the answer back. A record's own answer, where given, comes before its facility's. Kept for this workspace alone; it never changes another workspace's evidence. Free.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string","pattern":"^sc_[0-9a-f]{16}$","description":"The company's id (sc_ and 16 hex characters)."},"decision":{"type":"string","enum":["belongs","not_this_company","undo"],"description":"The person's answer, or undo."},"site":{"description":"A facility's id, as the company's record lists it under sites.","type":"string","pattern":"^sc_[0-9a-f]{16}$"},"source":{"description":"A record's source, as the company's record cites it (src_ and 16 hex characters).","type":"string","pattern":"^src_[0-9a-f]{16}$"},"kind":{"description":"The record's kind, as cited.","type":"string","minLength":1,"maxLength":64},"key":{"description":"The record's key, as cited.","type":"string","minLength":1,"maxLength":200}},"required":["company","decision"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["decision"],"properties":{"decision":{"type":["string","null"],"enum":["belongs","not_this_company",null]}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged. Neither a facility nor a whole record citation was sent, or both were.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"`record_locked`: this company's full record comes with the plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No company has this id, or it has no record or facility waiting for review with these.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["review_company"]}},"/v1/companies/{id}":{"get":{"operationId":"companies.get","summary":"One company as its records state it: its identifiers, names, addresses and sites, what each source says with its coverage, and its timeline, every fact citing its source, the record's key and the date of the file it was read from.","description":"One company as its records state it: its identifiers, names, addresses and sites, what each source says with its coverage, and its timeline, every fact citing its source, the record's key and the date of the file it was read from. Full records come with the plan; before the trial the first company looked up opens, and while the plan is paused the first tenth of the companies watched open as they stood when it ended (`asOf`). Free.","parameters":[{"name":"id","in":"path","required":true,"description":"The company's id, as a search answers it (sc_ and 16 hex characters).","schema":{"type":"string","pattern":"^sc_[0-9a-f]{16}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["watched","watchOwner","id","name","identifiers","names","addresses","sites","siteCount","sources","checks","events","risk","asOf"],"properties":{"watched":{"type":"boolean"},"watchOwner":{"type":["object","null"],"required":["userId","email"],"properties":{"userId":{"type":"string"},"email":{"type":"string"}}},"id":{"type":"string"},"name":{"type":"string"},"identifiers":{"type":"array","items":{"type":"object","required":["scheme","issuer","value","state","cite"],"properties":{"scheme":{"type":"string"},"issuer":{"type":"string"},"value":{"type":"string"},"state":{"type":"string"},"cite":{"type":"object","required":["source","kind","key","fileOf"],"properties":{"source":{"type":"string"},"kind":{"type":"string"},"key":{"type":"string"},"fileOf":{"type":["string","null"]}}}}}},"names":{"type":"array","items":{"type":"object","required":["role","name","cite"],"properties":{"role":{"type":"string"},"name":{"type":"string"},"cite":{"type":"object","required":["source","kind","key","fileOf"],"properties":{"source":{"type":"string"},"kind":{"type":"string"},"key":{"type":"string"},"fileOf":{"type":["string","null"]}}}}}},"addresses":{"type":"array","items":{"type":"object","required":["line1","city","state","postal","country","cite"],"properties":{"line1":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postal":{"type":["string","null"]},"country":{"type":["string","null"]},"cite":{"type":"object","required":["source","kind","key","fileOf"],"properties":{"source":{"type":"string"},"kind":{"type":"string"},"key":{"type":"string"},"fileOf":{"type":["string","null"]}}}}}},"sites":{"type":"array","items":{"type":"object","required":["id","name","relations","linkedByName","identifiers","line1","city","state","postal","country","cite"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"relations":{"type":"array","items":{"type":"string"}},"linkedByName":{"type":"boolean"},"identifiers":{"type":"array","items":{"type":"object","required":["scheme","value"],"properties":{"scheme":{"type":"string"},"value":{"type":"string"}}}},"line1":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postal":{"type":["string","null"]},"country":{"type":["string","null"]},"cite":{"type":"object","required":["source","kind","key","fileOf"],"properties":{"source":{"type":"string"},"kind":{"type":"string"},"key":{"type":"string"},"fileOf":{"type":["string","null"]}}},"review":{"type":"string","enum":["belongs","required"]},"waiting":{"type":"number"},"via":{"type":"object","required":["role","name","address"],"properties":{"role":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"}}}}}},"siteCount":{"type":"number"},"sources":{"type":"array","items":{"type":"object","required":["key","publisher","dataset","coverage","dataThrough","family","total","adverse","waiting","records"],"properties":{"key":{"type":"string"},"publisher":{"type":"string"},"dataset":{"type":"string"},"coverage":{"type":"string","enum":["checking","found","no_match","review_required","stale","unavailable"]},"dataThrough":{"type":["string","null"]},"family":{"type":"string"},"total":{"type":"number"},"adverse":{"type":"number"},"waiting":{"type":"number"},"records":{"type":"array","items":{"type":"object","required":["cite","eventOn","payload","shown","adverse"],"properties":{"cite":{"type":"object","required":["source","kind","key","fileOf"],"properties":{"source":{"type":"string"},"kind":{"type":"string"},"key":{"type":"string"},"fileOf":{"type":["string","null"]}}},"eventOn":{"type":["string","null"]},"payload":{"type":["object","null"],"additionalProperties":{"type":"string"}},"shown":{"type":["object","null"],"required":["facts"],"properties":{"status":{"type":"object","required":["label","tone"],"properties":{"label":{"type":"string"},"tone":{"type":"string","enum":["attention","good"]}}},"facts":{"type":"array","items":{"type":"object","required":["label","value"],"properties":{"label":{"type":"string"},"value":{"type":"string"},"kind":{"type":"string","enum":["date","id","link"]}}}}}},"adverse":{"type":"boolean"},"review":{"type":"string","enum":["belongs","required"]},"via":{"type":"object","required":["role","name","address"],"properties":{"role":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"}}},"covers":{"type":"number"}}}}}}},"checks":{"type":"array","items":{"type":"object","required":["family","label","coverage","dataThrough"],"properties":{"family":{"type":"string","enum":["awards","courts","disclosures","environment","exclusions","finance","health","ip","nonprofits","product","registrations","registries","transport","workplace"]},"label":{"type":"string"},"coverage":{"type":"string","enum":["checking","found","no_match","review_required","stale","unavailable"]},"dataThrough":{"type":["string","null"]}}}},"events":{"type":"array","items":{"type":"object","required":["type","label","material","occurredOn","newlyDiscovered","facts","cite"],"properties":{"type":{"type":"string"},"label":{"type":"string"},"material":{"type":"boolean"},"occurredOn":{"type":"string"},"newlyDiscovered":{"type":"boolean"},"facts":{"type":"object","additionalProperties":{}},"cite":{"type":"object","required":["source","kind","key","fileOf"],"properties":{"source":{"type":"string"},"kind":{"type":"string"},"key":{"type":"string"},"fileOf":{"type":["string","null"]}}}}}},"risk":{"type":["object","null"],"required":["version","band","reasons","restsOn"],"properties":{"version":{"type":"number"},"band":{"type":"string","enum":["elevated","high","low","not_enough_checked"]},"reasons":{"type":"array","items":{"type":"object","required":["factor","label","through","on","cite"],"properties":{"factor":{"type":"string","enum":["activeExclusion","authoritySuspended","classIRecall","environmentalPenalties","exclusionEnded","exemptionRevoked","exportDenied","exportRestricted","fdaComplianceAction","forcedLabor","formalEnforcement","healthExcluded","militaryCompany","mineFatality","mineOrder","outOfServiceOrder","parentExcluded","productRecall","registrationLapsed","registryLapsed","sanctionedOther","sanctionedSdn","sanctionedUk","sanctionedUn","significantViolation","successorOfExcluded","unsatisfactoryRating","vehicleAdvisory","willfulOrRepeat","workplaceFatality","worldBankDebarred"]},"label":{"type":"string"},"through":{"type":"string","enum":["own","parent","predecessor"]},"on":{"type":["string","null"]},"cite":{"type":"object","required":["source","kind","key","fileOf"],"properties":{"source":{"type":"string"},"kind":{"type":"string"},"key":{"type":"string"},"fileOf":{"type":["string","null"]}}}}}},"restsOn":{"type":"array","items":{"type":"object","required":["family","label","coverage"],"properties":{"family":{"type":"string","enum":["awards","courts","disclosures","environment","exclusions","finance","health","ip","nonprofits","product","registrations","registries","transport","workplace"]},"label":{"type":"string"},"coverage":{"type":"string","enum":["checking","found","no_match","review_required","stale","unavailable"]}}}}}},"asOf":{"type":["string","null"]}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"`record_locked`: this company's full record comes with the plan; `details.company` names it, and the message says the way to it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No company has this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["get_company"]}},"/v1/companies/{id}/relationships":{"get":{"operationId":"companies.relationships","summary":"A company's relationships as its records state them, never inferred from a name or an address: its direct and ultimate parents, subsidiaries and group companies, international branches, a fund's manager, umbrella and feeders, its successor, and the companies it assigned trademarks to, took them from or pledged them to as recorded assignments state them.","description":"A company's relationships as its records state them, never inferred from a name or an address: its direct and ultimate parents, subsidiaries and group companies, international branches, a fund's manager, umbrella and feeders, its successor, and the companies it assigned trademarks to, took them from or pledged them to as recorded assignments state them. Each relation says where it reads (above, below, related or transfers) and cites the record that states it, with its dates and whether it is current; each related company says how many sources hold a record of it and whether the workspace watches it. `tree` is the map, from the ultimate parent down to the direct subsidiaries. Comes with the full record, as companies.get does. Free.","parameters":[{"name":"id","in":"path","required":true,"description":"The company's id, as a search answers it (sc_ and 16 hex characters).","schema":{"type":"string","pattern":"^sc_[0-9a-f]{16}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["company","relations","tree"],"properties":{"company":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"relations":{"type":"array","items":{"type":"object","required":["direction","type","label","group","company","current","from","until","asOf","fileOf","sources","watched","cite"],"properties":{"direction":{"type":"string","enum":["down","up"]},"type":{"type":"string","enum":["assigned_marks_to","branch_of","co_issuer","feeder_to","fund_managed_by","imports_from","parent","related_org","secured_marks_to","subfund_of","succeeded_by","ultimate_parent"]},"label":{"type":"string"},"group":{"type":"string","enum":["above","below","related","supply","transfers"]},"company":{"type":"object","required":["id","name"],"properties":{"id":{"type":["string","null"]},"name":{"type":"string"},"knownBy":{"type":"object","required":["scheme","value"],"properties":{"scheme":{"type":"string"},"value":{"type":"string"}}}}},"current":{"type":"boolean"},"from":{"type":["string","null"]},"until":{"type":["string","null"]},"asOf":{"type":["string","null"]},"fileOf":{"type":"string"},"sources":{"type":"number"},"watched":{"type":"boolean"},"cite":{"type":"object","required":["source","kind","key","fileOf"],"properties":{"source":{"type":"string"},"kind":{"type":"string"},"key":{"type":"string"},"fileOf":{"type":["string","null"]}}}}}},"tree":{"type":"array","items":{"type":"object","required":["children","id","name"],"properties":{"children":{"type":"array","items":{}},"id":{"type":"string"},"name":{"type":"string"},"knownBy":{"type":"object","required":["scheme","value"],"properties":{"scheme":{"type":"string"},"value":{"type":"string"}}}}}}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"`record_locked`: this company's full record comes with the plan; `details.company` names it, and the message says the way to it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No company has this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["company_relationships"]}},"/v1/lists":{"get":{"operationId":"lists.list","summary":"The workspace's lists, newest first, each with how far its check has come.","description":"The workspace's lists, newest first, each with how far its check has come. Free.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["lists"],"properties":{"lists":{"type":"array","items":{"type":"object","required":["id","name","columns","mapping","status","createdAt","finishedAt","counts"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"mapping":{"type":"object","required":["state","name","address","city","postal","country","website","uei","cage","theirId","address2","email"],"properties":{"state":{"type":["number","null"]},"name":{"type":["number","null"]},"address":{"type":["number","null"]},"city":{"type":["number","null"]},"postal":{"type":["number","null"]},"country":{"type":["number","null"]},"website":{"type":["number","null"]},"uei":{"type":["number","null"]},"cage":{"type":["number","null"]},"theirId":{"type":["number","null"]},"address2":{"type":["number","null"]},"email":{"type":["number","null"]}}},"status":{"type":"string","enum":["checking","done","needs_columns","needs_plan"]},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]},"counts":{"type":"object","required":["rows","waiting","identified","matched","review","unresolved","companies","distinct","lookingUp"],"properties":{"rows":{"type":"number"},"waiting":{"type":"number"},"identified":{"type":"number"},"matched":{"type":"number"},"review":{"type":"number"},"unresolved":{"type":"number"},"companies":{"type":"number"},"distinct":{"type":"object","required":["rows","identified","matched","review","unresolved"],"properties":{"rows":{"type":"number"},"identified":{"type":"number"},"matched":{"type":"number"},"review":{"type":"number"},"unresolved":{"type":"number"}}},"lookingUp":{"type":"number"}}}}}}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["list_lists"]},"post":{"operationId":"lists.create","summary":"Adds a list of companies and starts checking it: text from a spreadsheet (tab separated), a CSV file, or one name a line.","description":"Adds a list of companies and starts checking it: text from a spreadsheet (tab separated), a CSV file, or one name a line. The header names say which column holds the name, your own id, a UEI or CAGE code, and the address; rows with a UEI or CAGE code are matched at once, names as the check reaches them. A list whose header names no such column waits for its columns (lists.columns). Free.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"What to call the list; \"Pasted list\" when left out.","type":"string","maxLength":200},"text":{"type":"string","minLength":1,"description":"The list, as text: CSV, tab separated, or one name a line, with a header row when it has one."}},"required":["text"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["id","name","columns","mapping","status","createdAt","finishedAt","counts"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"mapping":{"type":"object","required":["state","name","address","city","postal","country","website","uei","cage","theirId","address2","email"],"properties":{"state":{"type":["number","null"]},"name":{"type":["number","null"]},"address":{"type":["number","null"]},"city":{"type":["number","null"]},"postal":{"type":["number","null"]},"country":{"type":["number","null"]},"website":{"type":["number","null"]},"uei":{"type":["number","null"]},"cage":{"type":["number","null"]},"theirId":{"type":["number","null"]},"address2":{"type":["number","null"]},"email":{"type":["number","null"]}}},"status":{"type":"string","enum":["checking","done","needs_columns","needs_plan"]},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]},"counts":{"type":"object","required":["rows","waiting","identified","matched","review","unresolved","companies","distinct","lookingUp"],"properties":{"rows":{"type":"number"},"waiting":{"type":"number"},"identified":{"type":"number"},"matched":{"type":"number"},"review":{"type":"number"},"unresolved":{"type":"number"},"companies":{"type":"number"},"distinct":{"type":"object","required":["rows","identified","matched","review","unresolved"],"properties":{"rows":{"type":"number"},"identified":{"type":"number"},"matched":{"type":"number"},"review":{"type":"number"},"unresolved":{"type":"number"}}},"lookingUp":{"type":"number"}}}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged. The list could not be read, is empty, or is larger than a list holds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["check_list"]}},"/v1/lists/{id}":{"get":{"operationId":"lists.get","summary":"One list: how far its check has come (rows identified by UEI or CAGE code, matched by name, to review, with no matching record, still waiting), and a page of its rows as written, each with the company it names and its risk band; `riskCounts` counts the rows by their company's band as last scored.","description":"One list: how far its check has come (rows identified by UEI or CAGE code, matched by name, to review, with no matching record, still waiting), and a page of its rows as written, each with the company it names and its risk band; `riskCounts` counts the rows by their company's band as last scored. Free.","parameters":[{"name":"id","in":"path","required":true,"description":"The list's id, as creating it answers.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"page","in":"query","description":"Which page of rows, from 1.","schema":{"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"status","in":"query","description":"Only the rows in this state.","schema":{"type":"string","enum":["waiting","identified","matched","review","unresolved"]}},{"name":"risk","in":"query","description":"Only the rows whose company has this risk band, as last scored.","schema":{"type":"string","enum":["high","elevated","low","not_enough_checked"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["summary","rows","page","pages","riskCounts"],"properties":{"summary":{"type":"object","required":["id","name","columns","mapping","status","createdAt","finishedAt","counts"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"mapping":{"type":"object","required":["state","name","address","city","postal","country","website","uei","cage","theirId","address2","email"],"properties":{"state":{"type":["number","null"]},"name":{"type":["number","null"]},"address":{"type":["number","null"]},"city":{"type":["number","null"]},"postal":{"type":["number","null"]},"country":{"type":["number","null"]},"website":{"type":["number","null"]},"uei":{"type":["number","null"]},"cage":{"type":["number","null"]},"theirId":{"type":["number","null"]},"address2":{"type":["number","null"]},"email":{"type":["number","null"]}}},"status":{"type":"string","enum":["checking","done","needs_columns","needs_plan"]},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]},"counts":{"type":"object","required":["rows","waiting","identified","matched","review","unresolved","companies","distinct","lookingUp"],"properties":{"rows":{"type":"number"},"waiting":{"type":"number"},"identified":{"type":"number"},"matched":{"type":"number"},"review":{"type":"number"},"unresolved":{"type":"number"},"companies":{"type":"number"},"distinct":{"type":"object","required":["rows","identified","matched","review","unresolved"],"properties":{"rows":{"type":"number"},"identified":{"type":"number"},"matched":{"type":"number"},"review":{"type":"number"},"unresolved":{"type":"number"}}},"lookingUp":{"type":"number"}}}}},"rows":{"type":"array","items":{"type":"object","required":["position","cells","theirId","name","status","company","decidedBy","candidates","found","risk","fields"],"properties":{"position":{"type":"number"},"cells":{"type":"array","items":{"type":"string"}},"theirId":{"type":["string","null"]},"name":{"type":["string","null"]},"status":{"type":"string","enum":["identified","matched","review","unresolved","waiting"]},"company":{"type":["object","null"],"required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"decidedBy":{"type":["string","null"]},"candidates":{"type":"array","items":{"type":"object","required":["id","name","verdict"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"verdict":{"type":"string"}}}},"found":{"type":["object","null"],"required":["name","website","address","pages"],"properties":{"name":{"type":["string","null"]},"website":{"type":["string","null"]},"address":{"type":["string","null"]},"pages":{"type":"array","items":{"type":"string"}}}},"risk":{"type":["string","null"],"enum":["elevated","high","low","not_enough_checked",null]},"fields":{"type":"object","required":["name","address","city","state","postal","country","website","uei","cage"],"properties":{"name":{"type":["string","null"]},"address":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postal":{"type":["string","null"]},"country":{"type":["string","null"]},"website":{"type":["string","null"]},"uei":{"type":["string","null"]},"cage":{"type":["string","null"]}}}}}},"page":{"type":"number"},"pages":{"type":"number"},"riskCounts":{"type":"object","required":["high","elevated","low","not_enough_checked"],"properties":{"high":{"type":"number"},"elevated":{"type":"number"},"low":{"type":"number"},"not_enough_checked":{"type":"number"}}}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No list has this id in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["read_list"]}},"/v1/lists/{id}/columns":{"post":{"operationId":"lists.columns","summary":"Says which of a list's columns holds what, for a list whose header did not, and starts its check.","description":"Says which of a list's columns holds what, for a list whose header did not, and starts its check. Each field takes a column's number from 0, or null; a name, UEI or CAGE column is needed. Free.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The list's id, as creating it answers."},"name":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"theirId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"uei":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"cage":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"address":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"address2":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"city":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"state":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"postal":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"country":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"website":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"email":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["id","name","columns","mapping","status","createdAt","finishedAt","counts"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"mapping":{"type":"object","required":["state","name","address","city","postal","country","website","uei","cage","theirId","address2","email"],"properties":{"state":{"type":["number","null"]},"name":{"type":["number","null"]},"address":{"type":["number","null"]},"city":{"type":["number","null"]},"postal":{"type":["number","null"]},"country":{"type":["number","null"]},"website":{"type":["number","null"]},"uei":{"type":["number","null"]},"cage":{"type":["number","null"]},"theirId":{"type":["number","null"]},"address2":{"type":["number","null"]},"email":{"type":["number","null"]}}},"status":{"type":"string","enum":["checking","done","needs_columns","needs_plan"]},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]},"counts":{"type":"object","required":["rows","waiting","identified","matched","review","unresolved","companies","distinct","lookingUp"],"properties":{"rows":{"type":"number"},"waiting":{"type":"number"},"identified":{"type":"number"},"matched":{"type":"number"},"review":{"type":"number"},"unresolved":{"type":"number"},"companies":{"type":"number"},"distinct":{"type":"object","required":["rows","identified","matched","review","unresolved"],"properties":{"rows":{"type":"number"},"identified":{"type":"number"},"matched":{"type":"number"},"review":{"type":"number"},"unresolved":{"type":"number"}}},"lookingUp":{"type":"number"}}}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No list has this id in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The list's columns are set already.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["set_list_columns"]}},"/v1/lists/{id}/review":{"get":{"operationId":"lists.review","summary":"A list's rows that matching could not settle, oldest first, a page at a time: each row as written, the companies found for it side by side (name, address, where formed, website, identifiers), what matching made of each, and the facts that decided it in plain words.","description":"A list's rows that matching could not settle, oldest first, a page at a time: each row as written, the companies found for it side by side (name, address, where formed, website, identifiers), what matching made of each, and the facts that decided it in plain words. `suggested` is the one company matching found to be the same, when there is exactly one. Free.","parameters":[{"name":"id","in":"path","required":true,"description":"The list's id, as creating it answers.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"page","in":"query","description":"Which page of rows to review, from 1.","schema":{"type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["rows","page","pages","total"],"properties":{"rows":{"type":"array","items":{"type":"object","required":["position","copies","found","theirId","name","address","candidates","suggested"],"properties":{"position":{"type":"number"},"copies":{"type":"number"},"found":{"type":["object","null"],"required":["name","website","address","pages"],"properties":{"name":{"type":["string","null"]},"website":{"type":["string","null"]},"address":{"type":["string","null"]},"pages":{"type":"array","items":{"type":"string"}}}},"theirId":{"type":["string","null"]},"name":{"type":"string"},"address":{"type":["string","null"]},"candidates":{"type":"array","items":{"type":"object","required":["id","name","address","mailingAddress","formedIn","website","identifiers","verdict","facts"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"address":{"type":["string","null"]},"mailingAddress":{"type":["string","null"]},"formedIn":{"type":["string","null"]},"website":{"type":["string","null"]},"identifiers":{"type":"array","items":{"type":"object","required":["scheme","value"],"properties":{"scheme":{"type":"string"},"value":{"type":"string"}}}},"verdict":{"type":"string"},"facts":{"type":"array","items":{"type":"string"}}}}},"suggested":{"type":["string","null"]}}}},"page":{"type":"number"},"pages":{"type":"number"},"total":{"type":"number"}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No list has this id in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["rows_to_review"]}},"/v1/lists/decide":{"post":{"operationId":"lists.decide","summary":"A person's decision on a list's row awaiting review: the id of the company it names (one of those found), \"none\" when it is none of them, or \"undo\" to put a decided row back in review.","description":"A person's decision on a list's row awaiting review: the id of the company it names (one of those found), \"none\" when it is none of them, or \"undo\" to put a decided row back in review. Kept for the workspace, so the same row in a later list is decided at once. Free.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"list":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The list's id, as creating it answers."},"row":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"The row's number in the list, from 1."},"choice":{"type":"string","minLength":1,"maxLength":64,"description":"A company id from the row's candidates, \"none\", or \"undo\"."}},"required":["list","row","choice"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["position","status","entityId"],"properties":{"position":{"type":"number"},"status":{"type":"string"},"entityId":{"type":["string","null"]}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged. The company is not one of those found for this row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No list or row has this id in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The row is not waiting for a decision, or its decision was not a person's.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["decide_row"]}},"/v1/lists/{id}/export":{"get":{"operationId":"lists.export","summary":"A list as CSV: every row as you wrote it, your columns and spelling unchanged, then what the check found: the result, the company with its Sunday Clerk id, UEI, CAGE codes, LEI, CIK, EIN, NPI, FDIC certificate, CRD number, EPA registry ids and link, who decided, and each family of checks (found, no matching record, checking, source stale or unavailable).","description":"A list as CSV: every row as you wrote it, your columns and spelling unchanged, then what the check found: the result, the company with its Sunday Clerk id, UEI, CAGE codes, LEI, CIK, EIN, NPI, FDIC certificate, CRD number, EPA registry ids and link, who decided, and each family of checks (found, no matching record, checking, source stale or unavailable). Free.","parameters":[{"name":"id","in":"path","required":true,"description":"The list's id, as creating it answers.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["name","csv"],"properties":{"name":{"type":"string"},"csv":{"type":"string"}}}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No list has this id in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null}}},"/v1/files":{"get":{"operationId":"files.list","summary":"The workspace's files, newest first, 50 a page: company files, list audits and watch reports, each with its number, what it is about, its status, its verdict or its counts, and its seal.","description":"The workspace's files, newest first, 50 a page: company files, list audits and watch reports, each with its number, what it is about, its status, its verdict or its counts, and its seal. Free.","parameters":[{"name":"page","in":"query","description":"The page, from 1.","schema":{"default":1,"type":"integer","minimum":1,"maximum":10000}},{"name":"list","in":"query","description":"A list's id: its audit alone, sealed when its check finished.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["files","page","pages","total"],"properties":{"files":{"type":"array","items":{"type":"object","required":["id","number","kind","status","subject","company","list","verdict","counts","requestedAt","sealedAt","seal","verifyUrl"],"properties":{"id":{"type":"string"},"number":{"type":"string"},"kind":{"type":"string","enum":["company","list","watch"]},"status":{"type":"string","enum":["failed","making","sealed"]},"subject":{"type":["string","null"]},"company":{"type":["object","null"],"required":["id"],"properties":{"id":{"type":"string"}}},"list":{"type":["object","null"],"required":["id"],"properties":{"id":{"type":"string"}}},"verdict":{"type":["object","null"],"required":["word","label"],"properties":{"word":{"type":"string","enum":["clear","not_clear","review"]},"label":{"type":"string"}}},"counts":{"type":["object","null"],"additionalProperties":{"type":"number"}},"requestedAt":{"type":"string"},"sealedAt":{"type":["string","null"]},"seal":{"type":["object","null"],"required":["sha256","pdfSha256"],"properties":{"sha256":{"type":"string"},"pdfSha256":{"type":["string","null"]}}},"verifyUrl":{"type":"string"}}}},"page":{"type":"number"},"pages":{"type":"number"},"total":{"type":"number"}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["list_files"]},"post":{"operationId":"files.create","summary":"Asks for a sealed file on one company: its record as it stands today, every finding with its evidence, its relationships, what was checked with dates, and a verdict (clear, review or not_clear) by one fixed rule.","description":"Asks for a sealed file on one company: its record as it stands today, every finding with its evidence, its relationships, what was checked with dates, and a verdict (clear, review or not_clear) by one fixed rule. Sealed at once when the company has been checked before; otherwise `status` is making for a minute or two while it is checked, then sealed. The seal is a SHA-256 fingerprint of the file's body; `verifyUrl` lets anyone check a copy. Each plan includes files a month (Starter 2, Pro 10, the trial 2); past them a file is $49.00, bought with `pay: true`. A file that fails is never charged.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string","minLength":5,"maxLength":40,"description":"The company: its id (sc_ and 16 hex characters), its UEI or its CAGE code."},"pay":{"description":"true: when this month's included files are used, buy this one at the price `file_price` names ($49.00), held on the card on file and charged once the file is sealed. Left out, such a request is refused with the price.","type":"boolean"}},"required":["company"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["id","number","kind","status","subject","company","list","verdict","counts","requestedAt","sealedAt","seal","verifyUrl"],"properties":{"id":{"type":"string"},"number":{"type":"string"},"kind":{"type":"string","enum":["company","list","watch"]},"status":{"type":"string","enum":["failed","making","sealed"]},"subject":{"type":["string","null"]},"company":{"type":["object","null"],"required":["id"],"properties":{"id":{"type":"string"}}},"list":{"type":["object","null"],"required":["id"],"properties":{"id":{"type":"string"}}},"verdict":{"type":["object","null"],"required":["word","label"],"properties":{"word":{"type":"string","enum":["clear","not_clear","review"]},"label":{"type":"string"}}},"counts":{"type":["object","null"],"additionalProperties":{"type":"number"}},"requestedAt":{"type":"string"},"sealedAt":{"type":["string","null"]},"seal":{"type":["object","null"],"required":["sha256","pdfSha256"],"properties":{"sha256":{"type":"string"},"pdfSha256":{"type":["string","null"]}}},"verifyUrl":{"type":"string"}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"`plan_required`: files come with the plan, its trial included; the workspace is not on it now. Start or resume it on Billing. `file_price`: this month's included files are used; `details.priceCents` is one more file's price. Ask again with `pay: true` to buy it. `files_after_trial`, `card_needed` or `card_declined`: an extra file could not be paid for; the message says the way on. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No company has this id, UEI or CAGE code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["create_file"]}},"/v1/files/{id}/data":{"get":{"operationId":"files.data","summary":"A sealed file's body as JSON, byte for byte as sealed: its SHA-256 is the file's fingerprint.","description":"A sealed file's body as JSON, byte for byte as sealed: its SHA-256 is the file's fingerprint. Free.","parameters":[{"name":"id","in":"path","required":true,"description":"The file's number.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No sealed file of this workspace has this number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null}}},"/v1/files/{id}/pdf":{"get":{"operationId":"files.pdf","summary":"A sealed file as a PDF, as made when it was sealed: the verdict first, then what turned up, who the company is, what was checked and the seal, then every finding with its evidence.","description":"A sealed file as a PDF, as made when it was sealed: the verdict first, then what turned up, who the company is, what was checked and the seal, then every finding with its evidence. Its SHA-256 is the file's second fingerprint. Free.","parameters":[{"name":"id","in":"path","required":true,"description":"The file's number.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length","__@toStringTag@819"],"properties":{"BYTES_PER_ELEMENT":{"type":"number"},"buffer":{"type":"object","required":["byteLength","maxByteLength","resizable","detached","__@toStringTag@819"],"properties":{"byteLength":{"type":"number"},"maxByteLength":{"type":"number"},"resizable":{"type":"boolean"},"detached":{"type":"boolean"},"__@toStringTag@819":{"type":"string","enum":["ArrayBuffer"]}}},"byteLength":{"type":"number"},"byteOffset":{"type":"number"},"length":{"type":"number"},"__@toStringTag@819":{"type":"string","enum":["Uint8Array"]}}}},"application/pdf":{"schema":{"type":"string"}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No sealed file of this workspace has this number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null}}},"/v1/files/{id}":{"get":{"operationId":"files.get","summary":"One file: its number, what it is about, its status (making, sealed or failed), its verdict, when it was sealed, its fingerprints and its verify link.","description":"One file: its number, what it is about, its status (making, sealed or failed), its verdict, when it was sealed, its fingerprints and its verify link. Free.","parameters":[{"name":"id","in":"path","required":true,"description":"The file's number.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["id","number","kind","status","subject","company","list","verdict","counts","requestedAt","sealedAt","seal","verifyUrl"],"properties":{"id":{"type":"string"},"number":{"type":"string"},"kind":{"type":"string","enum":["company","list","watch"]},"status":{"type":"string","enum":["failed","making","sealed"]},"subject":{"type":["string","null"]},"company":{"type":["object","null"],"required":["id"],"properties":{"id":{"type":"string"}}},"list":{"type":["object","null"],"required":["id"],"properties":{"id":{"type":"string"}}},"verdict":{"type":["object","null"],"required":["word","label"],"properties":{"word":{"type":"string","enum":["clear","not_clear","review"]},"label":{"type":"string"}}},"counts":{"type":["object","null"],"additionalProperties":{"type":"number"}},"requestedAt":{"type":"string"},"sealedAt":{"type":["string","null"]},"seal":{"type":["object","null"],"required":["sha256","pdfSha256"],"properties":{"sha256":{"type":"string"},"pdfSha256":{"type":["string","null"]}}},"verifyUrl":{"type":"string"}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No file of this workspace has this number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["get_file"]}},"/v1/watch":{"get":{"operationId":"watch.list","summary":"The companies the workspace watches, newest watch first, fifty a page, each with when its watch began and its owner in the workspace, if any.","description":"The companies the workspace watches, newest watch first, fifty a page, each with when its watch began and its owner in the workspace, if any. Free.","parameters":[{"name":"page","in":"query","description":"Which page, from 1.","schema":{"type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["companies","total","page","pages"],"properties":{"companies":{"type":"array","items":{"type":"object","required":["id","name","since","owner"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"since":{"type":"string"},"owner":{"type":["object","null"],"required":["userId","email"],"properties":{"userId":{"type":"string"},"email":{"type":"string"}}}}}},"total":{"type":"number"},"page":{"type":"number"},"pages":{"type":"number"}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["watched_companies"]},"post":{"operationId":"watch.add","summary":"Watches companies: those named by id, or every company a list matched or identified.","description":"Watches companies: those named by id, or every company a list matched or identified. Alerts start now; nothing from before is sent. Answers how many were added and how many the workspace watches. Needs the plan or its trial.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyIds":{"description":"Company ids (sc_ and 16 hex characters).","maxItems":1000,"type":"array","items":{"type":"string","pattern":"^sc_[0-9a-f]{16}$"}},"listId":{"description":"A list's id: every company it matched or identified.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["added","watching"],"properties":{"added":{"type":"number"},"watching":{"type":"number"}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"`plan_required`: watching comes with the plan, its trial included; the workspace is not on it now. Start or resume it on Billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No list, or no company, has these ids in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`increase_needed`: the companies take the plan past what it is billed for; `details.increase` says to how many and the new price. Nothing is watched until the account's owner raises the plan on Billing. `plan_limit`: the companies take the workspace past what its plan holds (Pro holds 250; more is Enterprise, by contract). Nothing is watched.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["watch_companies"]}},"/v1/watch/{companyId}":{"delete":{"operationId":"watch.remove","summary":"Stops watching a company.","description":"Stops watching a company. Its history stays; no further alert is sent for it. Answers how many the workspace still watches. Free.","parameters":[{"name":"companyId","in":"path","required":true,"description":"The company's id.","schema":{"type":"string","pattern":"^sc_[0-9a-f]{16}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["watching"],"properties":{"watching":{"type":"number"}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`watch_list_kept`: while the plan is paused, the watch list is kept as it was; resume the plan on Billing to change it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["stop_watching"]}},"/v1/watch/owner":{"post":{"operationId":"watch.owner","summary":"Gives a watched company an owner in the workspace, or none: its alerts go to that person alone, and with none to everyone in the workspace.","description":"Gives a watched company an owner in the workspace, or none: its alerts go to that person alone, and with none to everyone in the workspace. Answers the owner. Free.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string","pattern":"^sc_[0-9a-f]{16}$","description":"The company's id."},"owner":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"The id of a person in this workspace, or null for no owner."}},"required":["company","owner"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["owner"],"properties":{"owner":{"type":["object","null"],"required":["userId","email"],"properties":{"userId":{"type":"string"},"email":{"type":"string"}}}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The workspace does not watch this company, or no one in it has this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["set_company_owner"]}},"/v1/webhooks":{"get":{"operationId":"webhooks.list","summary":"The workspace's webhook endpoints, their delivery health, and how deliveries are signed.","description":"The workspace's webhook endpoints, their delivery health, and how deliveries are signed. Free.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["endpoints","signature"],"properties":{"endpoints":{"type":"array","items":{"type":"object","required":["id","url","status","consecutiveFailures","lastSuccessAt","lastError","createdAt"],"properties":{"id":{"type":"string"},"url":{"type":"string"},"status":{"type":"string"},"consecutiveFailures":{"type":"number"},"lastSuccessAt":{"type":["string","null"],"format":"date-time"},"lastError":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}}}},"signature":{"type":"object","required":["header","format","toleranceSeconds"],"properties":{"header":{"type":"string","enum":["SundayClerk-Signature"]},"format":{"type":"string","enum":["t=<unix-seconds>,v1=<hex hmac-sha256 of `${t}.${rawBody}`>"]},"toleranceSeconds":{"type":"number","enum":[300]}}}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null}},"post":{"operationId":"webhooks.create","summary":"Add an HTTPS endpoint.","description":"Add an HTTPS endpoint. The signing secret is in this response only. Free.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2000,"description":"A public HTTPS URL."}},"required":["url"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["signature","id","url","signingSecret"],"properties":{"signature":{"type":"object","required":["header","format","toleranceSeconds"],"properties":{"header":{"type":"string","enum":["SundayClerk-Signature"]},"format":{"type":"string","enum":["t=<unix-seconds>,v1=<hex hmac-sha256 of `${t}.${rawBody}`>"]},"toleranceSeconds":{"type":"number","enum":[300]}}},"id":{"type":"string"},"url":{"type":"string"},"signingSecret":{"type":"string"}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged. `invalid_url`: the URL is not a public HTTPS address without embedded credentials. `endpoint_limit`: the workspace already has the most endpoints it may.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null}}},"/v1/webhooks/{id}":{"delete":{"operationId":"webhooks.delete","summary":"Remove an endpoint.","description":"Remove an endpoint. Deliveries stop now; it and its delivery history are deleted 30 days later, and until then it can be restored in the app. Free.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["id","status","deletedForGoodAt"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["disabled"]},"deletedForGoodAt":{"type":"string"}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`: no endpoint with that id in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null}}},"/v1/webhooks/{id}/test":{"post":{"operationId":"webhooks.test","summary":"Send the endpoint a signed test event now, the same as a real one, to check it receives and verifies deliveries.","description":"Send the endpoint a signed test event now, the same as a real one, to check it receives and verifies deliveries. Its delivery shows in the endpoint's health. Free.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200}},"required":["id"],"additionalProperties":false}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["queued"],"properties":{"queued":{"type":"boolean","enum":[true]}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`: no endpoint with that id in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null}}},"/v1/usage":{"get":{"operationId":"usage.get","summary":"The workspace's plan; its questions, with what its grants include, have left and have used; and what was used each day (MST) and from where (app, api, mcp).","description":"The workspace's plan; its questions, with what its grants include, have left and have used; and what was used each day (MST) and from where (app, api, mcp). Free.","parameters":[{"name":"days","in":"query","description":"How many days of use to list, newest first; 30 when left out.","schema":{"type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["plan","questions","days"],"properties":{"plan":{"type":"string","enum":["free","pro","starter"]},"questions":{"type":"object","required":["included","left","used","grants"],"properties":{"included":{"type":"number"},"left":{"type":"number"},"used":{"type":"number"},"grants":{"type":"array","items":{"type":"object","required":["source","quantity","left","expiresAt"],"properties":{"source":{"type":"string","enum":["operator","pro","signup"]},"quantity":{"type":"number"},"left":{"type":"number"},"expiresAt":{"type":["string","null"]}}}}}},"days":{"type":"array","items":{"type":"object","required":["day","surface","questions"],"properties":{"day":{"type":"string"},"surface":{"type":"string"},"questions":{"type":"number"}}}}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null}}},"/v1/asks":{"post":{"operationId":"asks.create","summary":"Asks a question about companies: those the workspace watches or has on its lists, or any company it names.","description":"Asks a question about companies: those the workspace watches or has on its lists, or any company it names. The answer is written from company records: every figure and record in it is measured from them and cited. Answers the question's answer once it is ready, or after `wait` seconds as it stands (its `status` still `planning`, `measuring`, `writing` or `checking`): read it later by its id. A follow-up names its conversation with `threadId`. Counts one question once the answer is final.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","minLength":1,"maxLength":1000,"description":"The question, in plain words."},"companyId":{"description":"The company the question is about, when it is asked from that company (\"this company\").","type":"string","pattern":"^sc_[0-9a-f]{16}$"},"threadId":{"description":"The conversation to continue: its first answer's id.","type":"string","pattern":"^ans_[0-9a-f]{32}$"},"wait":{"description":"Seconds to wait for the answer, up to 50; 0 answers at once with the question's id. 50 by default.","type":"integer","minimum":0,"maximum":50}},"required":["question"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["id","threadId","question","status","parts","followUps","companies","choices","unmatched","counted","createdAt","finishedAt"],"properties":{"id":{"type":"string"},"threadId":{"type":"string"},"question":{"type":"string"},"status":{"type":"string"},"parts":{"type":["array","null"],"items":{"anyOf":[{"type":"object","required":["type","key","company","companyId","source","dataset","label","on","cite"],"properties":{"type":{"type":"string","enum":["record"]},"key":{"type":"string"},"company":{"type":"string"},"companyId":{"type":"string"},"source":{"type":"string"},"dataset":{"type":"string"},"label":{"type":"string"},"on":{"type":["string","null"]},"cite":{"type":"object","required":["source","kind","key","fileOf"],"properties":{"source":{"type":"string"},"kind":{"type":"string"},"key":{"type":"string"},"fileOf":{"type":["string","null"]}}}}},{"type":"object","required":["type","key","value","about","kind"],"properties":{"type":{"type":"string","enum":["fact"]},"key":{"type":"string"},"value":{"type":"string"},"about":{"type":"string"},"kind":{"type":"string","enum":["count","date","id","label","money"]}}},{"type":"object","required":["type","text"],"properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}}}]}},"followUps":{"type":"array","items":{"type":"string"}},"companies":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"choices":{"type":"array","items":{"type":"object","required":["asked","companies"],"properties":{"asked":{"type":"string"},"companies":{"type":"array","items":{"type":"object","required":["id","name","place"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"place":{"type":["string","null"]}}}}}}},"unmatched":{"type":"array","items":{"type":"string"}},"counted":{"type":"boolean"},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"`allowance_used`: the workspace has used its questions for now; `details.renewsAt` says when more come.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The conversation named is not in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["ask"]}},"/v1/asks/thread":{"get":{"operationId":"asks.thread","summary":"A conversation: every question asked in it and its answer, in the order asked.","description":"A conversation: every question asked in it and its answer, in the order asked. Free.","parameters":[{"name":"thread","in":"query","required":true,"description":"The conversation's id: its first answer's id.","schema":{"type":"string","pattern":"^ans_[0-9a-f]{32}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["answers"],"properties":{"answers":{"type":"array","items":{"type":"object","required":["id","threadId","question","status","parts","followUps","companies","choices","unmatched","counted","createdAt","finishedAt"],"properties":{"id":{"type":"string"},"threadId":{"type":"string"},"question":{"type":"string"},"status":{"type":"string"},"parts":{"type":["array","null"],"items":{"anyOf":[{"type":"object","required":["type","key","company","companyId","source","dataset","label","on","cite"],"properties":{"type":{"type":"string","enum":["record"]},"key":{"type":"string"},"company":{"type":"string"},"companyId":{"type":"string"},"source":{"type":"string"},"dataset":{"type":"string"},"label":{"type":"string"},"on":{"type":["string","null"]},"cite":{"type":"object","required":["source","kind","key","fileOf"],"properties":{"source":{"type":"string"},"kind":{"type":"string"},"key":{"type":"string"},"fileOf":{"type":["string","null"]}}}}},{"type":"object","required":["type","key","value","about","kind"],"properties":{"type":{"type":"string","enum":["fact"]},"key":{"type":"string"},"value":{"type":"string"},"about":{"type":"string"},"kind":{"type":"string","enum":["count","date","id","label","money"]}}},{"type":"object","required":["type","text"],"properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}}}]}},"followUps":{"type":"array","items":{"type":"string"}},"companies":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"choices":{"type":"array","items":{"type":"object","required":["asked","companies"],"properties":{"asked":{"type":"string"},"companies":{"type":"array","items":{"type":"object","required":["id","name","place"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"place":{"type":["string","null"]}}}}}}},"unmatched":{"type":"array","items":{"type":"string"}},"counted":{"type":"boolean"},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]}}}}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No conversation in this workspace has this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["conversation"]}},"/v1/asks/{answerId}":{"get":{"operationId":"asks.get","summary":"An answer as it stands: while it is made, its `status` (`planning`, `measuring`, `writing`, `checking`); then `final`, `refused` or `failed`, with its parts (text, each figure with what it measures, each record with its source and citation), the companies it read and three follow-up questions.","description":"An answer as it stands: while it is made, its `status` (`planning`, `measuring`, `writing`, `checking`); then `final`, `refused` or `failed`, with its parts (text, each figure with what it measures, each record with its source and citation), the companies it read and three follow-up questions. Free.","parameters":[{"name":"answerId","in":"path","required":true,"description":"The answer's id.","schema":{"type":"string","pattern":"^ans_[0-9a-f]{32}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["id","threadId","question","status","parts","followUps","companies","choices","unmatched","counted","createdAt","finishedAt"],"properties":{"id":{"type":"string"},"threadId":{"type":"string"},"question":{"type":"string"},"status":{"type":"string"},"parts":{"type":["array","null"],"items":{"anyOf":[{"type":"object","required":["type","key","company","companyId","source","dataset","label","on","cite"],"properties":{"type":{"type":"string","enum":["record"]},"key":{"type":"string"},"company":{"type":"string"},"companyId":{"type":"string"},"source":{"type":"string"},"dataset":{"type":"string"},"label":{"type":"string"},"on":{"type":["string","null"]},"cite":{"type":"object","required":["source","kind","key","fileOf"],"properties":{"source":{"type":"string"},"kind":{"type":"string"},"key":{"type":"string"},"fileOf":{"type":["string","null"]}}}}},{"type":"object","required":["type","key","value","about","kind"],"properties":{"type":{"type":"string","enum":["fact"]},"key":{"type":"string"},"value":{"type":"string"},"about":{"type":"string"},"kind":{"type":"string","enum":["count","date","id","label","money"]}}},{"type":"object","required":["type","text"],"properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}}}]}},"followUps":{"type":"array","items":{"type":"string"}},"companies":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"choices":{"type":"array","items":{"type":"object","required":["asked","companies"],"properties":{"asked":{"type":"string"},"companies":{"type":"array","items":{"type":"object","required":["id","name","place"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"place":{"type":["string","null"]}}}}}}},"unmatched":{"type":"array","items":{"type":"string"}},"counted":{"type":"boolean"},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]}}}}}},"400":{"description":"`invalid_input`: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: no API key, or one that is not valid or whose workspace is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`not_in_plan`: the account's plan does not include this call. The API comes with Pro. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No answer in this workspace has this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-cost":{"meter":null},"x-mcp-tool":["answer"]}},"/v1/agent/register":{"post":{"operationId":"agent.register","summary":"Starts an agent's sign-up for the person it works for: returns a setup link and code to show that person, and a claim_token to poll with.","description":"Starts an agent's sign-up for the person it works for: returns a setup link and code to show that person, and a claim_token to poll with. The person signs in or signs up, approves the agent, and the next poll returns an API key.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","minLength":3,"maxLength":254,"description":"The email of the person you are setting this up for. They sign in or sign up with it."},"key_name":{"description":"The name of the API key that will be created, such as the project it is for. Defaults to Agent.","type":"string","minLength":1,"maxLength":60},"client_name":{"description":"Your own name, such as Claude Code, Codex or Cursor. The person sees it when they approve.","type":"string","minLength":1,"maxLength":60}},"required":["email"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["setup","claim_token","key_name"],"properties":{"setup":{"type":"object","required":["verification_uri","verification_uri_complete","user_code","expires_in","interval"],"properties":{"verification_uri":{"type":"string"},"verification_uri_complete":{"type":"string"},"user_code":{"type":"string"},"expires_in":{"type":"number"},"interval":{"type":"number"}}},"claim_token":{"type":"string"},"key_name":{"type":"string"}}}}}},"400":{"description":"`invalid_input`: an unknown field, or email is not an email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limit_exceeded`: more than 10 setups an hour from this address or 5 a day for this email. Stop and tell the person; do not retry in a loop. `rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agent/token":{"post":{"operationId":"agent.token","summary":"Polls an agent sign-up: authorization_pending until the person approves, then the new workspace API key, once.","description":"Polls an agent sign-up: authorization_pending until the person approves, then the new workspace API key, once.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"claim_token":{"type":"string","minLength":10,"maxLength":200,"description":"The claim_token from POST /v1/agent/register. Keep it in memory only."}},"required":["claim_token"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["api_key","key_name","key_prefix"],"properties":{"api_key":{"type":"string"},"key_name":{"type":"string"},"key_prefix":{"type":"string"}}}}}},"400":{"description":"`authorization_pending`: the person has not approved yet, poll again after `interval` seconds. `slow_down`: you polled too soon. `expired_token`: the code expired, start again. `access_denied`: the person declined. `invalid_grant`: the claim_token is unknown or was already used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: more requests than one key or address may send in a short time; `retryAfterSec` and Retry-After say when to try again. Nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}}},"default":{"description":"Anything else, for example `internal` when something went wrong on our side. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"finding.corrected":{"post":{"operationId":"event.finding.corrected","description":"Sent when a newer version of a record you were told about changes it: the change as it now stands, and the file it corrects.","parameters":[{"name":"SundayClerk-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"SundayClerk-Event","in":"header","required":true,"schema":{"type":"string"}},{"name":"SundayClerk-Delivery","in":"header","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","idempotencyKey","createdAt","data"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["finding.corrected"]},"idempotencyKey":{"type":"string"},"createdAt":{"type":"string"},"data":{"type":"object","required":["source","file","changes"],"properties":{"source":{"type":"object","required":["publisher","dataset"],"properties":{"publisher":{"type":"string"},"dataset":{"type":"string"}}},"file":{"type":"object","required":["publishedOn"],"properties":{"publishedOn":{"type":"string"}}},"changes":{"type":"array","items":{"type":"object","required":["corrects","company","type","what","on","material","record"],"properties":{"corrects":{"type":"object","required":["publishedOn"],"properties":{"publishedOn":{"type":"string"}}},"company":{"type":"object","required":["id","name","url"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}},"type":{"type":"string"},"what":{"type":"string"},"on":{"type":"string"},"material":{"type":"boolean"},"record":{"type":"object","required":["key"],"properties":{"key":{"type":"string"}}}}}}}}}}}}},"responses":{"2XX":{"description":"Received. Any other answer is retried."}}}},"finding.created":{"post":{"operationId":"event.finding.created","description":"Sent when a new file changes companies your workspace watches: once per file, every change in it, each with the company, what happened, the record's own date and the record it rests on. Sent only for changes made after a company was watched.","parameters":[{"name":"SundayClerk-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"SundayClerk-Event","in":"header","required":true,"schema":{"type":"string"}},{"name":"SundayClerk-Delivery","in":"header","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","idempotencyKey","createdAt","data"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["finding.created"]},"idempotencyKey":{"type":"string"},"createdAt":{"type":"string"},"data":{"type":"object","required":["source","file","changes"],"properties":{"source":{"type":"object","required":["publisher","dataset"],"properties":{"publisher":{"type":"string"},"dataset":{"type":"string"}}},"file":{"type":"object","required":["publishedOn"],"properties":{"publishedOn":{"type":"string"}}},"changes":{"type":"array","items":{"type":"object","required":["company","type","what","on","material","record"],"properties":{"company":{"type":"object","required":["id","name","url"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}},"type":{"type":"string"},"what":{"type":"string"},"on":{"type":"string"},"material":{"type":"boolean"},"record":{"type":"object","required":["key"],"properties":{"key":{"type":"string"}}}}}}}}}}}}},"responses":{"2XX":{"description":"Received. Any other answer is retried."}}}},"webhook.test":{"post":{"operationId":"event.webhook.test","description":"Sent to one endpoint when its owner asks for a test event. Nothing happened: it is there to check that the endpoint receives deliveries and verifies their signature.","parameters":[{"name":"SundayClerk-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"SundayClerk-Event","in":"header","required":true,"schema":{"type":"string"}},{"name":"SundayClerk-Delivery","in":"header","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","idempotencyKey","createdAt","data"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["webhook.test"]},"idempotencyKey":{"type":"string"},"createdAt":{"type":"string"},"data":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}}},"responses":{"2XX":{"description":"Received. Any other answer is retried."}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key created in the Sunday Clerk app."}},"schemas":{"Error":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"A stable code, for example invalid_input, unauthorized, allowance_used or not_found."},"message":{"type":"string","description":"One plain sentence saying what to change."},"details":{"type":"object","additionalProperties":{}}}}}}}