{"openapi":"3.1.0","info":{"title":"Spore API","version":"2026-09-06","description":"Public REST API for Spore, projected from the executable operation registry. The whole surface as one agent-readable guide: /api/v1/llms.txt"},"servers":[{"url":""}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","minLength":1,"description":"Machine-readable error code"},"message":{"type":"string","minLength":1,"description":"Human-readable description"},"details":{"description":"Field-level details included for validation errors; omitted for other errors.","type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"code":{"description":"Machine-readable validation code, e.g. UNKNOWN_FIELD, UNSUPPORTED_OPERATOR, MISSING_PARAM, INVALID_VALUE, INVALID_FILTER.","type":"string"},"operator":{"description":"The operator id the rejected rule named, where one applies.","type":"string"}},"required":["field","message"],"additionalProperties":false}},"required":{"description":"Credits this call was quoted at. Present on spend rejections.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"available":{"description":"Credits still spendable under the binding constraint — the organization balance on `insufficient_credits`, the remaining key budget on `key_budget_exhausted`.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bound":{"description":"The configured ceiling that was hit: the per-request cap on `request_cap_exceeded`, the rolling budget on `key_budget_exhausted`, the declared `maxCredits` on `max_credits_exceeded`, the 50,000 import cap on `population_exceeds_cap`.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"count":{"description":"Companies the request's filter matched, on `population_exceeds_cap` and `empty_population`.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"periodDays":{"description":"Length in days of the rolling budget window, on `key_budget_exhausted`.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"mode":{"description":"The key mode on a mode refusal.","type":"string"},"current":{"description":"The resource's current state on a conditional-write conflict, so the caller can re-apply without a second round trip."},"namespace":{"type":"string"},"boundary":{"type":"string"},"tool":{"type":"string"},"companyIds":{"type":"array","items":{"type":"string"}},"nextEligibleAt":{"type":"string"},"door":{"type":"string"},"creditsPerCompany":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"existingEnrichmentId":{"type":"string"},"errors":{"type":"array","items":{}},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"requiredCredits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxCredits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expected":{"type":"string"},"received":{"type":"string"},"currentVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currentEtag":{"type":"string"},"requiredScope":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"field":{"description":"The filter field that rejected this request, when applicable.","type":"string"},"operator":{"description":"The filter operator that rejected this request, when applicable.","type":"string"},"retryAfter":{"description":"Seconds to wait before retrying. A refusal that carries it also sends the same seconds on a `Retry-After` header.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"row":{"description":"The request row a batch refusal is about, zero-based.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"requested":{"description":"What the refused request asked for, in the unit `limit` is expressed in.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"counts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["error","message"],"additionalProperties":{}},"DomainFinderResult":{"type":"object","description":"Domain finder workflow result","properties":{"domain":{"type":"string","description":"Discovered domain"},"confidence":{"type":"string","enum":["high","medium"]},"resolvedDomain":{"type":"string","description":"Settled host when the input domain redirected offsite."},"redirectChain":{"type":"array","description":"Ordered redirect hosts, present when resolvedDomain is set.","items":{"type":"string"}},"performance":{"type":"object","required":["loadTimeMs","pageSpeedScore"],"properties":{"loadTimeMs":{"type":"number"},"pageSpeedScore":{"type":"number"}}},"enrichedDomain":{"type":"object","properties":{"ssl":{"type":["object","null"],"required":["valid","issuer","expiresAt"],"properties":{"valid":{"type":"boolean"},"issuer":{"type":"string"},"expiresAt":{"type":"string"}}},"registration":{"type":["object","null"],"required":["ageInDays","ageCategory","registrar","createdAt","updatedAt","expiresAt"],"properties":{"ageInDays":{"type":"number"},"ageCategory":{"type":"string","enum":["new","established","mature","legacy"]},"registrar":{"type":["string","null"]},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]}}},"emailStack":{"type":["object","null"],"required":["provider","mxRecords","spfRecord","dkimRecords","dmarcRecord","dmarcPolicy"],"properties":{"provider":{"type":["string","null"]},"mxRecords":{"type":"array","items":{"type":"string"}},"spfRecord":{"type":["string","null"]},"dkimRecords":{"type":"array","items":{"type":"object","required":["selector","record"],"properties":{"selector":{"type":"string"},"record":{"type":"string"}}}},"dmarcRecord":{"type":["string","null"]},"dmarcPolicy":{"type":["string","null"]}}}}},"responsive":{"type":"boolean"},"activityMatchPercentage":{"type":"number","minimum":0,"maximum":100},"activityMismatch":{"type":"boolean"},"isRelatedEntity":{"type":"boolean"},"botProtection":{"$ref":"#/components/schemas/BotProtectionResult"},"linkedin":{"type":["object","null"],"required":["url","confidence"],"description":"Official LinkedIn company page, or null when it could not be resolved","properties":{"url":{"type":"string","description":"Canonical https://www.linkedin.com/company/<slug>"},"confidence":{"type":"string","enum":["high","medium"]}}}}},"BotProtectionResult":{"type":["object","null"],"description":"Bot-management gateway detection result. null when botProtection field is absent from the result.","properties":{"provider":{"type":["string","null"],"description":"Detected bot-management provider, or null if none detected","enum":["cloudflare","akamai","aws-waf","datadome","imperva","sucuri","perimeterx","queue-it","f5-bigip","fastly","azure-front-door","kasada","reblaze","stackpath","barracuda","fortiweb","generic-waf",null]},"status":{"type":"string","description":"Classification of the bot-protection interaction","enum":["none","cdn-open","waf-open","challenge","blocked","origin-error"]},"chain":{"type":"array","description":"Secondary providers detected (e.g. CDN fronting a WAF)","items":{"type":"string","enum":["cloudflare","akamai","aws-waf","datadome","imperva","sucuri","perimeterx","queue-it","f5-bigip","fastly","azure-front-door","kasada","reblaze","stackpath","barracuda","fortiweb","generic-waf"]}}}},"CompanyAddress":{"type":"object","required":["type","street","city","postalCode","region","municipality","municipalityCode","regionCode","rawAddress"],"properties":{"type":{"type":"string","enum":["legal","postal","office"],"nullable":true},"street":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"postalCode":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"municipality":{"type":"string","nullable":true},"municipalityCode":{"type":"string","nullable":true},"regionCode":{"type":"string","nullable":true},"rawAddress":{"type":"string","nullable":true}}},"CompanyResponse":{"type":"object","required":["primaryId","countryCode","legalName","name","legalForm","legalFormFull","legalFormCategory","legalFormCategoryName","status","city","region","registrationDate","updatedAt","primaryIdentifier","website","email","phone","address","latestFinancials","primaryActivity","activities","contacts","addresses","financials","identifiers","people","relatedCompanies"],"properties":{"primaryId":{"type":"string"},"countryCode":{"type":"string","minLength":2,"maxLength":2},"legalName":{"type":"string"},"name":{"type":"string","nullable":true},"legalForm":{"type":"string","nullable":true},"legalFormFull":{"type":"string","nullable":true},"legalFormCategory":{"type":"string","nullable":true},"legalFormCategoryName":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"registrationDate":{"type":"string","format":"date","nullable":true},"updatedAt":{"type":"number","nullable":true},"primaryIdentifier":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"latestFinancials":{"type":"object","nullable":true,"required":["year","revenue","profit","employees"],"properties":{"year":{"type":"integer"},"revenue":{"type":"number","nullable":true},"profit":{"type":"number","nullable":true},"employees":{"type":"number","nullable":true}}},"primaryActivity":{"type":"object","nullable":true,"required":["code","section","name"],"properties":{"code":{"type":"string"},"section":{"type":"string","nullable":true},"name":{"type":"string","nullable":true}}},"activities":{"type":"array","items":{"type":"object","required":["code","name","section","naceRevision","isPrimary"],"properties":{"code":{"type":"string"},"name":{"type":"string","nullable":true},"section":{"type":"string","nullable":true},"naceRevision":{"type":"string"},"isPrimary":{"type":"boolean"}}}},"contacts":{"type":"object","required":["email","phone","website"],"properties":{"email":{"type":"array","items":{"type":"string"}},"phone":{"type":"array","items":{"type":"string"}},"website":{"type":"array","items":{"type":"string"}}}},"addresses":{"type":"object","required":["legal","postal","office","other"],"properties":{"legal":{"type":"array","items":{"$ref":"#/components/schemas/CompanyAddress"}},"postal":{"type":"array","items":{"$ref":"#/components/schemas/CompanyAddress"}},"office":{"type":"array","items":{"$ref":"#/components/schemas/CompanyAddress"}},"other":{"type":"array","items":{"$ref":"#/components/schemas/CompanyAddress"}}}},"financials":{"type":"object","additionalProperties":{"type":"object","required":["revenue","profit","employees"],"properties":{"revenue":{"type":"number","nullable":true},"profit":{"type":"number","nullable":true},"employees":{"type":"number","nullable":true}}}},"identifiers":{"type":"array","items":{"type":"object","required":["type","registry","value","isPrimary"],"properties":{"type":{"type":"string"},"registry":{"type":"string"},"value":{"type":"string"},"isPrimary":{"type":"boolean"}}}},"people":{"type":"array","items":{"type":"object","required":["name","firstName","lastName","role","roleDetails","sharePercent","startDate","endDate"],"properties":{"name":{"type":"string"},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"role":{"type":"string"},"roleDetails":{"type":"string","nullable":true},"sharePercent":{"type":"number","nullable":true},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true}}}},"relatedCompanies":{"type":"array","items":{"type":"object","required":["name","type","role","sharePercent","primaryId","countryCode"],"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["shareholder","subsidiary"]},"role":{"type":"string"},"sharePercent":{"type":"number","nullable":true},"primaryId":{"type":"string","nullable":true},"countryCode":{"type":"string","nullable":true},"summary":{"type":"object","nullable":true,"properties":{"legalName":{"type":"string","nullable":true},"locality":{"type":"string","nullable":true},"legalForm":{"type":"string","nullable":true},"registrationDate":{"type":"string","format":"date","nullable":true},"primaryActivity":{"type":"object","nullable":true,"properties":{"section":{"type":"string","nullable":true},"code":{"type":"string","nullable":true},"name":{"type":"string","nullable":true}}},"latestFinancials":{"type":"object","nullable":true,"properties":{"year":{"type":"integer"},"revenue":{"type":"number","nullable":true},"profit":{"type":"number","nullable":true},"employees":{"type":"integer","nullable":true},"currency":{"type":"string","nullable":true}}}}}}}},"quarterlyData":{"type":"object"},"revenueByActivity":{"type":"object"},"revenueByGeography":{"type":"object"}}},"NaceTree":{"type":"object","required":["naceRevision","source","sections"],"description":"Full or section-scoped NACE Rev 2.1 tree. Always uses the `sections: [...]` shape, so a section-scoped response is an array with one entry.","properties":{"naceRevision":{"type":"string","enum":["2.1"]},"source":{"type":"string","format":"uri"},"sections":{"type":"array","items":{"type":"object","required":["code","name","divisions"],"properties":{"code":{"type":"string","description":"1-letter section code (A–V)"},"name":{"type":"string"},"divisions":{"type":"array","items":{"type":"object","required":["code","description","groups"],"properties":{"code":{"type":"string","description":"2-digit division code"},"description":{"type":"string"},"groups":{"type":"array","items":{"type":"object","required":["code","display","description","classes"],"properties":{"code":{"type":"string","description":"3-digit dotless group code"},"display":{"type":"string","description":"Dotted form (e.g. `50.1`)"},"description":{"type":"string"},"classes":{"type":"array","items":{"type":"object","required":["code","display","description"],"properties":{"code":{"type":"string","description":"4-digit dotless class code — the canonical wire format for downstream NACE class payloads"},"display":{"type":"string","description":"Dotted form (e.g. `50.10`)"},"description":{"type":"string"}}}}}}}}}}}}}}},"NaceFlat":{"type":"object","required":["naceRevision","source","level","count","codes"],"description":"Denormalized flat class list. Every row carries its parent codes so the payload can be fed directly into a JSON Schema `enum` for constrained decoding.","properties":{"naceRevision":{"type":"string","enum":["2.1"]},"source":{"type":"string","format":"uri"},"level":{"type":"string","enum":["class"]},"count":{"type":"integer"},"codes":{"type":"array","items":{"type":"object","required":["code","display","description","section","division","group"],"properties":{"code":{"type":"string"},"display":{"type":"string"},"description":{"type":"string"},"section":{"type":"string"},"division":{"type":"string"},"group":{"type":"string"}}}}}},"catalogInput":{"type":"object","properties":{"section":{"type":"string","enum":["tools","filters","knowledge","nace"]},"format":{"default":"json","type":"string","enum":["json","text"]},"level":{"default":"tree","type":"string","enum":["tree","class"]},"naceSection":{"type":"string"}},"required":["section"]},"catalogOutput":{"anyOf":[{"type":"object","properties":{"tools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"path":{"type":"string"},"credits":{"type":"integer","minimum":0,"maximum":9007199254740991},"creditsMax":{"type":"integer","minimum":0,"maximum":9007199254740991},"billingNote":{"type":"string"},"inputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"exampleInput":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","name","description","path","credits","inputSchema","exampleInput"],"additionalProperties":false}}},"required":["tools"],"additionalProperties":false},{"type":"object","properties":{"schema":{"type":"string"},"liveCountries":{"type":"array","items":{"type":"string"}},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"operators":{"type":"array","items":{"type":"string"}},"enumValues":{"type":"array","items":{"type":"string"}},"enumLabels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"params":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"default":{},"options":{"type":"array","items":{}}},"required":["name","type","label"],"additionalProperties":false}}},"required":["id","type","label","operators"],"additionalProperties":false}},"operators":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"valueRequired":{"type":"boolean"},"multiValue":{"type":"boolean"}},"required":["id","label","valueRequired","multiValue"],"additionalProperties":false}}},"required":["schema","liveCountries","fields","operators"],"additionalProperties":false},{"type":"object","properties":{"namespaces":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"owner":{"type":"string","enum":["native","organization"],"description":"`native`: a Spore tool owns it. `organization`: you do."},"description":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"ref":{"type":"string","description":"`namespace.field`, the key every door speaks."},"type":{"type":"string","enum":["string","number","boolean","date","company_ref","json"]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"dimension":{"anyOf":[{"type":"string"},{"type":"null"}]},"freshnessDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"description":{"type":"string"},"promotes":{"anyOf":[{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"domain"}},"required":["to"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"identifier"},"country":{"description":"Registration identifier: the country whose registry issues the scheme."},"scheme":{"type":"string","minLength":1,"maxLength":32,"description":"Registration identifier: the scheme, e.g. `KRS`."},"system":{"type":"string","minLength":1,"maxLength":64,"description":"Own-system identifier: your name for the system."}},"required":["to"],"additionalProperties":false}]},{"type":"null"}]},"frozen":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["name","ref","type","unit","dimension","freshnessDays","description","promotes","frozen","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["name","owner","description","fields","createdAt","updatedAt"],"additionalProperties":false}}},"required":["namespaces"],"additionalProperties":false},{"type":"object","properties":{"naceRevision":{"type":"string"},"source":{"type":"string","format":"uri"},"sections":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"divisions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"display":{"type":"string"},"description":{"type":"string"},"classes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"display":{"type":"string"},"description":{"type":"string"}},"required":["code","display","description"],"additionalProperties":false}}},"required":["code","display","description","classes"],"additionalProperties":false}}},"required":["code","description","groups"],"additionalProperties":false}}},"required":["code","name","divisions"],"additionalProperties":false}}},"required":["naceRevision","source","sections"],"additionalProperties":false},{"type":"object","properties":{"naceRevision":{"type":"string"},"source":{"type":"string","format":"uri"},"level":{"type":"string","const":"class"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"codes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"display":{"type":"string"},"description":{"type":"string"},"section":{"type":"string"},"division":{"type":"string"},"group":{"type":"string"}},"required":["code","display","description","section","division","group"],"additionalProperties":false}}},"required":["naceRevision","source","level","count","codes"],"additionalProperties":false},{"type":"string"}]},"key-createInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["commons:publish","company:read","company:write","company:unlock","search:run","segment:read","segment:write","enrich:read","enrich:run","knowledge:write","export:run","wallet:read","events:read","key:manage"]}},"expirationDays":{"type":"integer","minimum":1,"maximum":360},"budgetCredits":{"type":"integer","minimum":0,"maximum":9007199254740991},"budgetPeriodDays":{"type":"integer","minimum":1,"maximum":365},"maxRequestCredits":{"type":"integer","minimum":0,"maximum":9007199254740991},"allowedOperations":{"anyOf":[{"type":"array","items":{"type":"string","enum":["audit-calls","audit-calls-export","audit-events","audit-events-export","cancel","catalog","commons.publish","commons.rollback","companies","company-correct","company-delete","company-facts","company-legal-entity","company-lookup","company-merge","company-mint","company-promote","company-read","coverage","enrich","enrichment","events","job-targets","key-create","key-revoke","launch-items","namespace-declare","namespace-delete","namespaces","record","search","search-unlock","segment","segment-companies","segment-create","segment-delete","segment-facts","segment-update","segments","wallet","wallet-transactions"]}},{"type":"null"}]}},"required":["name","scopes","expirationDays"]},"key-createOutput":{"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)$"},"name":{"type":"string"},"key":{"type":"string"},"keyPrefix":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"scopes":{"type":"array","items":{"type":"string","enum":["commons:publish","company:read","company:write","company:unlock","search:run","segment:read","segment:write","enrich:read","enrich:run","knowledge:write","export:run","wallet:read","events:read","key:manage"]}},"allowedOperations":{"anyOf":[{"type":"array","items":{"type":"string","enum":["audit-calls","audit-calls-export","audit-events","audit-events-export","cancel","catalog","commons.publish","commons.rollback","companies","company-correct","company-delete","company-facts","company-legal-entity","company-lookup","company-merge","company-mint","company-promote","company-read","coverage","enrich","enrichment","events","job-targets","key-create","key-revoke","launch-items","namespace-declare","namespace-delete","namespaces","record","search","search-unlock","segment","segment-companies","segment-create","segment-delete","segment-facts","segment-update","segments","wallet","wallet-transactions"]}},{"type":"null"}]},"budgetCredits":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"budgetPeriodDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"maxRequestCredits":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","name","key","keyPrefix","expiresAt","createdAt","scopes","allowedOperations","budgetCredits","budgetPeriodDays","maxRequestCredits"],"additionalProperties":false},"key-revokeInput":{"type":"object","properties":{"keyId":{"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)$"}},"required":["keyId"]},"key-revokeOutput":{"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)$"},"revoked":{"type":"boolean","const":true}},"required":["id","revoked"],"additionalProperties":false},"walletInput":{"type":"object","properties":{}},"walletOutput":{"type":"object","properties":{"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"committed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"spendable":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"spentThisPeriod":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lifetimePurchased":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lifetimeGranted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lifetimeUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"keyBounds":{"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"}},"maxRequestCredits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"budgetCredits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"budgetPeriodDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"budgetRemaining":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["scopes","maxRequestCredits","budgetCredits","budgetPeriodDays","budgetRemaining"],"additionalProperties":false}},"required":["balance","lifetimePurchased","lifetimeGranted","lifetimeUsed","keyBounds"],"additionalProperties":false},"wallet-transactionsInput":{"type":"object","properties":{"cursor":{"type":"string","minLength":1},"limit":{"default":50,"type":"integer","minimum":1,"maximum":9007199254740991},"apiKeyId":{"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)$"}}},"wallet-transactionsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string"},"type":{"type":"string","enum":["purchase","subscription_grant","bonus","promo","usage","refund","expire","adjustment","search_charge","acquisition_charge"]},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"balanceAfter":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"apiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"referenceType":{"anyOf":[{"type":"string"},{"type":"null"}]},"referenceId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","createdAt","type","amount","balanceAfter","description","apiKeyId","referenceType","referenceId"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"],"additionalProperties":false},"audit-callsInput":{"type":"object","properties":{"cursor":{"type":"string","minLength":1},"limit":{"default":50,"type":"integer","minimum":1,"maximum":9007199254740991},"apiKeyId":{"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)$"}}},"audit-callsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"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)$"},"operationId":{"type":"string"},"apiKeyId":{"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)$"},"requestId":{"type":"string"},"status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"HTTP status, or null when no response has been recorded yet."},"costCredits":{"type":"number","minimum":0},"suppressedAttempts":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Additional refused attempts suppressed organization-wide after this sample, not attempts attributed to its API key. Zero when none; other fields describe the original sampled call."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","operationId","apiKeyId","requestId","status","costCredits","suppressedAttempts","createdAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"],"additionalProperties":false},"audit-calls-exportInput":{"type":"object","properties":{"fields":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","enum":["id","operationId","apiKeyId","requestId","status","costCredits","suppressedAttempts","createdAt"]}},"format":{"type":"string","enum":["csv","jsonl","xlsx"]},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"selected"},"callIds":{"minItems":1,"maxItems":50000,"type":"array","items":{"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)$"}}},"required":["kind","callIds"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"query"},"query":{"type":"object","properties":{"apiKeyId":{"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}},"required":["kind","query"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"collection"}},"required":["kind"],"additionalProperties":false}]}},"required":["fields","format","scope"],"additionalProperties":false},"audit-calls-exportOutput":{"type":"object","properties":{"exportId":{"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)$"},"status":{"type":"string","enum":["completed","pending"]},"delivery":{"type":"string","enum":["inline","artifact"]},"format":{"type":"string","enum":["csv","jsonl","xlsx"]},"contentType":{"type":"string"},"fileName":{"type":"string"},"rowCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"contentBase64":{"type":"string"}},"required":["exportId","status","delivery","format","contentType","fileName","rowCount"],"additionalProperties":false},"audit-eventsInput":{"type":"object","properties":{"cursor":{"type":"string","minLength":1},"limit":{"default":50,"type":"integer","minimum":1,"maximum":9007199254740991},"kind":{"description":"Return only acts recorded under this exact kind, e.g. `key.policy_changed`.","type":"string","minLength":1}}},"audit-eventsOutput":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"kind":{"type":"string","description":"The recorded vocabulary, e.g. `job.completed`, `organization.limits_changed` or `ledger.usage`. Open by design: a newer deploy may add a kind."},"actor":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"member"},"userId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The acting member's current display name, or null when that user no longer exists."}},"required":["kind","userId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"api-key"},"apiKeyId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The acting key's current name, or null when that key no longer exists."}},"required":["kind","apiKeyId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"system"}},"required":["kind"],"additionalProperties":false}]},"subject":{"type":"object","properties":{"jobId":{"type":"string"},"runId":{"type":"string"},"segmentId":{"type":"string"},"companyId":{"type":"string"},"apiKeyId":{"type":"string"},"exportId":{"type":"string"},"transactionId":{"type":"string"}},"additionalProperties":false},"amount":{"anyOf":[{"type":"object","properties":{"credits":{"type":"number"},"balanceAfter":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["credits","balanceAfter"],"additionalProperties":false},{"type":"null"}]},"detail":{"anyOf":[{"oneOf":[{"type":"object","properties":{"of":{"type":"string","const":"limits"},"before":{"type":"object","properties":{"overrides":{"type":"object","properties":{"requestsPerMinute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxConcurrentRuns":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxAdmittedJobs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false},"effective":{"type":"object","properties":{"requestsPerMinute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxConcurrentRuns":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxAdmittedJobs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["requestsPerMinute","maxConcurrentRuns","maxAdmittedJobs"],"additionalProperties":false},"admissionPaused":{"type":"boolean"}},"required":["overrides","effective","admissionPaused"],"additionalProperties":false},"after":{"type":"object","properties":{"overrides":{"type":"object","properties":{"requestsPerMinute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxConcurrentRuns":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxAdmittedJobs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false},"effective":{"type":"object","properties":{"requestsPerMinute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxConcurrentRuns":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxAdmittedJobs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["requestsPerMinute","maxConcurrentRuns","maxAdmittedJobs"],"additionalProperties":false},"admissionPaused":{"type":"boolean"}},"required":["overrides","effective","admissionPaused"],"additionalProperties":false}},"required":["of","before","after"],"additionalProperties":false},{"type":"object","properties":{"of":{"type":"string","const":"suspension"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancellationSignalling":{"anyOf":[{"type":"string","const":"failed"},{"type":"null"}]}},"required":["of","reason","cancellationSignalling"],"additionalProperties":false},{"type":"object","properties":{"of":{"type":"string","const":"export"},"rows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["of","rows"],"additionalProperties":false},{"type":"object","properties":{"of":{"type":"string","const":"failure"},"message":{"type":"string"}},"required":["of","message"],"additionalProperties":false},{"type":"object","properties":{"of":{"type":"string","const":"policy"},"action":{"type":"string","enum":["created","revoked","updated"]},"revocationCause":{"type":"string","enum":["member_removed","user_banned","key_revoked"]}},"required":["of","action"],"additionalProperties":false},{"type":"object","properties":{"of":{"type":"string","const":"retry"},"step":{"type":"string"},"attempt":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["of","step","attempt"],"additionalProperties":false},{"type":"object","properties":{"of":{"type":"string","const":"ledger"},"type":{"type":"string","enum":["purchase","subscription_grant","bonus","promo","usage","refund","expire","adjustment","search_charge","acquisition_charge"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"reference":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false},{"type":"null"}]},"pairing":{"anyOf":[{"type":"object","properties":{"role":{"type":"string","enum":["refund-of","refunded-by"]},"transactionIds":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["role","transactionIds"],"additionalProperties":false},{"type":"null"}]}},"required":["of","type","description","reference","pairing"],"additionalProperties":false}]},{"type":"null"}]}},"required":["id","at","kind","actor","subject","amount","detail"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"recordedKinds":{"type":"array","items":{"type":"string"},"description":"Every kind this deploy records, and therefore every value `kind` accepts."}},"required":["events","nextCursor","recordedKinds"],"additionalProperties":false},"audit-events-exportInput":{"type":"object","properties":{"fields":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","enum":["id","at","kind","actorKind","actorId","actorName","jobId","runId","segmentId","companyId","apiKeyId","exportId","transactionId","credits","balanceAfter","detail"]}},"format":{"type":"string","enum":["csv","jsonl","xlsx"]},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"query"},"query":{"type":"object","properties":{"kind":{"type":"string","minLength":1}},"additionalProperties":false}},"required":["kind","query"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"collection"}},"required":["kind"],"additionalProperties":false}]}},"required":["fields","format","scope"],"additionalProperties":false},"audit-events-exportOutput":{"type":"object","properties":{"exportId":{"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)$"},"status":{"type":"string","enum":["completed","pending"]},"delivery":{"type":"string","enum":["inline","artifact"]},"format":{"type":"string","enum":["csv","jsonl","xlsx"]},"contentType":{"type":"string"},"fileName":{"type":"string"},"rowCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"contentBase64":{"type":"string"}},"required":["exportId","status","delivery","format","contentType","fileName","rowCount"],"additionalProperties":false},"company-mintInput":{"type":"object","properties":{"rows":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"country":{"description":"ISO 3166-1 alpha-2 operating country; your own assertion.","type":"string","minLength":2,"maxLength":2},"activities":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string","enum":["isic5","nace21","nace2"],"description":"The scheme the code is in. Everything converts to ISIC Rev.5 at the deepest level the code determines."},"code":{"type":"string","minLength":1,"maxLength":16,"description":"A section letter or a 2–4 digit code, dotted or dotless (e.g. `62.10`, `6210`, `J`)."},"primary":{"type":"boolean"}},"required":["scheme","code"],"additionalProperties":false}},"identifiers":{"maxItems":20,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"registration"},"country":{"description":"ISO 3166-1 alpha-2 Jurisdiction whose registry the Scheme belongs to.","type":"string","minLength":2,"maxLength":2},"scheme":{"type":"string","minLength":1,"maxLength":32,"description":"The Scheme key the Directory publishes, jurisdiction-qualified and lowercase, e.g. `pl-krs`, `pl-nip`, `ee-registrikood`."},"value":{"type":"string","minLength":1,"maxLength":128},"primary":{"type":"boolean"}},"required":["kind","country","scheme","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"organization_system"},"system":{"type":"string","minLength":1,"maxLength":64,"description":"Your own name for the system the id comes from, e.g. `hubspot`. Re-importing the same id changes nothing."},"value":{"type":"string","minLength":1,"maxLength":256},"primary":{"type":"boolean"}},"required":["kind","system","value"],"additionalProperties":false}]}},"domains":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":253,"description":"A bare domain or a URL; stored as the registrable domain."},"primary":{"type":"boolean"}},"required":["domain"],"additionalProperties":false}},"into":{"description":"Attach this row's identifiers and domains to the named Company instead of minting.","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)$"}},"required":["name","country","activities"],"additionalProperties":false}},"dryRun":{"default":false,"description":"Report what each row would do — create, match, or attach — and write nothing.","type":"boolean"}},"required":["rows"],"additionalProperties":false},"company-mintOutput":{"type":"object","properties":{"dryRun":{"type":"boolean"},"created":{"type":"integer","minimum":0,"maximum":9007199254740991},"matched":{"type":"integer","minimum":0,"maximum":9007199254740991},"attached":{"type":"integer","minimum":0,"maximum":9007199254740991},"items":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","minimum":0,"maximum":9007199254740991},"action":{"type":"string","enum":["create","match","attach"],"description":"`create`: minted. `match`: an identifier already belonged to a Company, which the row joined. `attach`: joined the Company named by `into`."},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"matchedBy":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"registration"},"country":{"description":"ISO 3166-1 alpha-2 Jurisdiction whose registry the Scheme belongs to."},"scheme":{"type":"string","minLength":1,"maxLength":32,"description":"The Scheme key the Directory publishes, jurisdiction-qualified and lowercase, e.g. `pl-krs`, `pl-nip`, `ee-registrikood`."},"value":{"type":"string","minLength":1,"maxLength":128},"primary":{"type":"boolean"}},"required":["kind","country","scheme","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"organization_system"},"system":{"type":"string","minLength":1,"maxLength":64,"description":"Your own name for the system the id comes from, e.g. `hubspot`. Re-importing the same id changes nothing."},"value":{"type":"string","minLength":1,"maxLength":256},"primary":{"type":"boolean"}},"required":["kind","system","value"],"additionalProperties":false}]},{"type":"null"}]},"similar":{"type":"array","items":{"type":"object","properties":{"companyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"row":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"reason":{"type":"string","enum":["domain","name"],"description":"`domain`: shares a Domain. `name`: same name and country."}},"required":["companyId","row","reason"],"additionalProperties":false}}},"required":["row","action","companyId","matchedBy","similar"],"additionalProperties":false}}},"required":["dryRun","created","matched","attached","items"],"additionalProperties":false},"companiesInput":{"type":"object","properties":{"cursor":{"type":"string","minLength":1},"limit":{"default":50,"type":"integer","minimum":1,"maximum":9007199254740991},"country":{"type":"string","minLength":2,"maxLength":2},"q":{"type":"string","minLength":1,"maxLength":200}},"additionalProperties":false},"companiesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque, organization-scoped, never reused."},"name":{"type":"string"},"country":{"type":"string"},"origin":{"type":"string","enum":["commons","external"]},"verified":{"type":"boolean"},"unlocked":{"type":"boolean"},"legalEntityId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activities":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"ISIC Rev.5 code: a section letter or 2–4 digits."},"precision":{"type":"string","enum":["section","division","group","class"]},"source":{"type":"object","properties":{"scheme":{"type":"string","enum":["isic5","nace21","nace2"]},"code":{"type":"string"}},"required":["scheme","code"],"additionalProperties":false},"primary":{"type":"boolean"}},"required":["code","precision","source","primary"],"additionalProperties":false}},"identifiers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"registration"},"country":{"type":"string"},"scheme":{"type":"string"},"value":{"type":"string"},"primary":{"type":"boolean"},"verifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","country","scheme","value","primary","verifiedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"organization_system"},"system":{"type":"string"},"value":{"type":"string"},"primary":{"type":"boolean"}},"required":["kind","system","value","primary"],"additionalProperties":false}]}},"domains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"primary":{"type":"boolean"}},"required":["domain","primary"],"additionalProperties":false}},"etag":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","country","origin","verified","unlocked","legalEntityId","activities","identifiers","domains","etag","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"],"additionalProperties":false},"company-readInput":{"type":"object","properties":{"companyId":{"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)$"}},"required":["companyId"],"additionalProperties":false},"company-readOutput":{"type":"object","properties":{"id":{"type":"string","description":"Opaque, organization-scoped, never reused."},"name":{"type":"string"},"country":{"type":"string"},"origin":{"type":"string","enum":["commons","external"]},"verified":{"type":"boolean"},"unlocked":{"type":"boolean"},"legalEntityId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activities":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"ISIC Rev.5 code: a section letter or 2–4 digits."},"precision":{"type":"string","enum":["section","division","group","class"]},"source":{"type":"object","properties":{"scheme":{"type":"string","enum":["isic5","nace21","nace2"]},"code":{"type":"string"}},"required":["scheme","code"],"additionalProperties":false},"primary":{"type":"boolean"}},"required":["code","precision","source","primary"],"additionalProperties":false}},"identifiers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"registration"},"country":{"type":"string"},"scheme":{"type":"string"},"value":{"type":"string"},"primary":{"type":"boolean"},"verifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","country","scheme","value","primary","verifiedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"organization_system"},"system":{"type":"string"},"value":{"type":"string"},"primary":{"type":"boolean"}},"required":["kind","system","value","primary"],"additionalProperties":false}]}},"domains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"primary":{"type":"boolean"}},"required":["domain","primary"],"additionalProperties":false}},"etag":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"legalEntity":{"anyOf":[{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"locked"},"legalEntityId":{"type":"string"},"legalName":{"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"inventory":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"additionalProperties":{"type":"object","properties":{"schemaVersion":{"default":"0.3.0","type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["schemaVersion","asOf"],"additionalProperties":false}},"locked":{"type":"object","properties":{"price":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["price"],"additionalProperties":false}},"required":["state","legalEntityId","legalName","status","inventory","locked"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unlocked"},"legalEntityId":{"type":"string"},"legalName":{"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"record":{"type":"object","properties":{"id":{"type":"string","minLength":1},"schemaVersion":{"default":"0.3.0","type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"jurisdiction":{"type":"string","pattern":"^[A-Z]{2}$"},"registryId":{"type":"string","minLength":1},"legalName":{"type":"object","properties":{"canonical":{"type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$"},"value":{"type":"string","minLength":1}},"required":["language","value"],"additionalProperties":false},"variants":{"default":[],"type":"array","items":{"type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$"},"value":{"type":"string","minLength":1}},"required":["language","value"],"additionalProperties":false}}},"required":["canonical","variants"],"additionalProperties":false},"legalForm":{"type":"object","properties":{"nativeCode":{"type":"string","minLength":1},"native":{"type":"object","properties":{"canonical":{"type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$"},"value":{"type":"string","minLength":1}},"required":["language","value"],"additionalProperties":false},"variants":{"default":[],"type":"array","items":{"type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$"},"value":{"type":"string","minLength":1}},"required":["language","value"],"additionalProperties":false}}},"required":["canonical","variants"],"additionalProperties":false},"category":{"type":"string","enum":["limited_company","public_limited_company","partnership","cooperative","foundation","government","other"]}},"required":["nativeCode","native","category"],"additionalProperties":false},"status":{"type":"object","properties":{"canonical":{"type":"string","enum":["operationally-active","terminated","unknown"]},"native":{"type":"string","minLength":1},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["canonical","native","asOf"],"additionalProperties":false},"lifecycle":{"default":{},"type":"object","properties":{"registeredOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"terminatedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"additionalProperties":false},"identifiers":{"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"value":{"type":"string","minLength":1,"pattern":"^[A-Z0-9]+$"}},"required":["scheme","value"],"additionalProperties":false}},"inventory":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"additionalProperties":{"type":"object","properties":{"schemaVersion":{"default":"0.3.0","type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["schemaVersion","asOf"],"additionalProperties":false}},"summaries":{"default":{},"type":"object","properties":{"economic-activity":{"type":"object","properties":{"primaryNace":{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{2,4}(\\.\\d{1,2})?$"},"revision":{"type":"string","enum":["REV_2","REV_2_1"]}},"required":["code","revision"],"additionalProperties":false},"secondaryNace":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{2,4}(\\.\\d{1,2})?$"},"revision":{"type":"string","enum":["REV_2","REV_2_1"]}},"required":["code","revision"],"additionalProperties":false}},"purpose":{"type":"object","properties":{"canonical":{"type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$"},"value":{"type":"string","minLength":1}},"required":["language","value"],"additionalProperties":false},"variants":{"default":[],"type":"array","items":{"type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$"},"value":{"type":"string","minLength":1}},"required":["language","value"],"additionalProperties":false}}},"required":["canonical","variants"],"additionalProperties":false}},"required":["secondaryNace"],"additionalProperties":false},"location":{"type":"object","properties":{"registeredAddress":{"type":"object","properties":{"type":{"type":"string","enum":["legal","postal"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"administrativeAreas":{"default":[],"type":"array","items":{"anyOf":[{"type":"object","properties":{"scheme":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"level":{"type":"string","enum":["region","municipality"]}},"required":["scheme","code"],"additionalProperties":false},{"type":"object","properties":{"scheme":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"level":{"type":"string","enum":["region","municipality"]}},"required":["scheme","name"],"additionalProperties":false}]}},"locality":{"type":"string","minLength":1},"streetAddressLines":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"postalCode":{"type":"string","minLength":1},"coordinate":{"type":"object","properties":{"point":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false},"precision":{"type":"string","enum":["postal","rooftop"]},"source":{"type":"string","minLength":1},"sourceRef":{"type":"string","minLength":1}},"required":["point","precision","source"],"additionalProperties":false}},"required":["type","country","administrativeAreas","streetAddressLines"],"additionalProperties":false},"otherOfficialAddresses":{"default":[],"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["postal","office"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"administrativeAreas":{"default":[],"type":"array","items":{"anyOf":[{"type":"object","properties":{"scheme":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"level":{"type":"string","enum":["region","municipality"]}},"required":["scheme","code"],"additionalProperties":false},{"type":"object","properties":{"scheme":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"level":{"type":"string","enum":["region","municipality"]}},"required":["scheme","name"],"additionalProperties":false}]}},"locality":{"type":"string","minLength":1},"streetAddressLines":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"postalCode":{"type":"string","minLength":1},"coordinate":{"type":"object","properties":{"point":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false},"precision":{"type":"string","enum":["postal","rooftop"]},"source":{"type":"string","minLength":1},"sourceRef":{"type":"string","minLength":1}},"required":["point","precision","source"],"additionalProperties":false}},"required":["type","country","administrativeAreas","streetAddressLines"],"additionalProperties":false}},"establishmentUnitCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["registeredAddress","otherOfficialAddresses","establishmentUnitCount"],"additionalProperties":false},"financial-performance":{"type":"object","properties":{"latestReportingPeriodEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"metrics":{"default":{},"type":"object","properties":{"revenue":{"type":"object","properties":{"native":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","enum":["EUR","GBP","SEK","NOK","DKK","CHF","PLN","CZK","HUF","RON","BGN","HRK","ISK","TRY","RSD","MKD","ALL","BAM","MDL","UAH","BYN","RUB","USD","LVL","JPY","AED","CNY","HKD","SGD","AUD","CAD","NZD","ZAR","INR","BRL","MXN","KRW","TWD","THB","ILS","SAR","QAR","KWD","MAD","EGP","NGN","KES","PHP","IDR","MYR","VND","CLP","COP","PEN","ARS","GEL","AMD","AZN","KZT","UZS"]}},"required":["amount","currency"],"additionalProperties":false},"eur":{"type":"number"},"usd":{"type":"number"},"rate":{"type":"object","properties":{"source":{"type":"string","minLength":1},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["source","asOf"],"additionalProperties":false}},"required":["native","eur","usd","rate"],"additionalProperties":false},"profitLoss":{"type":"object","properties":{"native":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","enum":["EUR","GBP","SEK","NOK","DKK","CHF","PLN","CZK","HUF","RON","BGN","HRK","ISK","TRY","RSD","MKD","ALL","BAM","MDL","UAH","BYN","RUB","USD","LVL","JPY","AED","CNY","HKD","SGD","AUD","CAD","NZD","ZAR","INR","BRL","MXN","KRW","TWD","THB","ILS","SAR","QAR","KWD","MAD","EGP","NGN","KES","PHP","IDR","MYR","VND","CLP","COP","PEN","ARS","GEL","AMD","AZN","KZT","UZS"]}},"required":["amount","currency"],"additionalProperties":false},"eur":{"type":"number"},"usd":{"type":"number"},"rate":{"type":"object","properties":{"source":{"type":"string","minLength":1},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["source","asOf"],"additionalProperties":false}},"required":["native","eur","usd","rate"],"additionalProperties":false},"equity":{"type":"object","properties":{"native":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","enum":["EUR","GBP","SEK","NOK","DKK","CHF","PLN","CZK","HUF","RON","BGN","HRK","ISK","TRY","RSD","MKD","ALL","BAM","MDL","UAH","BYN","RUB","USD","LVL","JPY","AED","CNY","HKD","SGD","AUD","CAD","NZD","ZAR","INR","BRL","MXN","KRW","TWD","THB","ILS","SAR","QAR","KWD","MAD","EGP","NGN","KES","PHP","IDR","MYR","VND","CLP","COP","PEN","ARS","GEL","AMD","AZN","KZT","UZS"]}},"required":["amount","currency"],"additionalProperties":false},"eur":{"type":"number"},"usd":{"type":"number"},"rate":{"type":"object","properties":{"source":{"type":"string","minLength":1},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["source","asOf"],"additionalProperties":false}},"required":["native","eur","usd","rate"],"additionalProperties":false},"totalAssets":{"type":"object","properties":{"native":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","enum":["EUR","GBP","SEK","NOK","DKK","CHF","PLN","CZK","HUF","RON","BGN","HRK","ISK","TRY","RSD","MKD","ALL","BAM","MDL","UAH","BYN","RUB","USD","LVL","JPY","AED","CNY","HKD","SGD","AUD","CAD","NZD","ZAR","INR","BRL","MXN","KRW","TWD","THB","ILS","SAR","QAR","KWD","MAD","EGP","NGN","KES","PHP","IDR","MYR","VND","CLP","COP","PEN","ARS","GEL","AMD","AZN","KZT","UZS"]}},"required":["amount","currency"],"additionalProperties":false},"eur":{"type":"number"},"usd":{"type":"number"},"rate":{"type":"object","properties":{"source":{"type":"string","minLength":1},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["source","asOf"],"additionalProperties":false}},"required":["native","eur","usd","rate"],"additionalProperties":false}},"additionalProperties":false},"employees":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"periodEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["count","periodEnd"],"additionalProperties":false},"windows":{"default":{},"type":"object","propertyNames":{"type":"string","enum":["y2021","y2022","y2021_2022","y2023","y2021_2023","y2022_2023","y2021_2022_2023","y2024","y2021_2024","y2022_2024","y2021_2022_2024","y2023_2024","y2021_2023_2024","y2022_2023_2024","y2021_2022_2023_2024","y2025","y2021_2025","y2022_2025","y2021_2022_2025","y2023_2025","y2021_2023_2025","y2022_2023_2025","y2021_2022_2023_2025","y2024_2025","y2021_2024_2025","y2022_2024_2025","y2021_2022_2024_2025","y2023_2024_2025","y2021_2023_2024_2025","y2022_2023_2024_2025","y2021_2022_2023_2024_2025"]},"additionalProperties":{"type":"object","properties":{"revenueEur":{"type":"number","minimum":0},"profitLossEur":{"type":"number"},"employees":{"type":"integer","minimum":0,"maximum":9007199254740991},"revenueGrowthPct":{"type":"number"},"growthStartRevenueEur":{"type":"number","exclusiveMinimum":0},"growthEndRevenueEur":{"type":"number","minimum":0}},"additionalProperties":false}}},"required":["latestReportingPeriodEnd","metrics","windows"],"additionalProperties":false},"workforce":{"type":"object","properties":{"employeeCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"employeeBand":{"type":"string","enum":["ZERO","ONE_TO_NINE","TEN_TO_49","FIFTY_TO_249","250_PLUS"]},"referenceDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"basis":{"type":"string","enum":["POINT_IN_TIME","PERIOD_AVERAGE"]}},"required":["referenceDate","basis"],"additionalProperties":false},"governance":{"type":"object","properties":{"members":{"default":[],"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"role":{"type":"string","enum":["director","managing-director","board-member","chair","deputy-chair","supervisory-member","supervisory-chair","secretary"]},"body":{"type":"string","enum":["management","supervisory"]},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["name","role","body"],"additionalProperties":false}},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["members","memberCount"],"additionalProperties":false},"corporate-structure":{"type":"object","properties":{"edges":{"default":[],"type":"array","items":{"type":"object","properties":{"relationType":{"type":"string","enum":["parent","subsidiary"]},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"bound"},"jurisdiction":{"type":"string","pattern":"^[A-Z]{2}$"},"registryId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["kind","jurisdiction","registryId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unbound"},"identifierScheme":{"type":"string","minLength":1},"identifierValue":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["kind","name"],"additionalProperties":false}]}},"required":["relationType","target"],"additionalProperties":false}},"boundCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unboundCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["edges","boundCount","unboundCount"],"additionalProperties":false},"contact-channels":{"type":"object","properties":{"companyContacts":{"default":[],"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"email"},"designation":{"type":"string","const":"company"},"value":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["type","designation","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"phone"},"designation":{"type":"string","const":"company"},"value":{"type":"string","minLength":1}},"required":["type","designation","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"website"},"designation":{"type":"string","const":"company"},"value":{"type":"string","format":"uri"}},"required":["type","designation","value"],"additionalProperties":false}]}},"marketingProtectionIndicators":{"default":[],"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["do-not-contact"]},"active":{"type":"boolean"},"observedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","active","observedOn"],"additionalProperties":false}}},"required":["companyContacts","marketingProtectionIndicators"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","schemaVersion","jurisdiction","registryId","legalName","legalForm","status","lifecycle","identifiers","inventory","summaries"],"additionalProperties":false},"assertions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"jurisdiction":{"type":"string","pattern":"^[A-Z]{2}$"},"registryId":{"type":"string","minLength":1},"schemaVersion":{"default":"0.3.0","type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"namespace":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"sourceId":{"type":"string","minLength":1},"releaseId":{"type":"string","minLength":1},"transformerVersion":{"type":"string","minLength":1},"retrievedAt":{"type":"string"},"artifacts":{"default":[],"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https:\\/\\/.*"},"identifier":{"type":"string","minLength":1},"period":{"type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["from","to"],"additionalProperties":false},"checksum":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"}},"additionalProperties":false}},"payload":{}},"required":["id","jurisdiction","registryId","schemaVersion","asOf","namespace","sourceId","releaseId","transformerVersion","retrievedAt","artifacts","payload"],"additionalProperties":false}}},"required":["state","legalEntityId","legalName","status","record","assertions"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"absent"},"legalEntityId":{"type":"string"},"granted":{"type":"boolean"}},"required":["state","legalEntityId","granted"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unavailable"}},"required":["state"],"additionalProperties":false}]},{"type":"null"}]}},"required":["id","name","country","origin","verified","unlocked","legalEntityId","activities","identifiers","domains","etag","createdAt","updatedAt","legalEntity"],"additionalProperties":false},"company-correctInput":{"type":"object","properties":{"companyId":{"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":{"type":"string","minLength":1,"maxLength":500},"country":{"type":"string","minLength":2,"maxLength":2},"activities":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string","enum":["isic5","nace21","nace2"],"description":"The scheme the code is in. Everything converts to ISIC Rev.5 at the deepest level the code determines."},"code":{"type":"string","minLength":1,"maxLength":16,"description":"A section letter or a 2–4 digit code, dotted or dotless (e.g. `62.10`, `6210`, `J`)."},"primary":{"type":"boolean"}},"required":["scheme","code"],"additionalProperties":false}},"identifiers":{"maxItems":20,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"registration"},"country":{"description":"ISO 3166-1 alpha-2 Jurisdiction whose registry the Scheme belongs to.","type":"string","minLength":2,"maxLength":2},"scheme":{"type":"string","minLength":1,"maxLength":32,"description":"The Scheme key the Directory publishes, jurisdiction-qualified and lowercase, e.g. `pl-krs`, `pl-nip`, `ee-registrikood`."},"value":{"type":"string","minLength":1,"maxLength":128},"primary":{"type":"boolean"}},"required":["kind","country","scheme","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"organization_system"},"system":{"type":"string","minLength":1,"maxLength":64,"description":"Your own name for the system the id comes from, e.g. `hubspot`. Re-importing the same id changes nothing."},"value":{"type":"string","minLength":1,"maxLength":256},"primary":{"type":"boolean"}},"required":["kind","system","value"],"additionalProperties":false}]}},"domains":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":253,"description":"A bare domain or a URL; stored as the registrable domain."},"primary":{"type":"boolean"}},"required":["domain"],"additionalProperties":false}}},"required":["companyId"],"additionalProperties":false},"company-correctOutput":{"type":"object","properties":{"id":{"type":"string","description":"Opaque, organization-scoped, never reused."},"name":{"type":"string"},"country":{"type":"string"},"origin":{"type":"string","enum":["commons","external"]},"verified":{"type":"boolean"},"unlocked":{"type":"boolean"},"legalEntityId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activities":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"ISIC Rev.5 code: a section letter or 2–4 digits."},"precision":{"type":"string","enum":["section","division","group","class"]},"source":{"type":"object","properties":{"scheme":{"type":"string","enum":["isic5","nace21","nace2"]},"code":{"type":"string"}},"required":["scheme","code"],"additionalProperties":false},"primary":{"type":"boolean"}},"required":["code","precision","source","primary"],"additionalProperties":false}},"identifiers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"registration"},"country":{"type":"string"},"scheme":{"type":"string"},"value":{"type":"string"},"primary":{"type":"boolean"},"verifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","country","scheme","value","primary","verifiedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"organization_system"},"system":{"type":"string"},"value":{"type":"string"},"primary":{"type":"boolean"}},"required":["kind","system","value","primary"],"additionalProperties":false}]}},"domains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"primary":{"type":"boolean"}},"required":["domain","primary"],"additionalProperties":false}},"etag":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","country","origin","verified","unlocked","legalEntityId","activities","identifiers","domains","etag","createdAt","updatedAt"],"additionalProperties":false},"company-deleteInput":{"type":"object","properties":{"companyId":{"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)$"},"confirm":{"default":"false","description":"Set to `true` to delete; otherwise the call only reports what it would remove.","type":"string","enum":["true","false"]}},"required":["companyId"],"additionalProperties":false},"company-deleteOutput":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true},"removed":{"type":"object","properties":{"identifiers":{"type":"integer","minimum":0,"maximum":9007199254740991},"activities":{"type":"integer","minimum":0,"maximum":9007199254740991},"domains":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["identifiers","activities","domains"],"additionalProperties":false}},"required":["id","deleted","removed"],"additionalProperties":false},"company-mergeInput":{"type":"object","properties":{"survivor":{"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 Company that keeps its id, its name, and its primaries."},"absorbed":{"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 Company that is folded in; its id resolves to the survivor afterwards."},"dryRun":{"default":false,"description":"Report what would move and what would conflict; write nothing.","type":"boolean"}},"required":["survivor","absorbed"],"additionalProperties":false},"company-mergeOutput":{"type":"object","properties":{"dryRun":{"type":"boolean"},"survivorId":{"type":"string"},"absorbedId":{"type":"string"},"moves":{"type":"object","properties":{"identifiers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"registration"},"country":{"description":"ISO 3166-1 alpha-2 Jurisdiction whose registry the Scheme belongs to."},"scheme":{"type":"string","minLength":1,"maxLength":32,"description":"The Scheme key the Directory publishes, jurisdiction-qualified and lowercase, e.g. `pl-krs`, `pl-nip`, `ee-registrikood`."},"value":{"type":"string","minLength":1,"maxLength":128},"primary":{"type":"boolean"}},"required":["kind","country","scheme","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"organization_system"},"system":{"type":"string","minLength":1,"maxLength":64,"description":"Your own name for the system the id comes from, e.g. `hubspot`. Re-importing the same id changes nothing."},"value":{"type":"string","minLength":1,"maxLength":256},"primary":{"type":"boolean"}},"required":["kind","system","value"],"additionalProperties":false}]}},"domains":{"type":"array","items":{"type":"string"}},"activities":{"type":"array","items":{"type":"string"},"description":"ISIC Rev.5 codes moving to the survivor."}},"required":["identifiers","domains","activities"],"additionalProperties":false},"conflicts":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["domain","activity"]},"value":{"type":"string"}},"required":["kind","value"],"additionalProperties":false}},"redirects":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"survivor":{"type":"object","properties":{"id":{"type":"string","description":"Opaque, organization-scoped, never reused."},"name":{"type":"string"},"country":{"type":"string"},"origin":{"type":"string","enum":["commons","external"]},"verified":{"type":"boolean"},"unlocked":{"type":"boolean"},"legalEntityId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activities":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"ISIC Rev.5 code: a section letter or 2–4 digits."},"precision":{"type":"string","enum":["section","division","group","class"]},"source":{"type":"object","properties":{"scheme":{"type":"string","enum":["isic5","nace21","nace2"]},"code":{"type":"string"}},"required":["scheme","code"],"additionalProperties":false},"primary":{"type":"boolean"}},"required":["code","precision","source","primary"],"additionalProperties":false}},"identifiers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"registration"},"country":{"type":"string"},"scheme":{"type":"string"},"value":{"type":"string"},"primary":{"type":"boolean"},"verifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","country","scheme","value","primary","verifiedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"organization_system"},"system":{"type":"string"},"value":{"type":"string"},"primary":{"type":"boolean"}},"required":["kind","system","value","primary"],"additionalProperties":false}]}},"domains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"primary":{"type":"boolean"}},"required":["domain","primary"],"additionalProperties":false}},"etag":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","country","origin","verified","unlocked","legalEntityId","activities","identifiers","domains","etag","createdAt","updatedAt"],"additionalProperties":false}},"required":["dryRun","survivorId","absorbedId","moves","conflicts","redirects","survivor"],"additionalProperties":false},"company-legal-entityInput":{"type":"object","properties":{"companyIds":{"minItems":1,"maxItems":100,"type":"array","items":{"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":"Opaque Company ids; unverified ids are reported, not charged."},"maxCredits":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Spend consent. The request is refused whole when the quote exceeds it."},"namespaces":{"description":"Namespace keys, e.g. `financial-performance`. Only Namespaces the record's Inventory lists are read.","maxItems":16,"type":"array","items":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"}},"dryRun":{"default":false,"description":"Return the quote and which Companies it pays for, without reading the Commons, granting, or debiting.","type":"boolean"}},"required":["companyIds","maxCredits"],"additionalProperties":false},"company-legal-entityOutput":{"anyOf":[{"type":"object","properties":{"dryRun":{"type":"boolean","const":true},"items":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"unlock":{"type":"boolean"}},"required":["companyId","unlock"],"additionalProperties":false}},"quote":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["dryRun","items","quote"],"additionalProperties":false},{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"legalEntity":{"anyOf":[{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"locked"},"legalEntityId":{"type":"string"},"legalName":{"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"inventory":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"additionalProperties":{"type":"object","properties":{"schemaVersion":{"default":"0.3.0","type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["schemaVersion","asOf"],"additionalProperties":false}},"locked":{"type":"object","properties":{"price":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["price"],"additionalProperties":false}},"required":["state","legalEntityId","legalName","status","inventory","locked"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unlocked"},"legalEntityId":{"type":"string"},"legalName":{"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"record":{"type":"object","properties":{"id":{"type":"string","minLength":1},"schemaVersion":{"default":"0.3.0","type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"jurisdiction":{"type":"string","pattern":"^[A-Z]{2}$"},"registryId":{"type":"string","minLength":1},"legalName":{"type":"object","properties":{"canonical":{"type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$"},"value":{"type":"string","minLength":1}},"required":["language","value"],"additionalProperties":false},"variants":{"default":[],"type":"array","items":{"type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$"},"value":{"type":"string","minLength":1}},"required":["language","value"],"additionalProperties":false}}},"required":["canonical","variants"],"additionalProperties":false},"legalForm":{"type":"object","properties":{"nativeCode":{"type":"string","minLength":1},"native":{"type":"object","properties":{"canonical":{"type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$"},"value":{"type":"string","minLength":1}},"required":["language","value"],"additionalProperties":false},"variants":{"default":[],"type":"array","items":{"type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$"},"value":{"type":"string","minLength":1}},"required":["language","value"],"additionalProperties":false}}},"required":["canonical","variants"],"additionalProperties":false},"category":{"type":"string","enum":["limited_company","public_limited_company","partnership","cooperative","foundation","government","other"]}},"required":["nativeCode","native","category"],"additionalProperties":false},"status":{"type":"object","properties":{"canonical":{"type":"string","enum":["operationally-active","terminated","unknown"]},"native":{"type":"string","minLength":1},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["canonical","native","asOf"],"additionalProperties":false},"lifecycle":{"default":{},"type":"object","properties":{"registeredOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"terminatedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"additionalProperties":false},"identifiers":{"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"value":{"type":"string","minLength":1,"pattern":"^[A-Z0-9]+$"}},"required":["scheme","value"],"additionalProperties":false}},"inventory":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"additionalProperties":{"type":"object","properties":{"schemaVersion":{"default":"0.3.0","type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["schemaVersion","asOf"],"additionalProperties":false}},"summaries":{"default":{},"type":"object","properties":{"economic-activity":{"type":"object","properties":{"primaryNace":{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{2,4}(\\.\\d{1,2})?$"},"revision":{"type":"string","enum":["REV_2","REV_2_1"]}},"required":["code","revision"],"additionalProperties":false},"secondaryNace":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{2,4}(\\.\\d{1,2})?$"},"revision":{"type":"string","enum":["REV_2","REV_2_1"]}},"required":["code","revision"],"additionalProperties":false}},"purpose":{"type":"object","properties":{"canonical":{"type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$"},"value":{"type":"string","minLength":1}},"required":["language","value"],"additionalProperties":false},"variants":{"default":[],"type":"array","items":{"type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$"},"value":{"type":"string","minLength":1}},"required":["language","value"],"additionalProperties":false}}},"required":["canonical","variants"],"additionalProperties":false}},"required":["secondaryNace"],"additionalProperties":false},"location":{"type":"object","properties":{"registeredAddress":{"type":"object","properties":{"type":{"type":"string","enum":["legal","postal"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"administrativeAreas":{"default":[],"type":"array","items":{"anyOf":[{"type":"object","properties":{"scheme":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"level":{"type":"string","enum":["region","municipality"]}},"required":["scheme","code"],"additionalProperties":false},{"type":"object","properties":{"scheme":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"level":{"type":"string","enum":["region","municipality"]}},"required":["scheme","name"],"additionalProperties":false}]}},"locality":{"type":"string","minLength":1},"streetAddressLines":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"postalCode":{"type":"string","minLength":1},"coordinate":{"type":"object","properties":{"point":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false},"precision":{"type":"string","enum":["postal","rooftop"]},"source":{"type":"string","minLength":1},"sourceRef":{"type":"string","minLength":1}},"required":["point","precision","source"],"additionalProperties":false}},"required":["type","country","administrativeAreas","streetAddressLines"],"additionalProperties":false},"otherOfficialAddresses":{"default":[],"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["postal","office"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"administrativeAreas":{"default":[],"type":"array","items":{"anyOf":[{"type":"object","properties":{"scheme":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"level":{"type":"string","enum":["region","municipality"]}},"required":["scheme","code"],"additionalProperties":false},{"type":"object","properties":{"scheme":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"level":{"type":"string","enum":["region","municipality"]}},"required":["scheme","name"],"additionalProperties":false}]}},"locality":{"type":"string","minLength":1},"streetAddressLines":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"postalCode":{"type":"string","minLength":1},"coordinate":{"type":"object","properties":{"point":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false},"precision":{"type":"string","enum":["postal","rooftop"]},"source":{"type":"string","minLength":1},"sourceRef":{"type":"string","minLength":1}},"required":["point","precision","source"],"additionalProperties":false}},"required":["type","country","administrativeAreas","streetAddressLines"],"additionalProperties":false}},"establishmentUnitCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["registeredAddress","otherOfficialAddresses","establishmentUnitCount"],"additionalProperties":false},"financial-performance":{"type":"object","properties":{"latestReportingPeriodEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"metrics":{"default":{},"type":"object","properties":{"revenue":{"type":"object","properties":{"native":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","enum":["EUR","GBP","SEK","NOK","DKK","CHF","PLN","CZK","HUF","RON","BGN","HRK","ISK","TRY","RSD","MKD","ALL","BAM","MDL","UAH","BYN","RUB","USD","LVL","JPY","AED","CNY","HKD","SGD","AUD","CAD","NZD","ZAR","INR","BRL","MXN","KRW","TWD","THB","ILS","SAR","QAR","KWD","MAD","EGP","NGN","KES","PHP","IDR","MYR","VND","CLP","COP","PEN","ARS","GEL","AMD","AZN","KZT","UZS"]}},"required":["amount","currency"],"additionalProperties":false},"eur":{"type":"number"},"usd":{"type":"number"},"rate":{"type":"object","properties":{"source":{"type":"string","minLength":1},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["source","asOf"],"additionalProperties":false}},"required":["native","eur","usd","rate"],"additionalProperties":false},"profitLoss":{"type":"object","properties":{"native":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","enum":["EUR","GBP","SEK","NOK","DKK","CHF","PLN","CZK","HUF","RON","BGN","HRK","ISK","TRY","RSD","MKD","ALL","BAM","MDL","UAH","BYN","RUB","USD","LVL","JPY","AED","CNY","HKD","SGD","AUD","CAD","NZD","ZAR","INR","BRL","MXN","KRW","TWD","THB","ILS","SAR","QAR","KWD","MAD","EGP","NGN","KES","PHP","IDR","MYR","VND","CLP","COP","PEN","ARS","GEL","AMD","AZN","KZT","UZS"]}},"required":["amount","currency"],"additionalProperties":false},"eur":{"type":"number"},"usd":{"type":"number"},"rate":{"type":"object","properties":{"source":{"type":"string","minLength":1},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["source","asOf"],"additionalProperties":false}},"required":["native","eur","usd","rate"],"additionalProperties":false},"equity":{"type":"object","properties":{"native":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","enum":["EUR","GBP","SEK","NOK","DKK","CHF","PLN","CZK","HUF","RON","BGN","HRK","ISK","TRY","RSD","MKD","ALL","BAM","MDL","UAH","BYN","RUB","USD","LVL","JPY","AED","CNY","HKD","SGD","AUD","CAD","NZD","ZAR","INR","BRL","MXN","KRW","TWD","THB","ILS","SAR","QAR","KWD","MAD","EGP","NGN","KES","PHP","IDR","MYR","VND","CLP","COP","PEN","ARS","GEL","AMD","AZN","KZT","UZS"]}},"required":["amount","currency"],"additionalProperties":false},"eur":{"type":"number"},"usd":{"type":"number"},"rate":{"type":"object","properties":{"source":{"type":"string","minLength":1},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["source","asOf"],"additionalProperties":false}},"required":["native","eur","usd","rate"],"additionalProperties":false},"totalAssets":{"type":"object","properties":{"native":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","enum":["EUR","GBP","SEK","NOK","DKK","CHF","PLN","CZK","HUF","RON","BGN","HRK","ISK","TRY","RSD","MKD","ALL","BAM","MDL","UAH","BYN","RUB","USD","LVL","JPY","AED","CNY","HKD","SGD","AUD","CAD","NZD","ZAR","INR","BRL","MXN","KRW","TWD","THB","ILS","SAR","QAR","KWD","MAD","EGP","NGN","KES","PHP","IDR","MYR","VND","CLP","COP","PEN","ARS","GEL","AMD","AZN","KZT","UZS"]}},"required":["amount","currency"],"additionalProperties":false},"eur":{"type":"number"},"usd":{"type":"number"},"rate":{"type":"object","properties":{"source":{"type":"string","minLength":1},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["source","asOf"],"additionalProperties":false}},"required":["native","eur","usd","rate"],"additionalProperties":false}},"additionalProperties":false},"employees":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"periodEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["count","periodEnd"],"additionalProperties":false},"windows":{"default":{},"type":"object","propertyNames":{"type":"string","enum":["y2021","y2022","y2021_2022","y2023","y2021_2023","y2022_2023","y2021_2022_2023","y2024","y2021_2024","y2022_2024","y2021_2022_2024","y2023_2024","y2021_2023_2024","y2022_2023_2024","y2021_2022_2023_2024","y2025","y2021_2025","y2022_2025","y2021_2022_2025","y2023_2025","y2021_2023_2025","y2022_2023_2025","y2021_2022_2023_2025","y2024_2025","y2021_2024_2025","y2022_2024_2025","y2021_2022_2024_2025","y2023_2024_2025","y2021_2023_2024_2025","y2022_2023_2024_2025","y2021_2022_2023_2024_2025"]},"additionalProperties":{"type":"object","properties":{"revenueEur":{"type":"number","minimum":0},"profitLossEur":{"type":"number"},"employees":{"type":"integer","minimum":0,"maximum":9007199254740991},"revenueGrowthPct":{"type":"number"},"growthStartRevenueEur":{"type":"number","exclusiveMinimum":0},"growthEndRevenueEur":{"type":"number","minimum":0}},"additionalProperties":false}}},"required":["latestReportingPeriodEnd","metrics","windows"],"additionalProperties":false},"workforce":{"type":"object","properties":{"employeeCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"employeeBand":{"type":"string","enum":["ZERO","ONE_TO_NINE","TEN_TO_49","FIFTY_TO_249","250_PLUS"]},"referenceDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"basis":{"type":"string","enum":["POINT_IN_TIME","PERIOD_AVERAGE"]}},"required":["referenceDate","basis"],"additionalProperties":false},"governance":{"type":"object","properties":{"members":{"default":[],"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"role":{"type":"string","enum":["director","managing-director","board-member","chair","deputy-chair","supervisory-member","supervisory-chair","secretary"]},"body":{"type":"string","enum":["management","supervisory"]},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["name","role","body"],"additionalProperties":false}},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["members","memberCount"],"additionalProperties":false},"corporate-structure":{"type":"object","properties":{"edges":{"default":[],"type":"array","items":{"type":"object","properties":{"relationType":{"type":"string","enum":["parent","subsidiary"]},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"bound"},"jurisdiction":{"type":"string","pattern":"^[A-Z]{2}$"},"registryId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["kind","jurisdiction","registryId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unbound"},"identifierScheme":{"type":"string","minLength":1},"identifierValue":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["kind","name"],"additionalProperties":false}]}},"required":["relationType","target"],"additionalProperties":false}},"boundCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unboundCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["edges","boundCount","unboundCount"],"additionalProperties":false},"contact-channels":{"type":"object","properties":{"companyContacts":{"default":[],"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"email"},"designation":{"type":"string","const":"company"},"value":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["type","designation","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"phone"},"designation":{"type":"string","const":"company"},"value":{"type":"string","minLength":1}},"required":["type","designation","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"website"},"designation":{"type":"string","const":"company"},"value":{"type":"string","format":"uri"}},"required":["type","designation","value"],"additionalProperties":false}]}},"marketingProtectionIndicators":{"default":[],"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["do-not-contact"]},"active":{"type":"boolean"},"observedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","active","observedOn"],"additionalProperties":false}}},"required":["companyContacts","marketingProtectionIndicators"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","schemaVersion","jurisdiction","registryId","legalName","legalForm","status","lifecycle","identifiers","inventory","summaries"],"additionalProperties":false},"assertions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"jurisdiction":{"type":"string","pattern":"^[A-Z]{2}$"},"registryId":{"type":"string","minLength":1},"schemaVersion":{"default":"0.3.0","type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"namespace":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"sourceId":{"type":"string","minLength":1},"releaseId":{"type":"string","minLength":1},"transformerVersion":{"type":"string","minLength":1},"retrievedAt":{"type":"string"},"artifacts":{"default":[],"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https:\\/\\/.*"},"identifier":{"type":"string","minLength":1},"period":{"type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["from","to"],"additionalProperties":false},"checksum":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"}},"additionalProperties":false}},"payload":{}},"required":["id","jurisdiction","registryId","schemaVersion","asOf","namespace","sourceId","releaseId","transformerVersion","retrievedAt","artifacts","payload"],"additionalProperties":false}}},"required":["state","legalEntityId","legalName","status","record","assertions"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"absent"},"legalEntityId":{"type":"string"},"granted":{"type":"boolean"}},"required":["state","legalEntityId","granted"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unavailable"}},"required":["state"],"additionalProperties":false}]},{"type":"null"}]},"charged":{"type":"boolean"}},"required":["companyId","legalEntity","charged"],"additionalProperties":false}},"charged":{"type":"integer","minimum":0,"maximum":9007199254740991},"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items","charged","balance"],"additionalProperties":false}]},"company-lookupInput":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":200},"country":{"type":"string","minLength":2,"maxLength":2},"identifier":{"type":"object","properties":{"country":{"type":"string","minLength":2,"maxLength":2},"scheme":{"type":"string","minLength":1,"maxLength":50},"value":{"type":"string","minLength":1,"maxLength":100}},"required":["country","scheme","value"],"additionalProperties":false},"limit":{"type":"integer","minimum":1,"maximum":50}},"required":["name"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":200},"country":{"type":"string","minLength":2,"maxLength":2},"identifier":{"type":"object","properties":{"country":{"type":"string","minLength":2,"maxLength":2},"scheme":{"type":"string","minLength":1,"maxLength":50},"value":{"type":"string","minLength":1,"maxLength":100}},"required":["country","scheme","value"],"additionalProperties":false},"limit":{"type":"integer","minimum":1,"maximum":50}},"required":["identifier"],"additionalProperties":false}]},"company-lookupOutput":{"type":"object","properties":{"candidates":{"type":"array","items":{"type":"object","properties":{"legalEntityId":{"type":"string","description":"The Commons subject id."},"legalName":{"type":"string"},"country":{"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"unlocked":{"type":"boolean"}},"required":["legalEntityId","legalName","country","status","companyId","unlocked"],"additionalProperties":false}}},"required":["candidates"],"additionalProperties":false},"company-promoteInput":{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}\\.[a-z][a-z0-9_]{0,63}$","description":"A field declared with `promotes`; its current Fact becomes Core."},"companyIds":{"minItems":1,"maxItems":1000,"type":"array","items":{"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)$"}},"dryRun":{"default":false,"description":"Report what would be promoted and write nothing.","type":"boolean"}},"required":["field","companyIds"],"additionalProperties":false},"company-promoteOutput":{"type":"object","properties":{"dryRun":{"type":"boolean"},"field":{"type":"string"},"promoted":{"type":"integer","minimum":0,"maximum":9007199254740991},"items":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"outcome":{"type":"string","enum":["promoted","already_core","no_value","conflict","legal_entity_mismatch"],"description":"`no_value`: no current Fact, or an absence. `conflict`: another Company holds that identifier. `legal_entity_mismatch`: it verifies as a different Legal entity than this Company already names, and a Company names exactly one."},"value":{"anyOf":[{"type":"string"},{"type":"null"}]},"heldBy":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["companyId","outcome","value","heldBy"],"additionalProperties":false}}},"required":["dryRun","field","promoted","items"],"additionalProperties":false},"namespace-declareInput":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"description":{"type":"string","minLength":1,"maxLength":1000},"fields":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},"type":{"type":"string","enum":["string","number","boolean","date","company_ref","json"],"description":"What its values are. `json` is stored but never filtered on."},"unit":{"description":"What one unit of a number is, e.g. `EUR`, `%`, `headcount`.","type":"string","minLength":1,"maxLength":32},"dimension":{"description":"What the number measures, so two units of one thing compare.","type":"string","minLength":1,"maxLength":32},"freshnessDays":{"description":"How long a value stays current. Omit if it never goes stale.","type":"integer","exclusiveMinimum":0,"maximum":3650},"description":{"type":"string","minLength":1,"maxLength":1000,"description":"What the field means, for the next agent that reads it."},"promotes":{"description":"Makes this field's current Fact promotable into Core.","oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"domain"}},"required":["to"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"identifier"},"country":{"description":"Registration identifier: the country whose registry issues the scheme.","type":"string","minLength":2,"maxLength":2},"scheme":{"type":"string","minLength":1,"maxLength":32,"description":"Registration identifier: the scheme, e.g. `KRS`."},"system":{"type":"string","minLength":1,"maxLength":64,"description":"Own-system identifier: your name for the system."}},"required":["to"],"additionalProperties":false}]}},"required":["name","type","description"],"additionalProperties":false}}},"required":["name","description","fields"],"additionalProperties":false},"namespace-declareOutput":{"type":"object","properties":{"namespace":{"type":"object","properties":{"name":{"type":"string"},"owner":{"type":"string","enum":["native","organization"],"description":"`native`: a Spore tool owns it. `organization`: you do."},"description":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"ref":{"type":"string","description":"`namespace.field`, the key every door speaks."},"type":{"type":"string","enum":["string","number","boolean","date","company_ref","json"]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"dimension":{"anyOf":[{"type":"string"},{"type":"null"}]},"freshnessDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"description":{"type":"string"},"promotes":{"anyOf":[{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"domain"}},"required":["to"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"identifier"},"country":{"description":"Registration identifier: the country whose registry issues the scheme."},"scheme":{"type":"string","minLength":1,"maxLength":32,"description":"Registration identifier: the scheme, e.g. `KRS`."},"system":{"type":"string","minLength":1,"maxLength":64,"description":"Own-system identifier: your name for the system."}},"required":["to"],"additionalProperties":false}]},{"type":"null"}]},"frozen":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["name","ref","type","unit","dimension","freshnessDays","description","promotes","frozen","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["name","owner","description","fields","createdAt","updatedAt"],"additionalProperties":false},"added":{"type":"array","items":{"type":"string"}},"updated":{"type":"array","items":{"type":"string"}}},"required":["namespace","added","updated"],"additionalProperties":false},"namespacesInput":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"namespacesOutput":{"type":"object","properties":{"namespaces":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"owner":{"type":"string","enum":["native","organization"],"description":"`native`: a Spore tool owns it. `organization`: you do."},"description":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"ref":{"type":"string","description":"`namespace.field`, the key every door speaks."},"type":{"type":"string","enum":["string","number","boolean","date","company_ref","json"]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"dimension":{"anyOf":[{"type":"string"},{"type":"null"}]},"freshnessDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"description":{"type":"string"},"promotes":{"anyOf":[{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"domain"}},"required":["to"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"identifier"},"country":{"description":"Registration identifier: the country whose registry issues the scheme."},"scheme":{"type":"string","minLength":1,"maxLength":32,"description":"Registration identifier: the scheme, e.g. `KRS`."},"system":{"type":"string","minLength":1,"maxLength":64,"description":"Own-system identifier: your name for the system."}},"required":["to"],"additionalProperties":false}]},{"type":"null"}]},"frozen":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["name","ref","type","unit","dimension","freshnessDays","description","promotes","frozen","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["name","owner","description","fields","createdAt","updatedAt"],"additionalProperties":false}}},"required":["namespaces"],"additionalProperties":false},"namespace-deleteInput":{"type":"object","properties":{"namespaceName":{"type":"string","minLength":1,"maxLength":64},"field":{"description":"Delete just this field; omit to delete the whole declaration.","type":"string","minLength":1,"maxLength":64}},"required":["namespaceName"],"additionalProperties":false},"namespace-deleteOutput":{"type":"object","properties":{"name":{"type":"string"},"deleted":{"type":"boolean","const":true},"fields":{"type":"array","items":{"type":"string"}}},"required":["name","deleted","fields"],"additionalProperties":false},"recordInput":{"type":"object","properties":{"companyId":{"description":"The Company this knowledge is about.","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)$"},"segmentId":{"description":"The Segment this conclusion is about. Never together with `companyId`.","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)$"},"fields":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}\\.[a-z][a-z0-9_]{0,63}$"},"value":{"description":"Validated against the field's declared type.","anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{}]},"absent":{"description":"You looked and there is nothing to record.","type":"boolean","const":true},"observedAt":{"description":"When the world was as this says. Defaults to now.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"evidence":{"maxItems":20,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"url":{"type":"string","maxLength":2000,"format":"uri"},"excerpt":{"type":"string","minLength":1,"maxLength":2000},"section":{"type":"string","minLength":1,"maxLength":200},"retrievedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"commons"},"legalEntityId":{"type":"string","minLength":1,"maxLength":64},"note":{"type":"string","minLength":1,"maxLength":500}},"required":["kind","legalEntityId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"note"},"note":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","note"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"run_step"},"runId":{"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 Spore run that observed it."},"step":{"type":"string","minLength":1,"maxLength":120,"description":"The step within the run whose output this came from."},"note":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","runId","step"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"job"},"jobId":{"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 Spore Job whose frozen targets and receipts this rests on."},"note":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","jobId"],"additionalProperties":false}]}},"pin":{"description":"Make this observation the current value until unpinned.","type":"boolean"}},"required":["field"],"additionalProperties":false}}},"required":["fields"],"additionalProperties":false},"recordOutput":{"type":"object","properties":{"companyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"segmentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"recorded":{"type":"integer","minimum":0,"maximum":9007199254740991},"items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"factId":{"type":"string"},"current":{"type":"boolean"},"pinned":{"type":"boolean"}},"required":["field","factId","current","pinned"],"additionalProperties":false}}},"required":["companyId","segmentId","recorded","items"],"additionalProperties":false},"company-factsInput":{"type":"object","properties":{"companyId":{"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)$"}},"required":["companyId"],"additionalProperties":false},"company-factsOutput":{"type":"object","properties":{"companyId":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","company_ref","json"]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"staleAfterDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"stale":{"type":"boolean"},"current":{"type":"object","properties":{"factId":{"type":"string"},"value":{"anyOf":[{},{"type":"null"}]},"absent":{"type":"boolean"},"observedAt":{"type":"string"},"recordedAt":{"type":"string"},"producer":{"type":"string","enum":["run","organization"]},"producedBy":{"type":"object","properties":{"apiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["apiKeyId","userId"],"additionalProperties":false},"runId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confidence":{"anyOf":[{"type":"string","enum":["high","medium","low"]},{"type":"null"}]},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}]},"evidence":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"url":{"type":"string","maxLength":2000,"format":"uri"},"excerpt":{"type":"string","minLength":1,"maxLength":2000},"section":{"type":"string","minLength":1,"maxLength":200},"retrievedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"commons"},"legalEntityId":{"type":"string","minLength":1,"maxLength":64},"note":{"type":"string","minLength":1,"maxLength":500}},"required":["kind","legalEntityId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"note"},"note":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","note"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"run_step"},"runId":{"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 Spore run that observed it."},"step":{"type":"string","minLength":1,"maxLength":120,"description":"The step within the run whose output this came from."},"note":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","runId","step"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"job"},"jobId":{"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 Spore Job whose frozen targets and receipts this rests on."},"note":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","jobId"],"additionalProperties":false}]}},"pinned":{"type":"boolean"}},"required":["factId","value","absent","observedAt","recordedAt","producer","producedBy","runId","confidence","reasoning","evidence","pinned"],"additionalProperties":false},"history":{"type":"array","items":{"type":"object","properties":{"factId":{"type":"string"},"value":{"anyOf":[{},{"type":"null"}]},"absent":{"type":"boolean"},"observedAt":{"type":"string"},"recordedAt":{"type":"string"},"producer":{"type":"string","enum":["run","organization"]},"producedBy":{"type":"object","properties":{"apiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["apiKeyId","userId"],"additionalProperties":false},"runId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confidence":{"anyOf":[{"type":"string","enum":["high","medium","low"]},{"type":"null"}]},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}]},"evidence":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"url":{"type":"string","maxLength":2000,"format":"uri"},"excerpt":{"type":"string","minLength":1,"maxLength":2000},"section":{"type":"string","minLength":1,"maxLength":200},"retrievedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"commons"},"legalEntityId":{"type":"string","minLength":1,"maxLength":64},"note":{"type":"string","minLength":1,"maxLength":500}},"required":["kind","legalEntityId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"note"},"note":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","note"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"run_step"},"runId":{"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 Spore run that observed it."},"step":{"type":"string","minLength":1,"maxLength":120,"description":"The step within the run whose output this came from."},"note":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","runId","step"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"job"},"jobId":{"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 Spore Job whose frozen targets and receipts this rests on."},"note":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","jobId"],"additionalProperties":false}]}},"pinned":{"type":"boolean"}},"required":["factId","value","absent","observedAt","recordedAt","producer","producedBy","runId","confidence","reasoning","evidence","pinned"],"additionalProperties":false}}},"required":["field","type","unit","staleAfterDays","stale","current","history"],"additionalProperties":false}}},"required":["companyId","fields"],"additionalProperties":false},"segment-factsInput":{"type":"object","properties":{"segmentId":{"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)$"}},"required":["segmentId"],"additionalProperties":false},"segment-factsOutput":{"type":"object","properties":{"segmentId":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","company_ref","json"]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"staleAfterDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"stale":{"type":"boolean"},"current":{"type":"object","properties":{"factId":{"type":"string"},"value":{"anyOf":[{},{"type":"null"}]},"absent":{"type":"boolean"},"observedAt":{"type":"string"},"recordedAt":{"type":"string"},"producer":{"type":"string","enum":["run","organization"]},"producedBy":{"type":"object","properties":{"apiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["apiKeyId","userId"],"additionalProperties":false},"runId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confidence":{"anyOf":[{"type":"string","enum":["high","medium","low"]},{"type":"null"}]},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}]},"evidence":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"url":{"type":"string","maxLength":2000,"format":"uri"},"excerpt":{"type":"string","minLength":1,"maxLength":2000},"section":{"type":"string","minLength":1,"maxLength":200},"retrievedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"commons"},"legalEntityId":{"type":"string","minLength":1,"maxLength":64},"note":{"type":"string","minLength":1,"maxLength":500}},"required":["kind","legalEntityId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"note"},"note":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","note"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"run_step"},"runId":{"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 Spore run that observed it."},"step":{"type":"string","minLength":1,"maxLength":120,"description":"The step within the run whose output this came from."},"note":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","runId","step"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"job"},"jobId":{"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 Spore Job whose frozen targets and receipts this rests on."},"note":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","jobId"],"additionalProperties":false}]}},"pinned":{"type":"boolean"}},"required":["factId","value","absent","observedAt","recordedAt","producer","producedBy","runId","confidence","reasoning","evidence","pinned"],"additionalProperties":false},"history":{"type":"array","items":{"type":"object","properties":{"factId":{"type":"string"},"value":{"anyOf":[{},{"type":"null"}]},"absent":{"type":"boolean"},"observedAt":{"type":"string"},"recordedAt":{"type":"string"},"producer":{"type":"string","enum":["run","organization"]},"producedBy":{"type":"object","properties":{"apiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["apiKeyId","userId"],"additionalProperties":false},"runId":{"anyOf":[{"type":"string"},{"type":"null"}]},"confidence":{"anyOf":[{"type":"string","enum":["high","medium","low"]},{"type":"null"}]},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}]},"evidence":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"url":{"type":"string","maxLength":2000,"format":"uri"},"excerpt":{"type":"string","minLength":1,"maxLength":2000},"section":{"type":"string","minLength":1,"maxLength":200},"retrievedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"commons"},"legalEntityId":{"type":"string","minLength":1,"maxLength":64},"note":{"type":"string","minLength":1,"maxLength":500}},"required":["kind","legalEntityId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"note"},"note":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","note"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"run_step"},"runId":{"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 Spore run that observed it."},"step":{"type":"string","minLength":1,"maxLength":120,"description":"The step within the run whose output this came from."},"note":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","runId","step"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"job"},"jobId":{"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 Spore Job whose frozen targets and receipts this rests on."},"note":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","jobId"],"additionalProperties":false}]}},"pinned":{"type":"boolean"}},"required":["factId","value","absent","observedAt","recordedAt","producer","producedBy","runId","confidence","reasoning","evidence","pinned"],"additionalProperties":false}}},"required":["field","type","unit","staleAfterDays","stale","current","history"],"additionalProperties":false}}},"required":["segmentId","fields"],"additionalProperties":false},"coverageInput":{"type":"object","properties":{"fields":{"minItems":1,"maxItems":50,"type":"array","items":{"anyOf":[{"type":"string","pattern":"^registry(?:\\.[A-Za-z][A-Za-z0-9_-]*)+$"},{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}\\.[a-z][a-z0-9_]{0,63}$"}]},"description":"Only the fields you care about; never the whole Catalog. A `registry.*` reference is answered per Commons Namespace rather than per field, because the Inventory is what states presence."},"companyIds":{"minItems":1,"maxItems":10000,"type":"array","items":{"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)$"}},"segmentId":{"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)$"}},"required":["fields"],"additionalProperties":false},"coverageOutput":{"type":"object","properties":{"companies":{"type":"integer","minimum":0,"maximum":9007199254740991},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"current":{"type":"integer","minimum":0,"maximum":9007199254740991},"stale":{"type":"integer","minimum":0,"maximum":9007199254740991},"checkedNone":{"type":"integer","minimum":0,"maximum":9007199254740991},"missing":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["field","current","stale","checkedNone","missing"],"additionalProperties":false}},"commons":{"type":"object","properties":{"linked":{"type":"integer","minimum":0,"maximum":9007199254740991},"inventoried":{"type":"integer","minimum":0,"maximum":9007199254740991},"namespaces":{"type":"array","items":{"type":"object","properties":{"namespace":{"type":"string"},"present":{"type":"integer","minimum":0,"maximum":9007199254740991},"oldestAsOf":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["namespace","present","oldestAsOf"],"additionalProperties":false}}},"required":["linked","inventoried","namespaces"],"additionalProperties":false}},"required":["companies","fields","commons"],"additionalProperties":false},"searchInput":{"type":"object","properties":{"filter":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"group"},"logic":{"type":"string","enum":["AND","OR"]},"children":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"rule"},"fieldId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","notEquals","contains","notContains","startsWith","endsWith","in","notIn","isEmpty","isNotEmpty","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","between","isNull","isNotNull","before","after","onOrBefore","onOrAfter","isTrue","isFalse","withinBounds"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]},"params":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}}},"required":["type","fieldId","operator","value"]},{"type":"object","properties":{"type":{"type":"string","const":"group"},"logic":{"type":"string","enum":["AND","OR"]},"children":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"rule"},"fieldId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","notEquals","contains","notContains","startsWith","endsWith","in","notIn","isEmpty","isNotEmpty","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","between","isNull","isNotNull","before","after","onOrBefore","onOrAfter","isTrue","isFalse","withinBounds"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]},"params":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}}},"required":["type","fieldId","operator","value"]},{}]}}},"required":["type","logic","children"]}]}}},"required":["type","logic","children"]},{"type":"null"}]},"sortBy":{"default":"legalName","type":"string","enum":["legalName","countryCode","registrationDate","primaryActivityCode","revenue","profit","employees"]},"sortOrder":{"default":"asc","type":"string","enum":["asc","desc"]},"sampleSize":{"default":5,"type":"integer","minimum":5,"maximum":100},"maxCredits":{"type":"integer","minimum":0,"maximum":9007199254740991},"dryRun":{"default":false,"type":"boolean"}},"required":["maxCredits"]},"searchOutput":{"anyOf":[{"type":"object","properties":{"dryRun":{"type":"boolean","const":true},"quote":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["dryRun","quote"],"additionalProperties":false},{"type":"object","properties":{"searchResultId":{"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)$"},"filterHash":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"analytics":{"type":"object","properties":{"schemaVersion":{"type":"number","const":8},"context":{"type":"object","properties":{"source":{"type":"string","enum":["live","snapshot"]},"activityMode":{"type":"string","enum":["primary","all"]},"quantileMethod":{"type":"string","const":"equal-frequency-v1"},"rollingWindow":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["source","activityMode","quantileMethod","rollingWindow"],"additionalProperties":false},"totals":{"type":"object","properties":{"companies":{"type":"integer","minimum":0,"maximum":9007199254740991},"reportedRevenue":{"anyOf":[{"type":"number"},{"type":"null"}]},"revenueReported":{"type":"integer","minimum":0,"maximum":9007199254740991},"weightedRevenueGrowth":{"anyOf":[{"type":"number"},{"type":"null"}]},"growthReported":{"type":"integer","minimum":0,"maximum":9007199254740991},"growingCompanies":{"type":"integer","minimum":0,"maximum":9007199254740991},"profitReported":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["companies","reportedRevenue","revenueReported","weightedRevenueGrowth","growthReported","growingCompanies","profitReported"],"additionalProperties":false},"coverage":{"type":"object","properties":{"revenue":{"type":"object","properties":{"reported":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reported","total"],"additionalProperties":false},"profit":{"type":"object","properties":{"reported":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reported","total"],"additionalProperties":false},"employees":{"type":"object","properties":{"reported":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reported","total"],"additionalProperties":false},"industry":{"type":"object","properties":{"reported":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reported","total"],"additionalProperties":false},"region":{"type":"object","properties":{"reported":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reported","total"],"additionalProperties":false}},"required":["revenue","profit","employees","industry","region"],"additionalProperties":false},"distributions":{"type":"object","properties":{"revenue":{"type":"object","properties":{"buckets":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["key","label","min","max","count"],"additionalProperties":false}},"otherCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["buckets","otherCount"],"additionalProperties":false},"profit":{"type":"object","properties":{"buckets":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["key","label","min","max","count"],"additionalProperties":false}},"otherCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["buckets","otherCount"],"additionalProperties":false},"employees":{"type":"object","properties":{"buckets":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["key","label","min","max","count"],"additionalProperties":false}},"otherCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["buckets","otherCount"],"additionalProperties":false}},"required":["revenue","profit","employees"],"additionalProperties":false},"composition":{"type":"object","properties":{"activitySections":{"type":"object","properties":{"buckets":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["key","label","count"],"additionalProperties":false}},"otherCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["buckets","otherCount"],"additionalProperties":false},"countries":{"type":"object","properties":{"buckets":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["key","label","count"],"additionalProperties":false}},"otherCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["buckets","otherCount"],"additionalProperties":false}},"required":["activitySections","countries"],"additionalProperties":false},"geographies":{"type":"array","items":{"type":"object","properties":{"countryCode":{"type":"string"},"level":{"type":"string","enum":["municipality","region"]},"coveredCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"otherCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"buckets":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["code","label","count"],"additionalProperties":false}}},"required":["countryCode","level","coveredCount","otherCount","buckets"],"additionalProperties":false}}},"required":["schemaVersion","context","totals","coverage","distributions","composition","geographies"],"additionalProperties":false},"sample":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque, organization-scoped, never reused."},"name":{"type":"string"},"country":{"type":"string"},"origin":{"type":"string","enum":["commons","external"]},"verified":{"type":"boolean"},"unlocked":{"type":"boolean"},"legalEntityId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activities":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"ISIC Rev.5 code: a section letter or 2–4 digits."},"precision":{"type":"string","enum":["section","division","group","class"]},"source":{"type":"object","properties":{"scheme":{"type":"string","enum":["isic5","nace21","nace2"]},"code":{"type":"string"}},"required":["scheme","code"],"additionalProperties":false},"primary":{"type":"boolean"}},"required":["code","precision","source","primary"],"additionalProperties":false}},"identifiers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"registration"},"country":{"type":"string"},"scheme":{"type":"string"},"value":{"type":"string"},"primary":{"type":"boolean"},"verifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","country","scheme","value","primary","verifiedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"organization_system"},"system":{"type":"string"},"value":{"type":"string"},"primary":{"type":"boolean"}},"required":["kind","system","value","primary"],"additionalProperties":false}]}},"domains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"primary":{"type":"boolean"}},"required":["domain","primary"],"additionalProperties":false}},"etag":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"legalEntity":{"anyOf":[{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"locked"},"legalEntityId":{"type":"string"},"legalName":{"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"inventory":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"additionalProperties":{"type":"object","properties":{"schemaVersion":{"default":"0.3.0","type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["schemaVersion","asOf"],"additionalProperties":false}},"locked":{"type":"object","properties":{"price":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["price"],"additionalProperties":false}},"required":["state","legalEntityId","legalName","status","inventory","locked"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unlocked"},"legalEntityId":{"type":"string"},"legalName":{"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"record":{"type":"object","properties":{"id":{"type":"string","minLength":1},"schemaVersion":{"default":"0.3.0","type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"jurisdiction":{"type":"string","pattern":"^[A-Z]{2}$"},"registryId":{"type":"string","minLength":1},"legalName":{"type":"object","properties":{"canonical":{"type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$"},"value":{"type":"string","minLength":1}},"required":["language","value"],"additionalProperties":false},"variants":{"default":[],"type":"array","items":{"type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$"},"value":{"type":"string","minLength":1}},"required":["language","value"],"additionalProperties":false}}},"required":["canonical","variants"],"additionalProperties":false},"legalForm":{"type":"object","properties":{"nativeCode":{"type":"string","minLength":1},"native":{"type":"object","properties":{"canonical":{"type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$"},"value":{"type":"string","minLength":1}},"required":["language","value"],"additionalProperties":false},"variants":{"default":[],"type":"array","items":{"type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$"},"value":{"type":"string","minLength":1}},"required":["language","value"],"additionalProperties":false}}},"required":["canonical","variants"],"additionalProperties":false},"category":{"type":"string","enum":["limited_company","public_limited_company","partnership","cooperative","foundation","government","other"]}},"required":["nativeCode","native","category"],"additionalProperties":false},"status":{"type":"object","properties":{"canonical":{"type":"string","enum":["operationally-active","terminated","unknown"]},"native":{"type":"string","minLength":1},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["canonical","native","asOf"],"additionalProperties":false},"lifecycle":{"default":{},"type":"object","properties":{"registeredOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"terminatedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"additionalProperties":false},"identifiers":{"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"value":{"type":"string","minLength":1,"pattern":"^[A-Z0-9]+$"}},"required":["scheme","value"],"additionalProperties":false}},"inventory":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"additionalProperties":{"type":"object","properties":{"schemaVersion":{"default":"0.3.0","type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["schemaVersion","asOf"],"additionalProperties":false}},"summaries":{"default":{},"type":"object","properties":{"economic-activity":{"type":"object","properties":{"primaryNace":{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{2,4}(\\.\\d{1,2})?$"},"revision":{"type":"string","enum":["REV_2","REV_2_1"]}},"required":["code","revision"],"additionalProperties":false},"secondaryNace":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{2,4}(\\.\\d{1,2})?$"},"revision":{"type":"string","enum":["REV_2","REV_2_1"]}},"required":["code","revision"],"additionalProperties":false}},"purpose":{"type":"object","properties":{"canonical":{"type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$"},"value":{"type":"string","minLength":1}},"required":["language","value"],"additionalProperties":false},"variants":{"default":[],"type":"array","items":{"type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$"},"value":{"type":"string","minLength":1}},"required":["language","value"],"additionalProperties":false}}},"required":["canonical","variants"],"additionalProperties":false}},"required":["secondaryNace"],"additionalProperties":false},"location":{"type":"object","properties":{"registeredAddress":{"type":"object","properties":{"type":{"type":"string","enum":["legal","postal"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"administrativeAreas":{"default":[],"type":"array","items":{"anyOf":[{"type":"object","properties":{"scheme":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"level":{"type":"string","enum":["region","municipality"]}},"required":["scheme","code"],"additionalProperties":false},{"type":"object","properties":{"scheme":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"level":{"type":"string","enum":["region","municipality"]}},"required":["scheme","name"],"additionalProperties":false}]}},"locality":{"type":"string","minLength":1},"streetAddressLines":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"postalCode":{"type":"string","minLength":1},"coordinate":{"type":"object","properties":{"point":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false},"precision":{"type":"string","enum":["postal","rooftop"]},"source":{"type":"string","minLength":1},"sourceRef":{"type":"string","minLength":1}},"required":["point","precision","source"],"additionalProperties":false}},"required":["type","country","administrativeAreas","streetAddressLines"],"additionalProperties":false},"otherOfficialAddresses":{"default":[],"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["postal","office"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"administrativeAreas":{"default":[],"type":"array","items":{"anyOf":[{"type":"object","properties":{"scheme":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"level":{"type":"string","enum":["region","municipality"]}},"required":["scheme","code"],"additionalProperties":false},{"type":"object","properties":{"scheme":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"level":{"type":"string","enum":["region","municipality"]}},"required":["scheme","name"],"additionalProperties":false}]}},"locality":{"type":"string","minLength":1},"streetAddressLines":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"postalCode":{"type":"string","minLength":1},"coordinate":{"type":"object","properties":{"point":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false},"precision":{"type":"string","enum":["postal","rooftop"]},"source":{"type":"string","minLength":1},"sourceRef":{"type":"string","minLength":1}},"required":["point","precision","source"],"additionalProperties":false}},"required":["type","country","administrativeAreas","streetAddressLines"],"additionalProperties":false}},"establishmentUnitCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["registeredAddress","otherOfficialAddresses","establishmentUnitCount"],"additionalProperties":false},"financial-performance":{"type":"object","properties":{"latestReportingPeriodEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"metrics":{"default":{},"type":"object","properties":{"revenue":{"type":"object","properties":{"native":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","enum":["EUR","GBP","SEK","NOK","DKK","CHF","PLN","CZK","HUF","RON","BGN","HRK","ISK","TRY","RSD","MKD","ALL","BAM","MDL","UAH","BYN","RUB","USD","LVL","JPY","AED","CNY","HKD","SGD","AUD","CAD","NZD","ZAR","INR","BRL","MXN","KRW","TWD","THB","ILS","SAR","QAR","KWD","MAD","EGP","NGN","KES","PHP","IDR","MYR","VND","CLP","COP","PEN","ARS","GEL","AMD","AZN","KZT","UZS"]}},"required":["amount","currency"],"additionalProperties":false},"eur":{"type":"number"},"usd":{"type":"number"},"rate":{"type":"object","properties":{"source":{"type":"string","minLength":1},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["source","asOf"],"additionalProperties":false}},"required":["native","eur","usd","rate"],"additionalProperties":false},"profitLoss":{"type":"object","properties":{"native":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","enum":["EUR","GBP","SEK","NOK","DKK","CHF","PLN","CZK","HUF","RON","BGN","HRK","ISK","TRY","RSD","MKD","ALL","BAM","MDL","UAH","BYN","RUB","USD","LVL","JPY","AED","CNY","HKD","SGD","AUD","CAD","NZD","ZAR","INR","BRL","MXN","KRW","TWD","THB","ILS","SAR","QAR","KWD","MAD","EGP","NGN","KES","PHP","IDR","MYR","VND","CLP","COP","PEN","ARS","GEL","AMD","AZN","KZT","UZS"]}},"required":["amount","currency"],"additionalProperties":false},"eur":{"type":"number"},"usd":{"type":"number"},"rate":{"type":"object","properties":{"source":{"type":"string","minLength":1},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["source","asOf"],"additionalProperties":false}},"required":["native","eur","usd","rate"],"additionalProperties":false},"equity":{"type":"object","properties":{"native":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","enum":["EUR","GBP","SEK","NOK","DKK","CHF","PLN","CZK","HUF","RON","BGN","HRK","ISK","TRY","RSD","MKD","ALL","BAM","MDL","UAH","BYN","RUB","USD","LVL","JPY","AED","CNY","HKD","SGD","AUD","CAD","NZD","ZAR","INR","BRL","MXN","KRW","TWD","THB","ILS","SAR","QAR","KWD","MAD","EGP","NGN","KES","PHP","IDR","MYR","VND","CLP","COP","PEN","ARS","GEL","AMD","AZN","KZT","UZS"]}},"required":["amount","currency"],"additionalProperties":false},"eur":{"type":"number"},"usd":{"type":"number"},"rate":{"type":"object","properties":{"source":{"type":"string","minLength":1},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["source","asOf"],"additionalProperties":false}},"required":["native","eur","usd","rate"],"additionalProperties":false},"totalAssets":{"type":"object","properties":{"native":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","enum":["EUR","GBP","SEK","NOK","DKK","CHF","PLN","CZK","HUF","RON","BGN","HRK","ISK","TRY","RSD","MKD","ALL","BAM","MDL","UAH","BYN","RUB","USD","LVL","JPY","AED","CNY","HKD","SGD","AUD","CAD","NZD","ZAR","INR","BRL","MXN","KRW","TWD","THB","ILS","SAR","QAR","KWD","MAD","EGP","NGN","KES","PHP","IDR","MYR","VND","CLP","COP","PEN","ARS","GEL","AMD","AZN","KZT","UZS"]}},"required":["amount","currency"],"additionalProperties":false},"eur":{"type":"number"},"usd":{"type":"number"},"rate":{"type":"object","properties":{"source":{"type":"string","minLength":1},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["source","asOf"],"additionalProperties":false}},"required":["native","eur","usd","rate"],"additionalProperties":false}},"additionalProperties":false},"employees":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"periodEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["count","periodEnd"],"additionalProperties":false},"windows":{"default":{},"type":"object","propertyNames":{"type":"string","enum":["y2021","y2022","y2021_2022","y2023","y2021_2023","y2022_2023","y2021_2022_2023","y2024","y2021_2024","y2022_2024","y2021_2022_2024","y2023_2024","y2021_2023_2024","y2022_2023_2024","y2021_2022_2023_2024","y2025","y2021_2025","y2022_2025","y2021_2022_2025","y2023_2025","y2021_2023_2025","y2022_2023_2025","y2021_2022_2023_2025","y2024_2025","y2021_2024_2025","y2022_2024_2025","y2021_2022_2024_2025","y2023_2024_2025","y2021_2023_2024_2025","y2022_2023_2024_2025","y2021_2022_2023_2024_2025"]},"additionalProperties":{"type":"object","properties":{"revenueEur":{"type":"number","minimum":0},"profitLossEur":{"type":"number"},"employees":{"type":"integer","minimum":0,"maximum":9007199254740991},"revenueGrowthPct":{"type":"number"},"growthStartRevenueEur":{"type":"number","exclusiveMinimum":0},"growthEndRevenueEur":{"type":"number","minimum":0}},"additionalProperties":false}}},"required":["latestReportingPeriodEnd","metrics","windows"],"additionalProperties":false},"workforce":{"type":"object","properties":{"employeeCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"employeeBand":{"type":"string","enum":["ZERO","ONE_TO_NINE","TEN_TO_49","FIFTY_TO_249","250_PLUS"]},"referenceDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"basis":{"type":"string","enum":["POINT_IN_TIME","PERIOD_AVERAGE"]}},"required":["referenceDate","basis"],"additionalProperties":false},"governance":{"type":"object","properties":{"members":{"default":[],"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"role":{"type":"string","enum":["director","managing-director","board-member","chair","deputy-chair","supervisory-member","supervisory-chair","secretary"]},"body":{"type":"string","enum":["management","supervisory"]},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["name","role","body"],"additionalProperties":false}},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["members","memberCount"],"additionalProperties":false},"corporate-structure":{"type":"object","properties":{"edges":{"default":[],"type":"array","items":{"type":"object","properties":{"relationType":{"type":"string","enum":["parent","subsidiary"]},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"bound"},"jurisdiction":{"type":"string","pattern":"^[A-Z]{2}$"},"registryId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["kind","jurisdiction","registryId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unbound"},"identifierScheme":{"type":"string","minLength":1},"identifierValue":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["kind","name"],"additionalProperties":false}]}},"required":["relationType","target"],"additionalProperties":false}},"boundCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unboundCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["edges","boundCount","unboundCount"],"additionalProperties":false},"contact-channels":{"type":"object","properties":{"companyContacts":{"default":[],"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"email"},"designation":{"type":"string","const":"company"},"value":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["type","designation","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"phone"},"designation":{"type":"string","const":"company"},"value":{"type":"string","minLength":1}},"required":["type","designation","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"website"},"designation":{"type":"string","const":"company"},"value":{"type":"string","format":"uri"}},"required":["type","designation","value"],"additionalProperties":false}]}},"marketingProtectionIndicators":{"default":[],"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["do-not-contact"]},"active":{"type":"boolean"},"observedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","active","observedOn"],"additionalProperties":false}}},"required":["companyContacts","marketingProtectionIndicators"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","schemaVersion","jurisdiction","registryId","legalName","legalForm","status","lifecycle","identifiers","inventory","summaries"],"additionalProperties":false},"assertions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"jurisdiction":{"type":"string","pattern":"^[A-Z]{2}$"},"registryId":{"type":"string","minLength":1},"schemaVersion":{"default":"0.3.0","type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"namespace":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"sourceId":{"type":"string","minLength":1},"releaseId":{"type":"string","minLength":1},"transformerVersion":{"type":"string","minLength":1},"retrievedAt":{"type":"string"},"artifacts":{"default":[],"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https:\\/\\/.*"},"identifier":{"type":"string","minLength":1},"period":{"type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["from","to"],"additionalProperties":false},"checksum":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"}},"additionalProperties":false}},"payload":{}},"required":["id","jurisdiction","registryId","schemaVersion","asOf","namespace","sourceId","releaseId","transformerVersion","retrievedAt","artifacts","payload"],"additionalProperties":false}}},"required":["state","legalEntityId","legalName","status","record","assertions"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"absent"},"legalEntityId":{"type":"string"},"granted":{"type":"boolean"}},"required":["state","legalEntityId","granted"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unavailable"}},"required":["state"],"additionalProperties":false}]},{"type":"null"}]}},"required":["id","name","country","origin","verified","unlocked","legalEntityId","activities","identifiers","domains","etag","createdAt","updatedAt","legalEntity"],"additionalProperties":false}},"newlyUnlocked":{"type":"array","items":{"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)$"}},"alreadyUnlocked":{"type":"array","items":{"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)$"}},"charged":{"type":"integer","minimum":0,"maximum":9007199254740991},"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"replayed":{"type":"boolean"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["searchResultId","filterHash","count","analytics","sample","newlyUnlocked","alreadyUnlocked","charged","balance","replayed","expiresAt"],"additionalProperties":false}]},"search-unlockInput":{"type":"object","properties":{"searchId":{"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)$"},"maxCredits":{"type":"integer","minimum":0,"maximum":9007199254740991},"dryRun":{"default":false,"type":"boolean"}},"required":["searchId","maxCredits"],"additionalProperties":false},"search-unlockOutput":{"type":"object","properties":{"searchResultId":{"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)$"},"dryRun":{"type":"boolean"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"matched":{"type":"integer","minimum":0,"maximum":9007199254740991},"mint":{"type":"integer","minimum":0,"maximum":9007199254740991},"held":{"type":"integer","minimum":0,"maximum":9007199254740991},"unlock":{"type":"integer","minimum":0,"maximum":9007199254740991},"alreadyUnlocked":{"type":"integer","minimum":0,"maximum":9007199254740991},"conflicts":{"type":"integer","minimum":0,"maximum":9007199254740991},"incomplete":{"type":"integer","minimum":0,"maximum":9007199254740991},"quote":{"type":"integer","minimum":0,"maximum":9007199254740991},"charged":{"type":"integer","minimum":0,"maximum":9007199254740991},"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["searchResultId","dryRun","count","matched","mint","held","unlock","alreadyUnlocked","conflicts","incomplete","quote","charged","balance"],"additionalProperties":false},"commons.publishInput":{"type":"object","properties":{"jurisdiction":{"type":"string","pattern":"^[A-Z]{2}$"},"generation":{"type":"string","pattern":"^\\d{8}_\\d{6}$"},"schemaVersion":{"default":"0.3.0","type":"string","const":"0.3.0"},"indices":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string","minLength":1}},"counts":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"schemes":{"type":"array","items":{"type":"object","properties":{"jurisdiction":{"type":"string","pattern":"^[A-Z]{2}$"},"scheme":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"displayName":{"type":"string","minLength":1},"issuingAuthority":{"type":"string","minLength":1},"normalization":{"type":"string","const":"strip-whitespace-punctuation-uppercase"},"registryIdentifier":{"type":"boolean"},"firstGeneration":{"type":"string","pattern":"^\\d{8}_\\d{6}$"}},"required":["jurisdiction","scheme","displayName","issuingAuthority","normalization","registryIdentifier","firstGeneration"],"additionalProperties":false}}},"required":["jurisdiction","generation","indices","counts","schemes"],"additionalProperties":false},"commons.publishOutput":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","const":"generation"},"schemaVersion":{"default":"0.3.0","type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"jurisdiction":{"type":"string","pattern":"^[A-Z]{2}$"},"generation":{"type":"string","minLength":1},"publishedAt":{"type":"string","minLength":1},"indices":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string","minLength":1}}},"required":["id","kind","schemaVersion","jurisdiction","generation","publishedAt","indices"],"additionalProperties":false},"commons.rollbackInput":{"type":"object","properties":{"jurisdiction":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["jurisdiction"],"additionalProperties":false},"commons.rollbackOutput":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","const":"generation"},"schemaVersion":{"default":"0.3.0","type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"jurisdiction":{"type":"string","pattern":"^[A-Z]{2}$"},"generation":{"type":"string","minLength":1},"publishedAt":{"type":"string","minLength":1},"indices":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string","minLength":1}}},"required":["id","kind","schemaVersion","jurisdiction","generation","publishedAt","indices"],"additionalProperties":false},"segment-createInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"What this set is called. A name, not a description."},"filter":{"type":"object","properties":{"type":{"type":"string","const":"group"},"logic":{"type":"string","enum":["AND","OR"]},"children":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"rule"},"fieldId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","notEquals","contains","notContains","startsWith","endsWith","in","notIn","isEmpty","isNotEmpty","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","between","isNull","isNotNull","before","after","onOrBefore","onOrAfter","isTrue","isFalse","withinBounds"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]},"params":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}}},"required":["type","fieldId","operator","value"]},{"type":"object","properties":{"type":{"type":"string","const":"group"},"logic":{"type":"string","enum":["AND","OR"]},"children":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"rule"},"fieldId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","notEquals","contains","notContains","startsWith","endsWith","in","notIn","isEmpty","isNotEmpty","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","between","isNull","isNotNull","before","after","onOrBefore","onOrAfter","isTrue","isFalse","withinBounds"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]},"params":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}}},"required":["type","fieldId","operator","value"]},{}]}}},"required":["type","logic","children"]}]}}},"required":["type","logic","children"],"description":"The filter. Leaves name their field by name: `core.<field>` for Core, `<namespace>.<field>` for a Catalog field, `registry.<field>` for Legal entity data. Every name is validated against your own vocabulary; a registry predicate selects only Companies whose Legal entity you have unlocked."}},"required":["name","filter"],"additionalProperties":false},"segment-createOutput":{"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)$"},"name":{"type":"string"},"filter":{"type":"object","properties":{"type":{"type":"string","const":"group"},"logic":{"type":"string","enum":["AND","OR"]},"children":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"rule"},"fieldId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","notEquals","contains","notContains","startsWith","endsWith","in","notIn","isEmpty","isNotEmpty","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","between","isNull","isNotNull","before","after","onOrBefore","onOrAfter","isTrue","isFalse","withinBounds"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]},"params":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}}},"required":["type","fieldId","operator","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"group"},"logic":{"type":"string","enum":["AND","OR"]},"children":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"rule"},"fieldId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","notEquals","contains","notContains","startsWith","endsWith","in","notIn","isEmpty","isNotEmpty","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","between","isNull","isNotNull","before","after","onOrBefore","onOrAfter","isTrue","isFalse","withinBounds"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]},"params":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}}},"required":["type","fieldId","operator","value"],"additionalProperties":false},{}]}}},"required":["type","logic","children"],"additionalProperties":false}]}}},"required":["type","logic","children"],"additionalProperties":false},"etag":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","filter","etag","createdAt","updatedAt"],"additionalProperties":false},"segmentsInput":{"type":"object","properties":{"cursor":{"type":"string","minLength":1},"limit":{"default":50,"type":"integer","minimum":1,"maximum":9007199254740991}},"additionalProperties":false},"segmentsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"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)$"},"name":{"type":"string"},"filter":{"type":"object","properties":{"type":{"type":"string","const":"group"},"logic":{"type":"string","enum":["AND","OR"]},"children":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"rule"},"fieldId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","notEquals","contains","notContains","startsWith","endsWith","in","notIn","isEmpty","isNotEmpty","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","between","isNull","isNotNull","before","after","onOrBefore","onOrAfter","isTrue","isFalse","withinBounds"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]},"params":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}}},"required":["type","fieldId","operator","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"group"},"logic":{"type":"string","enum":["AND","OR"]},"children":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"rule"},"fieldId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","notEquals","contains","notContains","startsWith","endsWith","in","notIn","isEmpty","isNotEmpty","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","between","isNull","isNotNull","before","after","onOrBefore","onOrAfter","isTrue","isFalse","withinBounds"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]},"params":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}}},"required":["type","fieldId","operator","value"],"additionalProperties":false},{}]}}},"required":["type","logic","children"],"additionalProperties":false}]}}},"required":["type","logic","children"],"additionalProperties":false},"etag":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","filter","etag","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"],"additionalProperties":false},"segmentInput":{"type":"object","properties":{"segmentId":{"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)$"}},"required":["segmentId"],"additionalProperties":false},"segmentOutput":{"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)$"},"name":{"type":"string"},"filter":{"type":"object","properties":{"type":{"type":"string","const":"group"},"logic":{"type":"string","enum":["AND","OR"]},"children":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"rule"},"fieldId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","notEquals","contains","notContains","startsWith","endsWith","in","notIn","isEmpty","isNotEmpty","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","between","isNull","isNotNull","before","after","onOrBefore","onOrAfter","isTrue","isFalse","withinBounds"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]},"params":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}}},"required":["type","fieldId","operator","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"group"},"logic":{"type":"string","enum":["AND","OR"]},"children":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"rule"},"fieldId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","notEquals","contains","notContains","startsWith","endsWith","in","notIn","isEmpty","isNotEmpty","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","between","isNull","isNotNull","before","after","onOrBefore","onOrAfter","isTrue","isFalse","withinBounds"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]},"params":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}}},"required":["type","fieldId","operator","value"],"additionalProperties":false},{}]}}},"required":["type","logic","children"],"additionalProperties":false}]}}},"required":["type","logic","children"],"additionalProperties":false},"etag":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","filter","etag","createdAt","updatedAt"],"additionalProperties":false},"segment-updateInput":{"type":"object","properties":{"segmentId":{"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":{"type":"string","minLength":1,"maxLength":255,"description":"What this set is called. A name, not a description."},"filter":{"type":"object","properties":{"type":{"type":"string","const":"group"},"logic":{"type":"string","enum":["AND","OR"]},"children":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"rule"},"fieldId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","notEquals","contains","notContains","startsWith","endsWith","in","notIn","isEmpty","isNotEmpty","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","between","isNull","isNotNull","before","after","onOrBefore","onOrAfter","isTrue","isFalse","withinBounds"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]},"params":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}}},"required":["type","fieldId","operator","value"]},{"type":"object","properties":{"type":{"type":"string","const":"group"},"logic":{"type":"string","enum":["AND","OR"]},"children":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"rule"},"fieldId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","notEquals","contains","notContains","startsWith","endsWith","in","notIn","isEmpty","isNotEmpty","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","between","isNull","isNotNull","before","after","onOrBefore","onOrAfter","isTrue","isFalse","withinBounds"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]},"params":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}}},"required":["type","fieldId","operator","value"]},{}]}}},"required":["type","logic","children"]}]}}},"required":["type","logic","children"],"description":"The filter. Leaves name their field by name: `core.<field>` for Core, `<namespace>.<field>` for a Catalog field, `registry.<field>` for Legal entity data. Every name is validated against your own vocabulary; a registry predicate selects only Companies whose Legal entity you have unlocked."}},"required":["segmentId"],"additionalProperties":false},"segment-updateOutput":{"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)$"},"name":{"type":"string"},"filter":{"type":"object","properties":{"type":{"type":"string","const":"group"},"logic":{"type":"string","enum":["AND","OR"]},"children":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"rule"},"fieldId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","notEquals","contains","notContains","startsWith","endsWith","in","notIn","isEmpty","isNotEmpty","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","between","isNull","isNotNull","before","after","onOrBefore","onOrAfter","isTrue","isFalse","withinBounds"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]},"params":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}}},"required":["type","fieldId","operator","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"group"},"logic":{"type":"string","enum":["AND","OR"]},"children":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"rule"},"fieldId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","notEquals","contains","notContains","startsWith","endsWith","in","notIn","isEmpty","isNotEmpty","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","between","isNull","isNotNull","before","after","onOrBefore","onOrAfter","isTrue","isFalse","withinBounds"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]},"params":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}}},"required":["type","fieldId","operator","value"],"additionalProperties":false},{}]}}},"required":["type","logic","children"],"additionalProperties":false}]}}},"required":["type","logic","children"],"additionalProperties":false},"etag":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","filter","etag","createdAt","updatedAt"],"additionalProperties":false},"segment-deleteInput":{"type":"object","properties":{"segmentId":{"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)$"},"confirm":{"default":"false","description":"Set to `true` to delete; otherwise the call only reports what it would remove.","type":"string","enum":["true","false"]},"reduceFacts":{"description":"The reduce-Fact count quoted by an earlier unconfirmed delete. When supplied, deletion is refused if the count changed.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["segmentId"],"additionalProperties":false},"segment-deleteOutput":{"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)$"},"reduceFacts":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","reduceFacts"],"additionalProperties":false},"segment-companiesInput":{"type":"object","properties":{"segmentId":{"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)$"},"cursor":{"type":"string","minLength":1},"limit":{"default":50,"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["segmentId"],"additionalProperties":false},"segment-companiesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque, organization-scoped, never reused."},"name":{"type":"string"},"country":{"type":"string"},"origin":{"type":"string","enum":["commons","external"]},"verified":{"type":"boolean"},"unlocked":{"type":"boolean"},"legalEntityId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activities":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"ISIC Rev.5 code: a section letter or 2–4 digits."},"precision":{"type":"string","enum":["section","division","group","class"]},"source":{"type":"object","properties":{"scheme":{"type":"string","enum":["isic5","nace21","nace2"]},"code":{"type":"string"}},"required":["scheme","code"],"additionalProperties":false},"primary":{"type":"boolean"}},"required":["code","precision","source","primary"],"additionalProperties":false}},"identifiers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"registration"},"country":{"type":"string"},"scheme":{"type":"string"},"value":{"type":"string"},"primary":{"type":"boolean"},"verifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","country","scheme","value","primary","verifiedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"organization_system"},"system":{"type":"string"},"value":{"type":"string"},"primary":{"type":"boolean"}},"required":["kind","system","value","primary"],"additionalProperties":false}]}},"domains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"primary":{"type":"boolean"}},"required":["domain","primary"],"additionalProperties":false}},"etag":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","country","origin","verified","unlocked","legalEntityId","activities","identifiers","domains","etag","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items","nextCursor","total"],"additionalProperties":false},"enrichInput":{"oneOf":[{"type":"object","properties":{"tool":{"type":"string","const":"domain-finder"},"intent":{"type":"string","minLength":1,"maxLength":200,"description":"One sentence naming why this Job runs, shown to the humans monitoring it."},"target":{"anyOf":[{"type":"object","properties":{"companyIds":{"minItems":1,"maxItems":50000,"type":"array","items":{"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 Companies to run over, by id. Repeated ids collapse: one target is one Run."}},"required":["companyIds"],"additionalProperties":false},{"type":"object","properties":{"segment":{"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":"A live Segment. Its members are resolved at admission and frozen into the Job, which reports exactly that list forever however the Segment moves afterwards."}},"required":["segment"],"additionalProperties":false}]},"maxCredits":{"type":"integer","minimum":0,"maximum":9007199254740991},"priority":{"default":"normal","type":"string","enum":["background","normal","urgent"],"description":"Scheduling tier for this Job. Every authorized agent may choose background, normal, or urgent; priority orders free slots first, never preempts running Runs, and urgent has no surcharge or cap."},"dryRun":{"default":false,"type":"boolean"},"workstreamId":{"anyOf":[{"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)$"},{"type":"null"}]},"input":{"default":{},"type":"object","properties":{"context":{"default":[],"description":"Catalog fields to resolve for each target, up to 8. Each is a `namespace.field` reference; a target without that Fact simply lacks it.","maxItems":8,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}\\.[a-z][a-z0-9_]{0,63}$","description":"A Catalog field reference, `namespace.field`."}},"required":["field"],"additionalProperties":false}}},"additionalProperties":false,"description":"Resolves the Company's website and reads Core implicitly. Catalog field references provide supplementary context."}},"required":["tool","intent","target","maxCredits"],"additionalProperties":false},{"type":"object","properties":{"tool":{"type":"string","const":"legal-entity-finder"},"intent":{"type":"string","minLength":1,"maxLength":200,"description":"One sentence naming why this Job runs, shown to the humans monitoring it."},"target":{"anyOf":[{"type":"object","properties":{"companyIds":{"minItems":1,"maxItems":50000,"type":"array","items":{"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 Companies to run over, by id. Repeated ids collapse: one target is one Run."}},"required":["companyIds"],"additionalProperties":false},{"type":"object","properties":{"segment":{"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":"A live Segment. Its members are resolved at admission and frozen into the Job, which reports exactly that list forever however the Segment moves afterwards."}},"required":["segment"],"additionalProperties":false}]},"maxCredits":{"type":"integer","minimum":0,"maximum":9007199254740991},"priority":{"default":"normal","type":"string","enum":["background","normal","urgent"],"description":"Scheduling tier for this Job. Every authorized agent may choose background, normal, or urgent; priority orders free slots first, never preempts running Runs, and urgent has no surcharge or cap."},"dryRun":{"default":false,"type":"boolean"},"workstreamId":{"anyOf":[{"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)$"},{"type":"null"}]},"input":{"default":{},"type":"object","properties":{},"additionalProperties":false,"description":"Finds a Company's Legal entity from its Core name, country and primary Domain. The gated skeleton accepts no Catalog fields."}},"required":["tool","intent","target","maxCredits"],"additionalProperties":false},{"type":"object","properties":{"tool":{"type":"string","const":"contact-finder"},"intent":{"type":"string","minLength":1,"maxLength":200,"description":"One sentence naming why this Job runs, shown to the humans monitoring it."},"target":{"anyOf":[{"type":"object","properties":{"companyIds":{"minItems":1,"maxItems":50000,"type":"array","items":{"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 Companies to run over, by id. Repeated ids collapse: one target is one Run."}},"required":["companyIds"],"additionalProperties":false},{"type":"object","properties":{"segment":{"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":"A live Segment. Its members are resolved at admission and frozen into the Job, which reports exactly that list forever however the Segment moves afterwards."}},"required":["segment"],"additionalProperties":false}]},"maxCredits":{"type":"integer","minimum":0,"maximum":9007199254740991},"priority":{"default":"normal","type":"string","enum":["background","normal","urgent"],"description":"Scheduling tier for this Job. Every authorized agent may choose background, normal, or urgent; priority orders free slots first, never preempts running Runs, and urgent has no surcharge or cap."},"dryRun":{"default":false,"type":"boolean"},"workstreamId":{"anyOf":[{"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)$"},{"type":"null"}]},"input":{"default":{},"type":"object","properties":{"context":{"default":[],"description":"Catalog fields to resolve for each target, up to 8. Each is a `namespace.field` reference; a target without that Fact simply lacks it.","maxItems":8,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}\\.[a-z][a-z0-9_]{0,63}$","description":"A Catalog field reference, `namespace.field`."}},"required":["field"],"additionalProperties":false}},"minContactThreshold":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Early-stop threshold: extraction stops once this many contacts have been found (default 5). Lower values reduce cost and latency.","examples":[5]}},"additionalProperties":false,"description":"Reads one Company's site, taking the site from the Company's primary Domain."}},"required":["tool","intent","target","maxCredits"],"additionalProperties":false},{"type":"object","properties":{"tool":{"type":"string","const":"web-research"},"intent":{"type":"string","minLength":1,"maxLength":200,"description":"One sentence naming why this Job runs, shown to the humans monitoring it."},"target":{"anyOf":[{"type":"object","properties":{"companyIds":{"minItems":1,"maxItems":50000,"type":"array","items":{"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 Companies to run over, by id. Repeated ids collapse: one target is one Run."}},"required":["companyIds"],"additionalProperties":false},{"type":"object","properties":{"segment":{"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":"A live Segment. Its members are resolved at admission and frozen into the Job, which reports exactly that list forever however the Segment moves afterwards."}},"required":["segment"],"additionalProperties":false}]},"maxCredits":{"type":"integer","minimum":0,"maximum":9007199254740991},"priority":{"default":"normal","type":"string","enum":["background","normal","urgent"],"description":"Scheduling tier for this Job. Every authorized agent may choose background, normal, or urgent; priority orders free slots first, never preempts running Runs, and urgent has no surcharge or cap."},"dryRun":{"default":false,"type":"boolean"},"workstreamId":{"anyOf":[{"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)$"},{"type":"null"}]},"input":{"type":"object","properties":{"goal":{"type":"string","minLength":1,"description":"The purpose of this research — why you are running this workflow","examples":["Evaluate as potential wholesale partner for Scandinavian design furniture"]},"instructions":{"type":"string","minLength":1,"description":"Optional HOW — specific search or evaluation pointers for this run","examples":["Focus on B2B pricing and minimum order quantities"]},"searchLocale":{"type":"string","description":"ISO 3166-1 alpha-2 country the web search is localized to; never Company identity","examples":["EE"]},"siteOnly":{"default":false,"type":"boolean","description":"Restrict all search queries to the anchor domains"},"outputSchema":{"type":"object","properties":{"type":{"type":"string","const":"object"},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}\\.[a-z][a-z0-9_]{0,63}$"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"Field definitions keyed by `namespace.field` Catalog references"},"required":{"type":"array","items":{"type":"string"}}},"required":["type","properties"],"description":"JSON Schema (type: object) defining the Catalog fields to extract. Property names are `namespace.field` Catalog references. Min 1, max 5 properties."},"context":{"default":[],"description":"Catalog fields to resolve for each target, up to 8. Each is a `namespace.field` reference; a target without that Fact simply lacks it.","maxItems":8,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}\\.[a-z][a-z0-9_]{0,63}$","description":"A Catalog field reference, `namespace.field`."}},"required":["field"],"additionalProperties":false}}},"required":["goal","outputSchema"],"additionalProperties":false,"description":"Research the web against a Company, reading its Core implicitly. `context` names Catalog fields to resolve for each target, and every `outputSchema` property names the Catalog field its answer is recorded into."}},"required":["tool","intent","target","maxCredits","input"],"additionalProperties":false}]},"enrichOutput":{"anyOf":[{"type":"object","properties":{"dryRun":{"type":"boolean","const":true},"tool":{"type":"string"},"targeted":{"type":"integer","minimum":0,"maximum":9007199254740991},"quote":{"type":"object","properties":{"runs":{"type":"integer","minimum":0,"maximum":9007199254740991},"unlocks":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["runs","unlocks","total"],"additionalProperties":false},"refused":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"reason":{"type":"string","const":"missing_input"},"missing":{"type":"array","items":{"type":"string","enum":["name","country","domain","activity","identifier"]}}},"required":["companyId","reason","missing"],"additionalProperties":false}}},"required":["dryRun","tool","targeted","quote","refused"],"additionalProperties":false},{"type":"object","properties":{"job":{"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)$"},"organizationId":{"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)$"},"kind":{"type":"string","enum":["enrichment","segment_export"]},"intent":{"type":"string"},"lifecycle":{"type":"string","enum":["waiting","queued","running","cancelling","completed","completed_with_issues","failed","cancelled"]},"priority":{"type":"string","enum":["background","normal","urgent"],"description":"Scheduling tier for this Job. Every authorized agent may choose background, normal, or urgent; priority orders free slots first, never preempts running Runs, and urgent has no surcharge or cap."},"occupiedSlots":{"type":"integer","minimum":0,"maximum":9007199254740991},"scopeType":{"type":"string","enum":["segment","company","inline"]},"segmentId":{"anyOf":[{"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)$"},{"type":"null"}]},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"runs":{"type":"object","properties":{"waiting":{"type":"integer","minimum":0,"maximum":9007199254740991},"queued":{"type":"integer","minimum":0,"maximum":9007199254740991},"running":{"type":"integer","minimum":0,"maximum":9007199254740991},"succeeded":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"cancelled":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["waiting","queued","running","succeeded","failed","cancelled"],"additionalProperties":false},"runTotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"quotedCredits":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxCredits":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"workstreamId":{"anyOf":[{"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)$"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"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)$"},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"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)$"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"cancelRequestedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","organizationId","kind","intent","lifecycle","priority","occupiedSlots","scopeType","segmentId","companyId","targetCount","runs","runTotal","quotedCredits","maxCredits","workstreamId","createdByUserId","createdByApiKeyId","startedAt","completedAt","cancelRequestedAt","errorCode","errorMessage","createdAt","updatedAt"],"additionalProperties":false},"quote":{"type":"object","properties":{"runs":{"type":"integer","minimum":0,"maximum":9007199254740991},"unlocks":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["runs","unlocks","total"],"additionalProperties":false},"targeted":{"type":"integer","minimum":0,"maximum":9007199254740991},"refused":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"reason":{"type":"string","const":"missing_input"},"missing":{"type":"array","items":{"type":"string","enum":["name","country","domain","activity","identifier"]}}},"required":["companyId","reason","missing"],"additionalProperties":false}}},"required":["job","quote","targeted","refused"],"additionalProperties":false}]},"enrichmentInput":{"type":"object","properties":{"enrichmentId":{"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)$"}},"required":["enrichmentId"],"additionalProperties":false},"enrichmentOutput":{"type":"object","properties":{"executionId":{"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":"Developer/programmatic UUID handle for API polling and automation."},"workflow":{"type":"string"},"lifecycle":{"type":"string","enum":["waiting","queued","running","completed","completed_with_errors","failed","cancelled"],"description":"Where the run is in its lifecycle. Admission waiting/queued states come from the customer job; terminal states come from the enrichment."},"outcome":{"anyOf":[{"type":"string","enum":["found","nothing_found","couldnt_look","failed","cancelled"]},{"type":"null"}],"description":"The Target's outcome: found, nothing_found, couldnt_look (the world's Fault: the site was down, blocked or unreachable, or the register lacks the data), failed (spore's Fault, refunded in full) or cancelled. Null while the run is waiting, queued, or running. On a Job's own row it rolls its Targets up: failed if any failed, else found if any found, else nothing_found if any found nothing, else couldnt_look."},"message":{"type":"string","description":"Human-readable summary of the run outcome. Always present."},"input":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Validated workflow input; legacy/internal executions may have null input data."},"output":{"description":"Flat workflow-specific output when the outcome is found; null otherwise."},"billing":{"type":"object","properties":{"creditsCharged":{"type":"number","description":"Credits charged for the workflow execution."}},"required":["creditsCharged"],"additionalProperties":{},"description":"Credits charged at trigger time. Platform-admin callers may also receive internal cost fields."},"startedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"launch":{"description":"Present only when this execution is a launch. `targeted` is the declaration; `completed`, `failed` and `canceled` are derived from the children that have arrived under it.","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)$"},"segmentId":{"anyOf":[{"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)$"},{"type":"null"}]},"tool":{"type":"string"},"executor":{"type":"string","enum":["spore","external","human","system"]},"launchKind":{"anyOf":[{"type":"string","enum":["validation","full"]},{"type":"null"}]},"priority":{"type":"string","enum":["background","normal","urgent"],"description":"Scheduling tier for this Job. Every authorized agent may choose background, normal, or urgent; priority orders free slots first, never preempts running Runs, and urgent has no surcharge or cap."},"lifecycle":{"type":"string","enum":["waiting","queued","running","completed","completed_with_errors","failed","cancelled"]},"outcome":{"anyOf":[{"type":"string","enum":["found","nothing_found","couldnt_look","failed","cancelled"]},{"type":"null"}],"description":"The Job's Targets rolled up: failed if any failed, else found if any found, else nothing_found if any found nothing, else couldnt_look; cancelled when the Job was cancelled. Null until the Job settles."},"targeted":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"canceled":{"type":"integer","minimum":0,"maximum":9007199254740991},"cancelRequestedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","segmentId","tool","executor","launchKind","priority","lifecycle","outcome","targeted","completed","failed","canceled","cancelRequestedAt","error","createdAt"],"additionalProperties":false}},"required":["executionId","workflow","lifecycle","outcome","message","input","output","billing","startedAt","completedAt","createdAt"],"additionalProperties":false},"launch-itemsInput":{"type":"object","properties":{"enrichmentId":{"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)$"},"include":{"type":"string","const":"output"},"lifecycle":{"type":"string","enum":["waiting","queued","running","completed","completed_with_errors","failed","cancelled"]},"outcome":{"anyOf":[{"type":"string","enum":["found","nothing_found","couldnt_look","failed","cancelled"]},{"type":"null"}]},"cursor":{"type":"string","minLength":1},"limit":{"default":100,"type":"integer","minimum":1,"maximum":200}},"required":["enrichmentId"],"additionalProperties":false},"launch-itemsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"enrichmentId":{"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)$"},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetIndex":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"lifecycle":{"type":"string","enum":["waiting","queued","running","completed","completed_with_errors","failed","cancelled"]},"outcome":{"anyOf":[{"type":"string","enum":["found","nothing_found","couldnt_look","failed","cancelled"]},{"type":"null"}]},"output":{},"message":{"type":"string"},"creditsCharged":{"type":"integer","minimum":0,"maximum":9007199254740991},"error":{"anyOf":[{"type":"object","properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["enrichmentId","companyId","targetIndex","lifecycle","outcome","message","creditsCharged","error","createdAt","completedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"],"additionalProperties":false},"job-targetsInput":{"type":"object","properties":{"jobId":{"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)$"},"cursor":{"type":"string","minLength":1},"limit":{"default":50,"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["jobId"],"additionalProperties":false},"job-targetsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"targetIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"companyId":{"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)$"}},"required":["targetIndex","companyId"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"watermarks":{"type":"object","properties":{"postgres":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"generations":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["postgres","generations"],"additionalProperties":false}},"required":["items","nextCursor","watermarks"],"additionalProperties":false},"cancelInput":{"type":"object","properties":{"enrichmentId":{"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)$"}},"required":["enrichmentId"],"additionalProperties":false},"cancelOutput":{"type":"object","properties":{"launch":{"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)$"},"segmentId":{"anyOf":[{"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)$"},{"type":"null"}]},"tool":{"type":"string"},"executor":{"type":"string","enum":["spore","external","human","system"]},"launchKind":{"anyOf":[{"type":"string","enum":["validation","full"]},{"type":"null"}]},"priority":{"type":"string","enum":["background","normal","urgent"],"description":"Scheduling tier for this Job. Every authorized agent may choose background, normal, or urgent; priority orders free slots first, never preempts running Runs, and urgent has no surcharge or cap."},"lifecycle":{"type":"string","enum":["waiting","queued","running","completed","completed_with_errors","failed","cancelled"]},"outcome":{"anyOf":[{"type":"string","enum":["found","nothing_found","couldnt_look","failed","cancelled"]},{"type":"null"}],"description":"The Job's Targets rolled up: failed if any failed, else found if any found, else nothing_found if any found nothing, else couldnt_look; cancelled when the Job was cancelled. Null until the Job settles."},"targeted":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"canceled":{"type":"integer","minimum":0,"maximum":9007199254740991},"cancelRequestedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","segmentId","tool","executor","launchKind","priority","lifecycle","outcome","targeted","completed","failed","canceled","cancelRequestedAt","error","createdAt"],"additionalProperties":false}},"required":["launch"],"additionalProperties":false},"eventsInput":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"eventsOutput":{"type":"object","properties":{"destination":{"type":"string","format":"uri","description":"The externally routable URL of the organization's events stream."}},"required":["destination"],"additionalProperties":false}}},"paths":{"/api/v1/catalog":{"get":{"operationId":"catalog","tags":["Catalog"],"summary":"Read a vocabulary: tools, filters, knowledge, or NACE","description":"One discovery endpoint over four vocabularies, selected by `section`. `tools` lists available workflows, `filters` describes the search grammar, `knowledge` reports this organization's declared namespaces, and `nace` returns the NACE Rev 2.1 taxonomy. NACE also supports a compact text projection and a flat Class-level projection.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"If-None-Match","in":"header","required":false,"schema":{"type":"string"},"description":"A cached ETag for conditional reads."},{"name":"section","in":"query","required":true,"schema":{"type":"string","enum":["tools","filters","knowledge","nace"]},"description":"Which vocabulary to read."},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["json","text"],"default":"json"},"description":"`section=nace` only. `text` is a compact hierarchy."},{"name":"level","in":"query","required":false,"schema":{"type":"string","enum":["tree","class"],"default":"tree"},"description":"`section=nace` only. Select nested tree or flat Class rows."},{"name":"naceSection","in":"query","required":false,"schema":{"type":"string","enum":["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V"]},"description":"`section=nace` only. Restrict the taxonomy to one section."}],"responses":{"200":{"description":"The requested vocabulary","headers":{"ETag":{"description":"Strong validator for this vocabulary representation.","schema":{"type":"string"}},"Cache-Control":{"description":"Caching policy for this vocabulary representation.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/catalogOutput"},"example":{"tools":[{"id":"web-research","name":"Web Researcher","description":"Research any topic from the web and extract structured data into a custom schema","path":"/api/v1/enrich","credits":6,"billingNote":"Found and nothing_found keep the charge; couldnt_look and cancelled refund the credits no provider work consumed; failed (spore's Fault) is refunded in full.","inputSchema":{"type":"object","properties":{"goal":{"type":"string","minLength":1,"description":"The purpose of this research — why you are running this workflow","examples":["Evaluate as potential wholesale partner for Scandinavian design furniture"]},"instructions":{"type":"string","minLength":1,"description":"Optional HOW — specific search or evaluation pointers for this run","examples":["Focus on B2B pricing and minimum order quantities"]},"searchLocale":{"type":"string","description":"ISO 3166-1 alpha-2 country the web search is localized to; never Company identity","examples":["EE"]},"siteOnly":{"default":false,"type":"boolean","description":"Restrict all search queries to the anchor domains"},"outputSchema":{"type":"object","properties":{"type":{"type":"string","const":"object"},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}\\.[a-z][a-z0-9_]{0,63}$"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"Field definitions keyed by `namespace.field` Catalog references"},"required":{"type":"array","items":{"type":"string"}}},"required":["type","properties"],"description":"JSON Schema (type: object) defining the Catalog fields to extract. Property names are `namespace.field` Catalog references. Min 1, max 5 properties."},"context":{"default":[],"description":"Catalog fields to resolve for each target, up to 8. Each is a `namespace.field` reference; a target without that Fact simply lacks it.","maxItems":8,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}\\.[a-z][a-z0-9_]{0,63}$","description":"A Catalog field reference, `namespace.field`."}},"required":["field"],"additionalProperties":false}}},"required":["goal","outputSchema"],"additionalProperties":false,"description":"Research the web against a Company, reading its Core implicitly. `context` names Catalog fields to resolve for each target, and every `outputSchema` property names the Catalog field its answer is recorded into."},"exampleInput":{"goal":"Research this company and find out what they do and how many employees they have.","outputSchema":{"type":"object","properties":{"market.description":{"type":"string","description":"What the company does in one sentence"},"market.employee_count":{"type":"number","description":"Approximate number of employees"}}},"searchLocale":"EE","context":[]}},{"id":"domain-finder","name":"Domain Finder","description":"Find the official website domain for a company using AI","path":"/api/v1/enrich","credits":2,"billingNote":"Found and nothing_found keep the charge; couldnt_look and cancelled refund the credits no provider work consumed; failed (spore's Fault) is refunded in full.","inputSchema":{"type":"object","properties":{"context":{"default":[],"description":"Catalog fields to resolve for each target, up to 8. Each is a `namespace.field` reference; a target without that Fact simply lacks it.","maxItems":8,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}\\.[a-z][a-z0-9_]{0,63}$","description":"A Catalog field reference, `namespace.field`."}},"required":["field"],"additionalProperties":false}}},"additionalProperties":false,"description":"Resolves the Company's website and reads Core implicitly. Catalog field references provide supplementary context."},"exampleInput":{"context":[]}},{"id":"legal-entity-finder","name":"Legal Entity Finder","description":"Reserve Legal entity candidate discovery while its evidence contract is designed","path":"/api/v1/enrich","credits":1,"billingNote":"The required client reservation is refunded in full when the skeleton settles failed.","inputSchema":{"type":"object","properties":{},"additionalProperties":false,"description":"Finds a Company's Legal entity from its Core name, country and primary Domain. The gated skeleton accepts no Catalog fields."},"exampleInput":{}},{"id":"contact-finder","name":"Contact Finder","description":"Extract employee contacts from a company website","path":"/api/v1/enrich","credits":3,"billingNote":"Found and nothing_found keep the charge; couldnt_look and cancelled refund the credits no provider work consumed; failed (spore's Fault) is refunded in full.","inputSchema":{"type":"object","properties":{"context":{"default":[],"description":"Catalog fields to resolve for each target, up to 8. Each is a `namespace.field` reference; a target without that Fact simply lacks it.","maxItems":8,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}\\.[a-z][a-z0-9_]{0,63}$","description":"A Catalog field reference, `namespace.field`."}},"required":["field"],"additionalProperties":false}},"minContactThreshold":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Early-stop threshold: extraction stops once this many contacts have been found (default 5). Lower values reduce cost and latency.","examples":[5]}},"additionalProperties":false,"description":"Reads one Company's site, taking the site from the Company's primary Domain."},"exampleInput":{"context":[],"minContactThreshold":5}}]}},"text/plain":{"schema":{"$ref":"#/components/schemas/catalogOutput"}}}},"304":{"description":"The representation has not changed since the supplied ETag.","headers":{"ETag":{"description":"Strong validator for this vocabulary representation.","schema":{"type":"string"}},"Cache-Control":{"description":"Caching policy for this vocabulary representation.","schema":{"type":"string"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/keys":{"post":{"operationId":"key-create","tags":["Keys"],"summary":"Create an API key and reveal its secret once","description":"Requires an explicitly delegated key:manage capability whose creator is still an organization owner or admin. Callers carrying any spend bounds cannot create keys: delegation must not multiply a rolling budget. An unbounded management key may grant requested scopes, including priced scopes with finite per-request and rolling-budget bounds. Child expiry cannot exceed the caller's expiry. A restricted caller must grant an explicit subset of its Operation allowlist and cannot delegate key:manage. Null allowedOperations permits every Operation allowed by scopes; [] permits none. The secret is returned only on initial success and is never persisted in the idempotency receipt. Replays return 409; revoke the created key and use a new request if the secret was lost.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/key-createInput"},"example":{"name":"Research agent","scopes":["search:run"],"expirationDays":1,"budgetCredits":100,"budgetPeriodDays":1,"maxRequestCredits":10,"allowedOperations":["search"]}}}},"responses":{"201":{"description":"Created key policy and its one-time secret","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/key-createOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/keys/{keyId}/revoke":{"post":{"operationId":"key-revoke","tags":["Keys"],"summary":"Revoke an organization API key","description":"Requires key:manage and a creator who is still an organization owner or admin. The target must belong to the authenticated organization; missing and foreign keys both return 404. Revoking a recorded parent or transitive ancestor returns 403 key_ancestor_revocation_forbidden, including through revoked ancestors. Revoking an already revoked non-ancestor key succeeds without another policy event. Subsequent authentication with the revoked key is refused.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organization API key to revoke"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/key-revokeInput"}}}},"responses":{"200":{"description":"The key is revoked","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/key-revokeOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/wallet":{"get":{"operationId":"wallet","tags":["Wallet"],"summary":"Read the balance and this key's spend bounds","description":"Current Balance plus optional Committed, Spendable, and period Spent totals. `keyBounds` carries this key's scopes, per-request ceiling, rolling budget, budget window, and remaining headroom; `budgetPeriodDays` and `budgetRemaining` are null when the key has no budget. The read is organization-wide.\n\nFree.","x-credits-cost":0,"responses":{"200":{"description":"The organization's wallet economics and the calling key's bounds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/walletOutput"},"example":{"balance":500,"committed":120,"spendable":380,"spentThisPeriod":42,"lifetimePurchased":0,"lifetimeGranted":500,"lifetimeUsed":42,"keyBounds":{"scopes":["company:read","search:run"],"maxRequestCredits":200,"budgetCredits":2000,"budgetPeriodDays":30,"budgetRemaining":2000}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/wallet/transactions":{"get":{"operationId":"wallet-transactions","tags":["Wallet"],"summary":"Page the organization's credit ledger","description":"Every credit change, newest first, paged by opaque cursor. Pass `apiKeyId` to narrow the ledger to one principal's spend. Reads are organization-scoped.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque continuation token from the previous page's `nextCursor`. Omit for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Rows per page. Values above 100 are clamped, not rejected."},{"name":"apiKeyId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Return only spend attributed to this API key."}],"responses":{"200":{"description":"One page of ledger rows, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/wallet-transactionsOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audit/calls":{"get":{"operationId":"audit-calls","tags":["Audit"],"summary":"Page the organization's Operation calls","description":"Authenticated Operation calls, newest first, including refusals, free calls, and this read itself. A null status means no response has been recorded yet. Cost is actual net credits charged, not a quote; durable Job charges and refunds update the original call. Replays are separate zero-cost calls. Known revoked or expired credentials retain at most ten 401 samples per organization per rolling minute; further attempts increment suppressedAttempts on the latest sample without adding rows. This count is organization-wide, not attributed to the sample API key, and is zero when none. Other fields retain the original sampled call meaning. Filter by API key; opaque cursors preserve stable pagination. Organization-scoped.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque continuation token from the previous page's `nextCursor`. Omit for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Rows per page. Values above 100 are clamped, not rejected."},{"name":"apiKeyId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Return only calls attributed to this API key."}],"responses":{"200":{"description":"One page of Operation calls, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/audit-callsOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audit/calls/export":{"post":{"operationId":"audit-calls-export","tags":["Audit"],"summary":"Export the organization's Operation calls","description":"Export selected calls, a key-filtered query, or the organization call Collection using explicit allowlisted fields. Small exports return inline bytes; larger exports return a durable artifact receipt.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/audit-calls-exportInput"}}}},"responses":{"200":{"description":"Export receipt with inline content or pending artifact delivery","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/audit-calls-exportOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audit/events":{"get":{"operationId":"audit-events","tags":["Audit"],"summary":"Page the organization's recorded acts","description":"The organization's durable chronology, newest first: Job and Run lifecycle, Exports, key policy changes, governance changes and balance movements, each with the actor that performed it and the ids it was about. This is the same log the console renders and the same rows an agent can page; opaque cursors preserve stable pagination under concurrent writes. Filter by an exact recorded kind; an unrecognised kind is refused with 422 and the message names the recorded vocabulary. Organization-scoped.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque continuation token from the previous page's `nextCursor`. Omit for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Rows per page. Values above 100 are clamped, not rejected."},{"name":"kind","in":"query","required":false,"schema":{"type":"string"},"description":"Return only acts recorded under this exact kind, e.g. `key.policy_changed`. Unrecognised kinds are refused with 422 rather than answered with an empty page."}],"responses":{"200":{"description":"One page of recorded acts, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/audit-eventsOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audit/events/export":{"post":{"operationId":"audit-events-export","tags":["Audit"],"summary":"Export the organization's recorded acts","description":"Export the kind-filtered chronology or the whole act Collection using explicit allowlisted fields; a field outside the allowlist is refused with 422. Small exports return inline bytes; larger exports return a durable artifact receipt whose rows are frozen at request time.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/audit-events-exportInput"}}}},"responses":{"200":{"description":"Export receipt with inline content or pending artifact delivery","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/audit-events-exportOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/companies":{"post":{"operationId":"company-mint","tags":["Companies"],"summary":"Mint Companies from your own data, or attach rows to Companies you hold","description":"Imports up to 1000 rows. Each row needs a name, an operating country, at least one activity (ISIC Rev.5, NACE Rev.2.1, or NACE Rev.2 — converted to ISIC at the deepest level the code determines), and at least one identifier or domain. A row whose identifier a held Company already carries joins that Company; `into` joins a named Company; otherwise the row mints a new Company. A shared domain or an identical name and country is reported as `similar` and never decides. The whole batch is refused when any row is invalid, when an identifier belongs to two Companies, or when the batch would exceed the plan's Company allowance; `dryRun` returns the same plan and writes nothing.\n\nFree. A Company's Legal entity data is paid for once, inside the first priced request that touches it.","x-credits-cost":0,"x-billing-note":"A Company's Legal entity data is paid for once, inside the first priced request that touches it.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company-mintInput"},"example":{"rows":[{"name":"Coop Eesti Keskühistu","country":"EE","activities":[{"scheme":"nace21","code":"47.11"}],"identifiers":[{"kind":"organization_system","system":"hubspot","value":"8842001"}],"domains":[{"domain":"https://www.coop.ee"}]}],"dryRun":false}}}},"responses":{"200":{"description":"What each row did, in request order","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company-mintOutput"},"example":{"dryRun":false,"created":1,"matched":0,"attached":0,"items":[{"row":0,"action":"create","companyId":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","matchedBy":null,"similar":[]}]}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"operationId":"companies","tags":["Companies"],"summary":"Page the organization's Companies","description":"Lists the organization's Companies newest first under an opaque cursor, with their Core: name, country, activities, identifiers, and domains. Narrow by operating `country` or a name fragment `q`. Ids are opaque and never reused; a Company of another organization is invisible.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque continuation token from the previous page's `nextCursor`. Omit for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Rows per page. Values above 100 are clamped, not rejected."},{"name":"country","in":"query","required":false,"schema":{"type":"string"},"description":"ISO 3166-1 alpha-2 operating country."},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Case-insensitive name fragment."}],"responses":{"200":{"description":"One page of Companies","content":{"application/json":{"schema":{"$ref":"#/components/schemas/companiesOutput"},"example":{"items":[{"id":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","name":"Coop Eesti Keskühistu","country":"EE","origin":"external","verified":false,"unlocked":false,"legalEntityId":null,"activities":[{"code":"4711","precision":"class","source":{"scheme":"nace21","code":"4711"},"primary":true}],"identifiers":[{"kind":"registration","country":"EE","scheme":"ee-registrikood","value":"10093971","primary":true,"verifiedAt":null},{"kind":"organization_system","system":"hubspot","value":"8842001","primary":false}],"domains":[{"domain":"coop.ee","primary":true}],"etag":"\"1\"","createdAt":"2026-09-02T00:00:00.000Z","updatedAt":"2026-09-02T00:00:00.000Z"}],"nextCursor":null}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/companies/{companyId}":{"get":{"operationId":"company-read","tags":["Companies"],"summary":"Read one Company","description":"Returns the Company's Core with its strong ETag, and its Legal entity section: nothing when the Company holds no Registry link, existence with the legal name, the status and the Inventory of the Namespaces it has plus the unlock price when it is verified but not unlocked, and the live registry record once it is. A deleted id and an id of another organization both read as not found. The ETag validates the Core for a conditional correction; it is not a cache validator, because the registry section is read live and changes without the Core changing.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The Company's opaque id."}],"responses":{"200":{"description":"The Company","headers":{"ETag":{"description":"Strong validator for the returned Company; send it as `Spore-If-Match` on a correction. A CDN that compresses the answer may weaken it to `W/\"…\"`, which never matches: send the body's `etag`.","schema":{"type":"string"}},"Cache-Control":{"description":"Caching policy for the returned representation.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company-readOutput"},"example":{"id":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","name":"Coop Eesti Keskühistu","country":"EE","origin":"external","verified":false,"unlocked":false,"legalEntityId":null,"activities":[{"code":"4711","precision":"class","source":{"scheme":"nace21","code":"4711"},"primary":true}],"identifiers":[{"kind":"registration","country":"EE","scheme":"ee-registrikood","value":"10093971","primary":true,"verifiedAt":null},{"kind":"organization_system","system":"hubspot","value":"8842001","primary":false}],"domains":[{"domain":"coop.ee","primary":true}],"etag":"\"1\"","createdAt":"2026-09-02T00:00:00.000Z","updatedAt":"2026-09-02T00:00:00.000Z","legalEntity":null}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"operationId":"company-correct","tags":["Companies"],"summary":"Correct a Company's Core under Spore-If-Match","description":"Changes the name or operating country in place; each supplied set of activities, identifiers, or domains replaces the whole set, so a Company never loses its last activity, its last identifier-or-domain, or its primary. An identifier that stays keeps its verification; one another Company holds is refused naming the holder. A stale `Spore-If-Match` is refused with the current Company and its ETag.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The Company's opaque id."},{"name":"Spore-If-Match","in":"header","required":true,"schema":{"type":"string"},"description":"The resource's current ETag, so a write cannot overwrite a change made by another caller. The standard conditional headers (`If-Match` and its kin) are refused on writes (ADR-0062)."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company-correctInput"},"example":{"companyId":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","name":"Coop Eesti Keskühistu","domains":[{"domain":"coop.ee","primary":true},{"domain":"ecoop.ee"}]}}}},"responses":{"200":{"description":"The corrected Company","headers":{"ETag":{"description":"Strong validator for the returned Company; send it as `Spore-If-Match` on a correction. A CDN that compresses the answer may weaken it to `W/\"…\"`, which never matches: send the body's `etag`.","schema":{"type":"string"}},"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company-correctOutput"},"example":{"id":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","name":"Coop Eesti Keskühistu","country":"EE","origin":"external","verified":false,"unlocked":false,"legalEntityId":null,"activities":[{"code":"4711","precision":"class","source":{"scheme":"nace21","code":"4711"},"primary":true}],"identifiers":[{"kind":"registration","country":"EE","scheme":"ee-registrikood","value":"10093971","primary":true,"verifiedAt":null},{"kind":"organization_system","system":"hubspot","value":"8842001","primary":false}],"domains":[{"domain":"coop.ee","primary":true}],"etag":"\"2\"","createdAt":"2026-09-02T00:00:00.000Z","updatedAt":"2026-09-02T00:00:00.000Z"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"428":{"description":"A required precondition header was not supplied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"operationId":"company-delete","tags":["Companies"],"summary":"Delete a Company","description":"Deletes the Company and its identifiers, activities, and domains outright; the id then reads as not found and the allowance count drops. Without `confirm=true` the call refuses with the counts it would remove. An Unlock grant on the Company's Legal entity is never deleted.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The Company's opaque id."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."},{"name":"confirm","in":"query","required":false,"schema":{"type":"string","enum":["true","false"],"default":"false"},"description":"`true` deletes; anything else only reports the counts."}],"responses":{"200":{"description":"What was removed","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company-deleteOutput"},"example":{"id":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","deleted":true,"removed":{"identifiers":2,"activities":1,"domains":1}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/companies/merge":{"post":{"operationId":"company-merge","tags":["Companies"],"summary":"Fold one Company into another","description":"Folds the absorbed Company into the survivor because both name the same Legal entity, and redirects the absorbed id to the survivor forever. Permitted only when the absorbed Company names no Legal entity or names the survivor's: two Companies bound to different entities are two businesses, and a verified Company absorbed into an unverified one is refused with the direction to merge instead. The absorbed Company's identifiers always move — one qualified value belongs to exactly one Company, so they cannot collide — and its domains and activities move unless the survivor already holds the same value. The survivor keeps its name, its country, and its primaries. `dryRun` reports the same plan and writes nothing. Unlock is untouched: a grant belongs to the Legal entity, not to a Company. There is no split and no undo.\n\nFree. A merge never refunds.","x-credits-cost":0,"x-billing-note":"A merge never refunds.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company-mergeInput"},"example":{"survivor":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","absorbed":"2b7a9f60-5d18-4e2c-8f31-6a4c0d9e2b15","dryRun":true}}}},"responses":{"200":{"description":"What moved, what conflicted, and the surviving Company","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company-mergeOutput"},"example":{"dryRun":true,"survivorId":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","absorbedId":"2b7a9f60-5d18-4e2c-8f31-6a4c0d9e2b15","moves":{"identifiers":[{"kind":"organization_system","system":"salesforce","value":"0015g"}],"domains":["ecoop.ee"],"activities":[]},"conflicts":[{"kind":"activity","value":"4711"}],"redirects":1,"survivor":{"id":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","name":"Coop Eesti Keskühistu","country":"EE","origin":"external","verified":false,"unlocked":false,"legalEntityId":null,"activities":[{"code":"4711","precision":"class","source":{"scheme":"nace21","code":"4711"},"primary":true}],"identifiers":[{"kind":"registration","country":"EE","scheme":"ee-registrikood","value":"10093971","primary":true,"verifiedAt":null},{"kind":"organization_system","system":"hubspot","value":"8842001","primary":false}],"domains":[{"domain":"coop.ee","primary":true}],"etag":"\"1\"","createdAt":"2026-09-02T00:00:00.000Z","updatedAt":"2026-09-02T00:00:00.000Z"}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/companies/legal-entity":{"post":{"operationId":"company-legal-entity","tags":["Companies"],"summary":"Read Legal entity data for Companies you hold","description":"Reads the live Registry record for up to 100 Companies, paying one credit for each Legal entity this organization has not unlocked before. `maxCredits` is mandatory spend consent and is checked against the worst-case quote before any Commons work; the whole request is refused rather than partly applied. `dryRun` returns that quote and which Companies it pays for, without reading the Commons, granting, or debiting; the real read charges the same, less what it cannot deliver: a Legal entity the Commons no longer carries, or one unlocked between the quote and the read. `namespaces` names the Namespaces whose Assertions ride beside each record, and only those the record's Inventory lists are read — read the Inventory off the locked section first, for free, and name its keys to get everything a Legal entity has, including the Namespaces a single Source owns. A Company with no Registry link is reported and never charged, an already-unlocked one is free forever, and a Legal entity the Commons no longer carries — including one withdrawn to a Tombstone — reads as absent.\n\nVariable price, quoted per request: up to 100 credits per call. 1 credit per Legal entity not yet unlocked, once, forever. Unverified and already-unlocked Companies are free.","x-credits-cost":100,"x-billing-note":"1 credit per Legal entity not yet unlocked, once, forever. Unverified and already-unlocked Companies are free.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company-legal-entityInput"},"example":{"companyIds":["7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3"],"maxCredits":1}}}},"responses":{"200":{"description":"Per-Company registry sections, what was charged, and the balance; or a dry run's quote","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company-legal-entityOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/companies/lookup":{"post":{"operationId":"company-lookup","tags":["Companies"],"summary":"Find Legal entities in the Commons","description":"Searches the Commons by name, by registration identifier, or both, and returns the Legal entities it carries. It mints nothing and unlocks nothing: each candidate reports whether this organization already holds a Company bound to it, so the caller decides what to mint (`POST /companies`) and what to pay to read (`POST /companies/legal-entity`).\n\nFree.","x-credits-cost":0,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company-lookupInput"},"example":{"name":"Coop Eesti","country":"EE"}}}},"responses":{"200":{"description":"Commons candidates, best match first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/company-lookupOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/companies/promote":{"post":{"operationId":"company-promote","tags":["Companies"],"summary":"Promote a declared current Fact into Company Core","description":"Adds each target Company's current Fact for one field declared with `promotes` to its Core, without replacing any existing value or primary. Domain values and qualified Identifier values are normalized before insertion. A registration Identifier must use a scheme the country's Commons publishes; it is verified inline and binds an unbound Company when carried. A Legal entity another Company already names is reported as a conflict, and a different entity than the target already names is reported as a mismatch; promotion never folds or rebinds Companies. Each changed Company's version and updated time move, while the immutable source Fact retains its producer and API-key/user attribution. `dryRun` returns the same per-Company outcomes and writes nothing.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company-promoteInput"},"example":{"field":"sales.website","companyIds":["7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","8a0d3b25-4c7f-4e62-ab30-2d9f6c1e58b4"],"dryRun":false}}}},"responses":{"200":{"description":"One promotion outcome for each target Company","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company-promoteOutput"},"example":{"dryRun":false,"field":"sales.website","promoted":1,"items":[{"companyId":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","outcome":"promoted","value":"example.com","heldBy":null},{"companyId":"8a0d3b25-4c7f-4e62-ab30-2d9f6c1e58b4","outcome":"no_value","value":null,"heldBy":null}]}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/namespaces":{"post":{"operationId":"namespace-declare","tags":["Knowledge"],"summary":"Declare a namespace and its fields before recording into them","description":"Declares what your organization wants to know about Companies: a namespace with typed fields, each carrying its unit, dimension, freshness, and meaning. Recording into a field that is not declared is refused, so this call comes first. The same call amends: a field you already declared is left alone, a new one is added, and a description or freshness you changed your mind about is updated — which makes it safe to send your whole catalog on every boot. What it never does is remove a field by omission, or change what a field *is* once a Fact references it: name, type, unit, dimension, and promotion are then fixed and the fix for a mistake is a new field. Caps are 1000 namespaces and 50 fields each.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/namespace-declareInput"},"example":{"name":"icp","description":"How well a company fits our ideal customer profile.","fields":[{"name":"score","type":"number","unit":"points","dimension":"fit","freshnessDays":90,"description":"0-10; how well the company fits, judged from its site."}]}}}},"responses":{"200":{"description":"The declaration, and what this call changed","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/namespace-declareOutput"},"example":{"namespace":{"name":"icp","owner":"organization","description":"How well a company fits our ideal customer profile.","fields":[{"name":"score","ref":"icp.score","type":"number","unit":"points","dimension":"fit","freshnessDays":90,"description":"0-10; how well the company fits, judged from its site.","promotes":null,"frozen":false,"createdAt":"2026-09-03T00:00:00.000Z","updatedAt":"2026-09-03T00:00:00.000Z"}],"createdAt":"2026-09-03T00:00:00.000Z","updatedAt":"2026-09-03T00:00:00.000Z"},"added":["score"],"updated":[]}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"operationId":"namespaces","tags":["Knowledge"],"summary":"Read your Catalog","description":"Returns every namespace this organization can record into: its own declarations, and the native ones the Spore tools own. A field marked `frozen` has Facts standing on it, so its type, unit, dimension, and promotion are fixed. The Catalog is private to the organization and never shared-cached.\n\nFree.","x-credits-cost":0,"responses":{"200":{"description":"Your namespaces and their declared fields","headers":{"Cache-Control":{"description":"Caching policy; always private.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/namespacesOutput"},"example":{"namespaces":[{"name":"icp","owner":"organization","description":"How well a company fits our ideal customer profile.","fields":[{"name":"score","ref":"icp.score","type":"number","unit":"points","dimension":"fit","freshnessDays":90,"description":"0-10; how well the company fits, judged from its site.","promotes":null,"frozen":false,"createdAt":"2026-09-03T00:00:00.000Z","updatedAt":"2026-09-03T00:00:00.000Z"}],"createdAt":"2026-09-03T00:00:00.000Z","updatedAt":"2026-09-03T00:00:00.000Z"}]}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/namespaces/{namespaceName}":{"delete":{"operationId":"namespace-delete","tags":["Knowledge"],"summary":"Delete a declaration while nothing stands on it","description":"Deletes one field with `?field=`, or the whole namespace without it. A field a Fact references is refused naming it: the declaration is what makes a recorded value readable, so it outlives nothing. Removing a namespace's last field removes the namespace. A native namespace is never deletable.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"namespaceName","in":"path","required":true,"schema":{"type":"string"},"description":"The namespace's name."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."},{"name":"field","in":"query","required":false,"schema":{"type":"string"},"description":"Delete just this field instead of the whole namespace."}],"responses":{"200":{"description":"What was removed","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/namespace-deleteOutput"},"example":{"name":"icp","deleted":true,"fields":["score"]}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/record":{"post":{"operationId":"record","tags":["Knowledge"],"summary":"Record what you observed about a Company or concluded about a Segment","description":"Appends up to 200 observations about one subject: a Company with `companyId`, or a Segment with `segmentId` when the conclusion is about the set rather than about any one member. Exactly one of the two — a Fact about both is a caller that has not decided what it observed. Every field must be declared first and every value is validated against its declared type, so a number field cannot receive \"about 5M\". A field you looked at and found nothing for is recorded with `absent: true` — knowledge, not a gap, and coverage reports it as checked rather than missing. Facts are appended and never edited: the newest observation becomes the current value, an older observation arriving late does not displace a newer one, and `pin: true` fixes one observation as current until `pin: false` releases it. Set `observedAt` when you learned something about an earlier moment. A conclusion about a Segment cites the Jobs it was reduced from with `{ kind: \"job\", jobId }` evidence. Native namespaces are refused: a Fact in one is a Spore run's receipt.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recordInput"},"example":{"companyId":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","fields":[{"field":"icp.score","value":8,"evidence":[{"kind":"url","url":"https://example.com/pricing","excerpt":"Enterprise plans start at 50 seats."}]}]}}}},"responses":{"200":{"description":"What was recorded, and which values are now current","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recordOutput"},"example":{"companyId":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","segmentId":null,"recorded":1,"items":[{"field":"icp.score","factId":"1d0f5b2c-9a37-4e61-8b25-7c3d4a1e6f80","current":true,"pinned":false}]}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/companies/{companyId}/facts":{"get":{"operationId":"company-facts","tags":["Knowledge"],"summary":"Read everything you know about one Company","description":"Returns the current value of every field this organization has observed about the Company, each with who produced it, when it was observed, the evidence behind it, whether the declaration's freshness has lapsed, and the full history underneath. A Fact that cites nothing says so with an empty `evidence`. Fields never observed are absent from the response — `POST /coverage` is the door that asks what is missing over a set.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The Company's opaque id."}],"responses":{"200":{"description":"Current values with their history","headers":{"Cache-Control":{"description":"Caching policy; always private.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company-factsOutput"},"example":{"companyId":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","fields":[{"field":"icp.score","type":"number","unit":"points","staleAfterDays":90,"stale":false,"current":{"factId":"1d0f5b2c-9a37-4e61-8b25-7c3d4a1e6f80","value":8,"absent":false,"observedAt":"2026-09-03T00:00:00.000Z","recordedAt":"2026-09-03T00:00:00.000Z","producer":"organization","runId":null,"evidence":[],"pinned":false},"history":[]}]}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/segments/{segmentId}/facts":{"get":{"operationId":"segment-facts","tags":["Knowledge"],"summary":"Read what you have concluded about one Segment","description":"Returns the current value of every field this organization has recorded about the Segment itself — reduce knowledge, the conclusions that are about the set rather than about any one member — each with who recorded it, when, the evidence behind it including the Jobs it was reduced from, whether its declaration's freshness has lapsed, and the full history underneath. Members' own Facts are read per Company; `POST /coverage` is the door that asks what a set is missing.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"segmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The Segment's id."}],"responses":{"200":{"description":"Current conclusions with their history","headers":{"Cache-Control":{"description":"Caching policy; always private.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/segment-factsOutput"},"example":{"segmentId":"b2d4f6a8-1c3e-5a79-9b0d-2e4f6a8c0b1d","fields":[{"field":"market.verdict","type":"string","unit":null,"staleAfterDays":30,"stale":false,"current":{"factId":"3f1a7c95-2b48-4d60-8e71-9a2b3c4d5e6f","value":"Worth a dedicated campaign","absent":false,"observedAt":"2026-09-03T00:00:00.000Z","recordedAt":"2026-09-03T00:00:00.000Z","producer":"organization","producedBy":{"apiKeyId":null,"userId":null},"runId":null,"confidence":null,"reasoning":null,"evidence":[{"kind":"job","jobId":"0c8e1a35-7d92-4f6b-8a04-5e3c9b1d7f28"}],"pinned":false},"history":[]}]}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/coverage":{"post":{"operationId":"coverage","tags":["Knowledge"],"summary":"Measure requested fields over a set of Companies","description":"Reports current, stale, explicitly checked-none, and never-observed counts for only the requested Catalog fields, over either an explicit list of Companies or a Segment's live members. A `registry.*` reference is answered in `commons` instead: coverage of Legal entity data is per Commons Namespace from each Legal entity's Inventory, not per field, and it costs no Unlock, because reading an Inventory never triggers one. This read uses POST because an explicit target may carry up to 10,000 Company ids; its read posture means it takes no Idempotency-Key.\n\nFree.","x-credits-cost":0,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/coverageInput"},"example":{"fields":["research.employee_count","registry.economic-activity.inventory.asOf"],"companyIds":["7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3"]}}}},"responses":{"200":{"description":"Coverage of the requested fields over the resolved set","headers":{"Cache-Control":{"description":"Organization-private live projection; shared caches must not store it.","schema":{"type":"string","example":"private, no-cache"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/coverageOutput"},"example":{"companies":1,"fields":[{"field":"research.employee_count","current":0,"stale":0,"checkedNone":0,"missing":1}],"commons":{"linked":1,"inventoried":1,"namespaces":[{"namespace":"economic-activity","present":1,"oldestAsOf":"2026-08-31"}]}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/search":{"post":{"operationId":"search","tags":["Search"],"summary":"Search the Commons: count, analytics, and a minted sample","description":"Runs a filter AST against the live Commons and answers with the population's count, its full analytics, and a sample of matching Legal entities minted as Companies of this organization — verified and unlocked from birth, with Core pre-filled from the registry. The charge is `max(5, newly unlocked)`: the floor pays for the count and analytics, and every Legal entity this organization has not unlocked before costs one credit, once, forever. A Company it already holds is unlocked in place rather than duplicated. An identical request replayed inside the receipt's window returns the original sample for nothing. The quote is the worst case, `max(5, sampleSize)`, computed before anything is read or written; the call is refused whole when it exceeds `maxCredits` or the key's bounds, and the charge never exceeds it. `dryRun` returns the quote without reading the Commons, minting, unlocking, or charging. Unlock the whole population with `POST /api/v1/search/{searchId}/unlock`.\n\nVariable price, quoted per request: up to 100 credits per call. Charged max(5, newly unlocked Legal entities); an active receipt replays for 0.","x-credits-cost":100,"x-billing-note":"Charged max(5, newly unlocked Legal entities); an active receipt replays for 0.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchInput"},"example":{"filter":null,"sampleSize":5,"maxCredits":5}}}},"responses":{"200":{"description":"The receipt, the population's count and analytics, the minted sample, the charge, and the expiry; or a dry run's quote","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/search/{searchId}/unlock":{"post":{"operationId":"search-unlock","tags":["Search"],"summary":"Unlock every Legal entity a search matched","description":"Mints every Legal entity the receipt's filter matches as a Company of this organization and unlocks it, at one credit per entity not unlocked before. The quote is computed from the live population before anything is written; the call is refused whole — never partly applied — when it exceeds `maxCredits`, the plan's Company allowance, or the balance, and `dryRun` returns the same quote without minting, unlocking, or charging. Two kinds of match are left alone and never charged, and both are counted in the response: `conflicts`, where an identifier of the entity belongs to a Company that already names a different Legal entity (a merge, not an unlock), and `incomplete`, where the registry record cannot make a Company's Core. A population above 50,000 entities is refused: narrow the filter and search again. The Companies it creates are listed through `GET /api/v1/companies`.\n\nVariable price, quoted per request. 1 credit per Legal entity not yet unlocked, once, forever. Already-unlocked entities are free.","x-credits-cost":0,"x-billing-note":"1 credit per Legal entity not yet unlocked, once, forever. Already-unlocked entities are free.","parameters":[{"name":"searchId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The search receipt's id, as `searchResultId`."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/search-unlockInput"},"example":{"searchId":"6b1f0d4e-9d3a-4d7c-8f2b-5a0e7c1d4f88","maxCredits":500,"dryRun":true}}}},"responses":{"200":{"description":"What the population resolved to, what was minted and unlocked, and the charge","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/search-unlockOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"The referenced resource has expired and will not come back","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/commons/publish":{"post":{"operationId":"commons.publish","tags":["Commons"],"summary":"Publish a staged Commons Generation","description":"Requires a platform-scoped commons:publish key; organization keys are refused regardless of scopes. The Service validates the staged Generation and atomically publishes its data aliases and Directory. A gate refusal changes no aliases.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commons.publishInput"}}}},"responses":{"200":{"description":"The published Generation's Directory document","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commons.publishOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/commons/rollback":{"post":{"operationId":"commons.rollback","tags":["Commons"],"summary":"Restore the retained previous Commons Generation","description":"Requires a platform-scoped commons:publish key; organization keys are refused regardless of scopes. Publishes the retained previous Generation for this Jurisdiction. Send a fresh Idempotency-Key for each intentional rollback, and reuse it only to retry that rollback.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commons.rollbackInput"}}}},"responses":{"200":{"description":"The published Generation's Directory document","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commons.rollbackOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/segments":{"post":{"operationId":"segment-create","tags":["Segments"],"summary":"Name a live filter over your Companies","description":"Stores a name and a filter, and nothing else. Members are whichever Companies match when you ask, so there is no count here, no snapshot, and no refresh: editing the filter changes membership immediately. Every field the filter names is validated against your own vocabulary — Core, your Catalog, and the registry field map — and an undeclared name is refused. Creating a Segment evaluates nothing.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/segment-createInput"},"example":{"name":"Estonian software, high ICP","filter":{"type":"group","logic":"AND","children":[{"type":"group","logic":"OR","children":[{"type":"rule","fieldId":"core.country","operator":"equals","value":"EE"},{"type":"rule","fieldId":"registry.revenueEur","operator":"greaterThan","value":1000000,"params":{"years":[2023]}}]},{"type":"rule","fieldId":"research.icp_score","operator":"greaterThan","value":7}]}}}}},"responses":{"201":{"description":"The Segment","headers":{"ETag":{"description":"Strong validator; send it as `Spore-If-Match` on the next edit. A CDN that compresses the answer may weaken it to `W/\"…\"`, which never matches: send the body's `etag`.","schema":{"type":"string","example":"\"2\""}},"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/segment-createOutput"},"example":{"id":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","name":"Estonian software, high ICP","filter":{"type":"group","logic":"AND","children":[{"type":"group","logic":"OR","children":[{"type":"rule","fieldId":"core.country","operator":"equals","value":"EE"},{"type":"rule","fieldId":"registry.revenueEur","operator":"greaterThan","value":1000000,"params":{"years":[2023]}}]},{"type":"rule","fieldId":"research.icp_score","operator":"greaterThan","value":7}]},"etag":"\"1\"","createdAt":"2026-09-03T10:00:00.000Z","updatedAt":"2026-09-03T10:00:00.000Z"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"operationId":"segments","tags":["Segments"],"summary":"Page the organization's Segments","description":"Lists Segments newest first under an opaque cursor, each with its name, its filter, and its ETag. No member counts: counting a set is a read of the set.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque continuation token from the previous page's `nextCursor`. Omit for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Rows per page. Values above 100 are clamped, not rejected."}],"responses":{"200":{"description":"One page of Segments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/segmentsOutput"},"example":{"items":[{"id":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","name":"Estonian software, high ICP","filter":{"type":"group","logic":"AND","children":[{"type":"group","logic":"OR","children":[{"type":"rule","fieldId":"core.country","operator":"equals","value":"EE"},{"type":"rule","fieldId":"registry.revenueEur","operator":"greaterThan","value":1000000,"params":{"years":[2023]}}]},{"type":"rule","fieldId":"research.icp_score","operator":"greaterThan","value":7}]},"etag":"\"1\"","createdAt":"2026-09-03T10:00:00.000Z","updatedAt":"2026-09-03T10:00:00.000Z"}],"nextCursor":null}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/segments/{segmentId}":{"get":{"operationId":"segment","tags":["Segments"],"summary":"Read a Segment's name and filter","description":"Returns the Segment and its ETag. Members, counts, and coverage are separate reads, because each of them is a question about live data rather than a property of the row.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"segmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The Segment."}],"responses":{"200":{"description":"The Segment","headers":{"ETag":{"description":"Strong validator; send it as `Spore-If-Match` on the next edit. A CDN that compresses the answer may weaken it to `W/\"…\"`, which never matches: send the body's `etag`.","schema":{"type":"string","example":"\"2\""}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/segmentOutput"},"example":{"id":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","name":"Estonian software, high ICP","filter":{"type":"group","logic":"AND","children":[{"type":"group","logic":"OR","children":[{"type":"rule","fieldId":"core.country","operator":"equals","value":"EE"},{"type":"rule","fieldId":"registry.revenueEur","operator":"greaterThan","value":1000000,"params":{"years":[2023]}}]},{"type":"rule","fieldId":"research.icp_score","operator":"greaterThan","value":7}]},"etag":"\"1\"","createdAt":"2026-09-03T10:00:00.000Z","updatedAt":"2026-09-03T10:00:00.000Z"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"operationId":"segment-update","tags":["Segments"],"summary":"Rename a Segment, or change what it means, under Spore-If-Match","description":"Changes the name, the filter, or both. Editing the filter changes membership immediately — there is nothing to rebuild and nothing goes stale. A stale `Spore-If-Match` is refused with the current Segment and its ETag.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"segmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The Segment."},{"name":"Spore-If-Match","in":"header","required":true,"schema":{"type":"string"},"description":"The Segment's current ETag. A stale value is refused with the current Segment. The standard conditional headers (`If-Match` and its kin) are refused on writes (ADR-0062)."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/segment-updateInput"},"example":{"segmentId":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","name":"Estonian software, ICP over 8"}}}},"responses":{"200":{"description":"The edited Segment","headers":{"ETag":{"description":"Strong validator; send it as `Spore-If-Match` on the next edit. A CDN that compresses the answer may weaken it to `W/\"…\"`, which never matches: send the body's `etag`.","schema":{"type":"string","example":"\"2\""}},"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/segment-updateOutput"},"example":{"id":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","name":"Estonian software, high ICP","filter":{"type":"group","logic":"AND","children":[{"type":"group","logic":"OR","children":[{"type":"rule","fieldId":"core.country","operator":"equals","value":"EE"},{"type":"rule","fieldId":"registry.revenueEur","operator":"greaterThan","value":1000000,"params":{"years":[2023]}}]},{"type":"rule","fieldId":"research.icp_score","operator":"greaterThan","value":7}]},"etag":"\"2\"","createdAt":"2026-09-03T10:00:00.000Z","updatedAt":"2026-09-03T10:00:00.000Z"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"428":{"description":"A required precondition header was not supplied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"operationId":"segment-delete","tags":["Segments"],"summary":"Delete a Segment","description":"Hard, and refused without `confirm=true`, reporting how much reduce knowledge it would remove. Echo that count as `reduceFacts` when confirming to refuse deletion if it changed. Company Facts are never touched: they belong to the Companies, not to the set that named them.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"segmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The Segment."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."},{"name":"confirm","in":"query","required":false,"schema":{"type":"string","enum":["true","false"],"default":"false"},"description":"Set to `true` to delete; deletion is permanent and is refused without it."},{"name":"reduceFacts","in":"query","required":false,"schema":{"type":"integer","minimum":0},"description":"The reduce-Fact count quoted by an earlier unconfirmed delete. When supplied, deletion is refused if the count changed."}],"responses":{"200":{"description":"The deleted Segment's id","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/segment-deleteOutput"},"example":{"id":"7f9c2a14-3b6e-4d51-9a2f-1c8e5b0d47a3","reduceFacts":0}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/segments/{segmentId}/companies":{"get":{"operationId":"segment-companies","tags":["Segments"],"summary":"Page a Segment's members, with the exact count","description":"Evaluates the filter now and returns one page of members newest first under an opaque cursor, plus the exact total of the whole set. Registry predicates are evaluated in the Commons over the Legal entities you have unlocked, so a verified-but-locked Company never appears and membership can never reveal data you have not paid for. Reading your own set is not an acquisition.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"segmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The Segment."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque continuation token from the previous page's `nextCursor`. Omit for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Rows per page. Values above 100 are clamped, not rejected."}],"responses":{"200":{"description":"One page of members and the exact total","content":{"application/json":{"schema":{"$ref":"#/components/schemas/segment-companiesOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/enrich":{"post":{"operationId":"enrich","tags":["Enrichment"],"summary":"Run a native enrichment","description":"Runs one native tool against an explicit list of the organization's own Company ids. Every tool runs against a Company and reads its Core — name, country, primary Domain, Activity, Identifier — from the target, so a request states only the tool's own settings and, in `context`, the Catalog fields to resolve for each target. A repeated id is one target. A Company this organization does not hold is refused as not found. A target whose Company lacks a Core input the selected tool requires is refused at admission: it appears in `refused` with the slots it could not supply, gets no Run, and costs nothing, while the rest of the launch proceeds. When every target is refused the whole request is refused with `missing_input`. The quote is `runs + unlocks` — research is the door that pays for the Legal entity behind a verified target, one credit, once, forever — and it is refused whole against `maxCredits`. Set `dryRun` for a quote that commits nothing.\n\nVariable price, quoted per request.","x-credits-cost":0,"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/enrichInput"},"example":{"tool":"domain-finder","intent":"Find domains for the Estonian mobility shortlist","input":{},"target":{"companyIds":["00000000-0000-4000-8000-000000000001","00000000-0000-4000-8000-000000000002"]},"maxCredits":50,"priority":"normal"}}}},"responses":{"200":{"description":"A dry-run quote or idempotent replay of an accepted Job and launch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/enrichOutput"}}},"headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}}},"201":{"description":"The accepted Job and compatibility launch, or a dry-run quote","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/enrichOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/enrichments/{enrichmentId}":{"get":{"operationId":"enrichment","tags":["Enrichment"],"summary":"Poll an enrichment","description":"Returns lifecycle and per-item outcome separately for one enrichment or launch. Another organization's resource is a 404.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"enrichmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The enrichment to poll"}],"responses":{"200":{"description":"Enrichment lifecycle and outcome","content":{"application/json":{"schema":{"$ref":"#/components/schemas/enrichmentOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/enrichments/{enrichmentId}/items":{"get":{"operationId":"launch-items","tags":["Enrichment"],"summary":"List per-item enrichment outcomes","description":"Lists child enrichments in stable target order with lifecycle and outcome as separate fields. Outputs are opt-in via `include=output`, and `ref` echoes the caller's per-target correlation key.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"enrichmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The launch whose items to list"},{"name":"lifecycle","in":"query","required":false,"schema":{"type":"string","enum":["waiting","queued","running","completed","completed_with_errors","failed","cancelled"]},"description":"Return only items in this lifecycle state."},{"name":"outcome","in":"query","required":false,"schema":{"type":"string","enum":["found","nothing_found","couldnt_look","failed","cancelled"]},"description":"Return only items with this outcome."},{"name":"include","in":"query","required":false,"schema":{"type":"string","enum":["output"]},"description":"Include the projected output for each item."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from a previous page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"description":"Maximum items to return."}],"responses":{"200":{"description":"A page of enrichment items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/launch-itemsOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/jobs/{jobId}/targets":{"get":{"operationId":"job-targets","tags":["Workflows"],"summary":"Page a Job's frozen target list","description":"The ordered Companies this Job was admitted over, with the watermarks it was computed under: the admission transaction's own time, and the Commons Generation this Job read for each Jurisdiction the Commons served. The list is frozen at admission: deleting a target, merging it into another Company, or changing the Segment that selected it never rewrites the receipt, so a target id here may no longer name a live Company.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The Job whose frozen target list to page"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque continuation token from the previous page's `nextCursor`. Omit for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Rows per page. Values above 100 are clamped, not rejected."}],"responses":{"200":{"description":"One page of targets, in submission order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job-targetsOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/enrichments/{enrichmentId}/cancel":{"post":{"operationId":"cancel","tags":["Enrichment"],"summary":"Cancel an enrichment launch","description":"Requests cancellation of a native launch. Refunds are decided by the canonical terminal transition, not by this operation.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"enrichmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The launch to cancel"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required for writes. Reusing this key with the same input replays the original response."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/cancelInput"}}}},"responses":{"200":{"description":"The cancelled launch","headers":{"Idempotency-Replayed":{"description":"Present with value `true` when this response was replayed for a previously completed idempotent request.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/cancelOutput"}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflicts with the current state of the resource","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/events":{"get":{"operationId":"events","tags":["Events"],"summary":"Follow the organization's durable events stream","description":"Redirects to the externally routable workflow engine SSE stream. A client must carry its API key across the redirect, which curl does with --location-trusted and an EventSource cannot do at all, and keeps its Last-Event-ID cursor for resumable delivery.\n\nFree.","x-credits-cost":0,"parameters":[{"name":"Last-Event-ID","in":"header","required":false,"description":"Omit for live-only delivery after connection. Send 0 to replay the retained window, or the last seen event ID to resume strictly after it.","schema":{"type":"string"}}],"responses":{"308":{"description":"The events stream destination is available.","headers":{"Location":{"description":"Externally routable URL of the durable events stream.","schema":{"type":"string","format":"uri"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/eventsOutput"},"example":{"destination":"https://engine.example.com/api/v1/events"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not permitted for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable. The transport door fails closed when the rate-limit store is unavailable or healthy but slow: even a valid organization credential receives 503 service_unavailable if the rate-limit decision cannot finish within its 1000 ms total deadline. The budget includes the held-cap lookup, its durable fallback, and the window check. An earlier error can refuse sooner. Authentication, refusal recording, network transit, and event-loop scheduling add to this budget; it is not a whole-request timeout. Retry-After: 5 on this refusal means wait five seconds after receiving the response before retrying, not that the server waits five seconds before refusing. Recovery is not guaranteed then. An identified but refused organization credential (expired or revoked) does not consult Redis. PostgreSQL atomically bounds and records its refusals across API processes, retaining at most 10 401 samples per organization per rolling 60 seconds. Sampled refusals retain 401 key_expired or key_revoked without Retry-After or rate-limit headers. Further refusals increment suppressedAttempts on the latest sample instead of creating a ledger row, and receive 429 with Retry-After and rate-limit headers. Retry-After identifies when the oldest sample leaves the window; suppressed attempts do not extend it. There is no Redis-check deadline or per-process fallback on this path: an unavailable or nonresponding Redis adds no wait, while authentication, PostgreSQL lock and query time, transit, and scheduling still determine response latency. The 1000 ms rate-limit decision deadline is not a PostgreSQL or whole-request timeout. An explicitly unbounded request cap needs no organization window, but resolving that cap remains subject to the decision deadline. For every Operation that declares 503 and reads the public cluster, an unreachable or timed-out cluster is a dependency outage: 503 commons_unavailable when the Operation explicitly refuses unavailable Commons, or 503 service_unavailable when the transport failure is projected at the door. POST /api/v1/search uses service_unavailable; search unlock, coverage, enrich, Company and Segment-member reads can explicitly refuse commons_unavailable. Both carry retryAfter: 5 in the error envelope and Retry-After: 5, derived only from that envelope field. Wait 5 seconds after receiving the response before retrying; recovery is not guaranteed then. Each public-cluster read is one attempt with no client retries, bounded at 5000 ms by PUBLIC_CLUSTER_READ_DEADLINE_MS. An earlier connection error refuses sooner. This is a per-read budget, not a whole-request timeout: multiple reads can each consume that bound, and authentication, refusal recording, network transit, and event-loop scheduling add to it. The public-cluster budget is separate from the 1000 ms rate-limit decision deadline. This 503 contract does not change Company responses that expose an unavailable section as state: unavailable rather than refusing the request.","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}