{"components":{"parameters":{"DeltaQuery.since_date":{"description":"Return changes recorded since this date (e.g. a model cutoff).","explode":false,"in":"query","name":"since_date","required":true,"schema":{"format":"date-time","type":"string"}},"DeltaQuery.token_budget":{"explode":false,"in":"query","name":"token_budget","required":false,"schema":{"format":"int32","type":"integer"}},"DeltaQuery.topic":{"description":"Topic, entity, or claim subject to compute changes for.","explode":false,"in":"query","name":"topic","required":true,"schema":{"type":"string"}},"DeltaQuery.until_date":{"explode":false,"in":"query","name":"until_date","required":false,"schema":{"format":"date-time","type":"string"}},"EntityQuery.at_date":{"description":"Point-in-time read: entity state as of this date.","explode":false,"in":"query","name":"at_date","required":false,"schema":{"format":"date-time","type":"string"}},"EntityQuery.name_or_id":{"explode":false,"in":"query","name":"name_or_id","required":true,"schema":{"type":"string"}},"EntityQuery.token_budget":{"explode":false,"in":"query","name":"token_budget","required":false,"schema":{"format":"int32","type":"integer"}},"EvidenceQuery.from_date":{"explode":false,"in":"query","name":"from_date","required":false,"schema":{"format":"date-time","type":"string"}},"EvidenceQuery.limit":{"explode":false,"in":"query","name":"limit","required":false,"schema":{"format":"int32","maximum":100,"minimum":1,"type":"integer"}},"EvidenceQuery.query":{"explode":false,"in":"query","name":"query","required":true,"schema":{"type":"string"}},"EvidenceQuery.to_date":{"explode":false,"in":"query","name":"to_date","required":false,"schema":{"format":"date-time","type":"string"}},"FreshnessQuery":{"explode":false,"in":"query","name":"topic_or_entity","required":true,"schema":{"type":"string"}},"SourcesQuery.entity_or_claim_id":{"explode":false,"in":"query","name":"entity_or_claim_id","required":true,"schema":{"type":"string"}},"SourcesQuery.limit":{"explode":false,"in":"query","name":"limit","required":false,"schema":{"format":"int32","maximum":100,"minimum":1,"type":"integer"}},"VerifyClaimQuery.as_of_date":{"explode":false,"in":"query","name":"as_of_date","required":false,"schema":{"format":"date-time","type":"string"}},"VerifyClaimQuery.claim_text":{"explode":false,"in":"query","name":"claim_text","required":true,"schema":{"type":"string"}},"VerifyClaimQuery.token_budget":{"explode":false,"in":"query","name":"token_budget","required":false,"schema":{"format":"int32","type":"integer"}}},"schemas":{"ApiError":{"description":"A structured API/tool error.","properties":{"code":{"type":"string"},"details":{},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"Citation":{"description":"A pointer to evidence in a source document. Every public fact must be citable.","properties":{"publishedAt":{"format":"date-time","type":"string"},"quote":{"type":"string"},"sourceDocumentId":{"type":"string"},"url":{"type":"string"}},"required":["sourceDocumentId"],"type":"object"},"Claim":{"description":"An atomic factual assertion extracted from source documents.","properties":{"confidence":{"$ref":"#/components/schemas/Confidence"},"contradiction":{"$ref":"#/components/schemas/ContradictionState"},"evidence":{"items":{"$ref":"#/components/schemas/Citation"},"type":"array"},"id":{"type":"string"},"normalizedText":{"type":"string"},"object":{"type":"string"},"predicate":{"type":"string"},"qualifiers":{},"recordedAt":{"description":"When Intercal recorded the claim (bitemporal transaction time).","format":"date-time","type":"string"},"status":{"$ref":"#/components/schemas/ClaimStatus"},"subject":{"type":"string"},"validFrom":{"description":"When the claim is/was true in the world (bitemporal valid time).","format":"date-time","type":"string"},"validUntil":{"format":"date-time","type":"string"}},"required":["id","subject","predicate","object","normalizedText","recordedAt","confidence","status","contradiction","evidence"],"type":"object"},"ClaimStatus":{"enum":["proposed","active","retracted","superseded"],"type":"string"},"ClaimVerificationResponse":{"properties":{"asOf":{"format":"date-time","type":"string"},"claimText":{"type":"string"},"confidence":{"$ref":"#/components/schemas/Confidence"},"contradictingEvidence":{"items":{"$ref":"#/components/schemas/Citation"},"type":"array"},"supportingEvidence":{"items":{"$ref":"#/components/schemas/Citation"},"type":"array"},"verdict":{"$ref":"#/components/schemas/VerificationVerdict"}},"required":["claimText","verdict","confidence","supportingEvidence","contradictingEvidence"],"type":"object"},"Confidence":{"description":"A confidence score in [0,1] with the method that produced it.","properties":{"method":{"type":"string"},"score":{"format":"float","maximum":1,"minimum":0,"type":"number"}},"required":["score"],"type":"object"},"ContradictionState":{"enum":["none","contested","contradicted"],"type":"string"},"CreateSubscriptionRequest":{"properties":{"deliveryMethod":{"$ref":"#/components/schemas/SubscriptionDeliveryMethod"},"metadata":{},"minImportance":{"format":"float","maximum":1,"minimum":0,"type":"number"},"target":{"$ref":"#/components/schemas/SubscriptionTarget"},"tokenBudget":{"format":"int32","maximum":8000,"minimum":200,"type":"integer"},"webhookSecret":{"description":"Plaintext webhook secret accepted only on create; the API stores a hash and never returns it.","type":"string"},"webhookUrl":{"type":"string"}},"required":["target","deliveryMethod"],"type":"object"},"DeleteSubscriptionRequest":{"properties":{"subscriptionId":{"type":"string"}},"required":["subscriptionId"],"type":"object"},"DeltaResponse":{"properties":{"changedClaims":{"items":{"$ref":"#/components/schemas/Claim"},"type":"array"},"changedEntities":{"items":{"$ref":"#/components/schemas/EntitySummary"},"type":"array"},"confidence":{"$ref":"#/components/schemas/Confidence"},"freshness":{"$ref":"#/components/schemas/FreshnessReport"},"since":{"format":"date-time","type":"string"},"summary":{"$ref":"#/components/schemas/Digest"},"topic":{"type":"string"},"until":{"format":"date-time","type":"string"}},"required":["topic","since","summary","changedClaims","changedEntities","confidence","freshness"],"type":"object"},"Digest":{"description":"A token-budgeted synthesis built from evidence and graph state. A delivery artifact, not canonical.","properties":{"citations":{"items":{"$ref":"#/components/schemas/Citation"},"type":"array"},"content":{"type":"string"},"freshness":{"$ref":"#/components/schemas/FreshnessReport"},"generatedAt":{"format":"date-time","type":"string"},"tokenBudget":{"format":"int32","type":"integer"},"topicOrEntity":{"type":"string"}},"required":["topicOrEntity","content","citations","freshness","generatedAt"],"type":"object"},"DispatchSubscriptionRequest":{"properties":{"changeKind":{"$ref":"#/components/schemas/SubscriptionTargetKind"},"claimPattern":{},"entityId":{"type":"string"},"relationshipTypeId":{"type":"string"},"sinceDate":{"format":"date-time","type":"string"},"topicId":{"type":"string"},"untilDate":{"format":"date-time","type":"string"}},"required":["changeKind","sinceDate"],"type":"object"},"DispatchSubscriptionResponse":{"properties":{"enqueued":{"format":"int32","type":"integer"},"skipped":{"format":"int32","type":"integer"}},"required":["enqueued","skipped"],"type":"object"},"Entity":{"description":"A canonical thing: person, org, place, role/office, product, event, concept, etc.","properties":{"aliases":{"items":{"type":"string"},"type":"array"},"displayName":{"type":"string"},"externalIds":{"items":{"$ref":"#/components/schemas/ExternalId"},"type":"array"},"firstSeen":{"format":"date-time","type":"string"},"id":{"type":"string"},"importance":{"format":"float","type":"number"},"lastUpdated":{"format":"date-time","type":"string"},"state":{"description":"Denormalized current state; derived from fact versions, not a source of truth."},"type":{"$ref":"#/components/schemas/EntityType"}},"required":["id","type","displayName"],"type":"object"},"EntityResponse":{"properties":{"asOf":{"format":"date-time","type":"string"},"entity":{"$ref":"#/components/schemas/Entity"},"facts":{"items":{"$ref":"#/components/schemas/Claim"},"type":"array"},"freshness":{"$ref":"#/components/schemas/FreshnessReport"},"relationships":{"items":{"$ref":"#/components/schemas/Relationship"},"type":"array"}},"required":["entity","freshness"],"type":"object"},"EntitySummary":{"description":"A compact entity reference used in deltas and lists.","properties":{"displayName":{"type":"string"},"id":{"type":"string"},"type":{"$ref":"#/components/schemas/EntityType"}},"required":["id","type","displayName"],"type":"object"},"EntityType":{"enum":["person","organization","place","role","office","product","event","concept","legislation","technical_artifact","source","dataset","jurisdiction"],"type":"string"},"EvidenceHit":{"properties":{"citation":{"$ref":"#/components/schemas/Citation"},"documentId":{"type":"string"},"score":{"format":"float","minimum":0,"type":"number"},"snippet":{"type":"string"}},"required":["documentId","snippet","score","citation"],"type":"object"},"EvidenceResponse":{"properties":{"hits":{"items":{"$ref":"#/components/schemas/EvidenceHit"},"type":"array"},"total":{"format":"int32","type":"integer"}},"required":["hits","total"],"type":"object"},"ExternalId":{"description":"An external identifier for an entity (e.g. a Wikidata QID).","properties":{"id":{"type":"string"},"system":{"type":"string"}},"required":["system","id"],"type":"object"},"FeedbackConcernType":{"enum":["incorrect","outdated","missing_evidence","missing_coverage","source_quality","contradiction","other"],"type":"string"},"FeedbackRequest":{"description":"Bounded public feedback that creates a review record without mutating canonical knowledge.","properties":{"concernType":{"$ref":"#/components/schemas/FeedbackConcernType"},"details":{"maxLength":4000,"type":"string"},"summary":{"maxLength":240,"minLength":1,"type":"string"},"targetId":{"maxLength":256,"minLength":1,"type":"string"},"targetType":{"$ref":"#/components/schemas/FeedbackTargetType"}},"required":["targetType","targetId","concernType","summary"],"type":"object"},"FeedbackResponse":{"properties":{"review":{"$ref":"#/components/schemas/ReviewRecord"}},"required":["review"],"type":"object"},"FeedbackTargetType":{"enum":["entity","claim","source","digest","freshness","coverage"],"type":"string"},"FreshnessReport":{"description":"How fresh Intercal's knowledge is for a target.","properties":{"coverage":{"description":"Fraction of expected sources currently covered, in [0,1].","format":"float","maximum":1,"minimum":0,"type":"number"},"lastIngestedAt":{"format":"date-time","type":"string"},"lastUpdated":{"format":"date-time","type":"string"},"staleness":{"type":"string"},"target":{"type":"string"}},"required":["target"],"type":"object"},"PollSubscriptionRequest":{"properties":{"limit":{"format":"int32","maximum":100,"minimum":1,"type":"integer"},"subscriptionId":{"type":"string"}},"required":["subscriptionId"],"type":"object"},"Relationship":{"description":"A typed temporal edge between entities, derived from claims and evidence.","properties":{"confidence":{"$ref":"#/components/schemas/Confidence"},"fromEntityId":{"type":"string"},"id":{"type":"string"},"recordedAt":{"format":"date-time","type":"string"},"sourceDocumentIds":{"items":{"type":"string"},"type":"array"},"status":{"$ref":"#/components/schemas/RelationshipStatus"},"toEntityId":{"type":"string"},"type":{"type":"string"},"validFrom":{"format":"date-time","type":"string"},"validUntil":{"format":"date-time","type":"string"}},"required":["id","type","fromEntityId","toEntityId","recordedAt","confidence","status","sourceDocumentIds"],"type":"object"},"RelationshipStatus":{"enum":["active","ended","proposed"],"type":"string"},"ReviewRecord":{"description":"A received review record created from public feedback.","properties":{"concernType":{"$ref":"#/components/schemas/FeedbackConcernType"},"createdAt":{"format":"date-time","type":"string"},"details":{"type":"string"},"id":{"type":"string"},"status":{"$ref":"#/components/schemas/ReviewStatus"},"summary":{"type":"string"},"targetId":{"type":"string"},"targetType":{"$ref":"#/components/schemas/FeedbackTargetType"}},"required":["id","targetType","targetId","concernType","status","summary","createdAt"],"type":"object"},"ReviewStatus":{"enum":["received","reviewing","resolved","rejected"],"type":"string"},"SourceDocument":{"description":"Immutable ingested evidence.","properties":{"contentHash":{"type":"string"},"id":{"type":"string"},"ingestedAt":{"format":"date-time","type":"string"},"language":{"type":"string"},"license":{"type":"string"},"publishedAt":{"format":"date-time","type":"string"},"sourceId":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"required":["id","sourceId","ingestedAt","contentHash"],"type":"object"},"SourcesResponse":{"properties":{"sources":{"items":{"$ref":"#/components/schemas/SourceDocument"},"type":"array"}},"required":["sources"],"type":"object"},"Subscription":{"properties":{"createdAt":{"format":"date-time","type":"string"},"deliveryMethod":{"$ref":"#/components/schemas/SubscriptionDeliveryMethod"},"id":{"type":"string"},"isActive":{"type":"boolean"},"lastCheckedAt":{"format":"date-time","type":"string"},"lastDeliveredAt":{"format":"date-time","type":"string"},"minImportance":{"format":"float","maximum":1,"minimum":0,"type":"number"},"target":{"$ref":"#/components/schemas/SubscriptionTarget"},"tokenBudget":{"format":"int32","type":"integer"},"updatedAt":{"format":"date-time","type":"string"},"webhookUrl":{"type":"string"}},"required":["id","target","deliveryMethod","minImportance","tokenBudget","isActive","createdAt","updatedAt"],"type":"object"},"SubscriptionDeliveryMethod":{"enum":["polling","webhook"],"type":"string"},"SubscriptionNotification":{"properties":{"changeKind":{"$ref":"#/components/schemas/SubscriptionTargetKind"},"createdAt":{"format":"date-time","type":"string"},"deliveredAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"maxImportance":{"format":"float","maximum":1,"minimum":0,"type":"number"},"minImportance":{"format":"float","maximum":1,"minimum":0,"type":"number"},"payload":{},"since":{"format":"date-time","type":"string"},"status":{"type":"string"},"subscriptionId":{"type":"string"},"targetLabel":{"type":"string"},"tokenBudget":{"format":"int32","type":"integer"},"until":{"format":"date-time","type":"string"}},"required":["id","subscriptionId","changeKind","targetLabel","since","until","minImportance","maxImportance","tokenBudget","payload","status","createdAt"],"type":"object"},"SubscriptionNotificationsResponse":{"properties":{"notifications":{"items":{"$ref":"#/components/schemas/SubscriptionNotification"},"type":"array"}},"required":["notifications"],"type":"object"},"SubscriptionResponse":{"properties":{"subscription":{"$ref":"#/components/schemas/Subscription"}},"required":["subscription"],"type":"object"},"SubscriptionsResponse":{"properties":{"subscriptions":{"items":{"$ref":"#/components/schemas/Subscription"},"type":"array"}},"required":["subscriptions"],"type":"object"},"SubscriptionTarget":{"properties":{"claimPattern":{},"entityId":{"type":"string"},"kind":{"$ref":"#/components/schemas/SubscriptionTargetKind"},"relationshipTypeId":{"type":"string"},"topicId":{"type":"string"}},"required":["kind"],"type":"object"},"SubscriptionTargetKind":{"enum":["topic","entity","relationship","claim_pattern"],"type":"string"},"VerificationVerdict":{"enum":["supported","partially_supported","contradicted","unverified"],"type":"string"}}},"info":{"description":"Intercal public contract — the single source of truth.\nTypeSpec compiles to OpenAPI 3.1 + JSON Schema; TS types and Pydantic models are generated\nfrom those. Do not hand-edit generated artifacts.","title":"Intercal API","version":"0.0.0"},"openapi":"3.1.0","paths":{"/v1/claims/verify":{"get":{"description":"Verify a claim against recorded evidence as of a date.","operationId":"verifyClaim","parameters":[{"$ref":"#/components/parameters/VerifyClaimQuery.claim_text"},{"$ref":"#/components/parameters/VerifyClaimQuery.as_of_date"},{"$ref":"#/components/parameters/VerifyClaimQuery.token_budget"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimVerificationResponse"}}},"description":"The request has succeeded."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"An unexpected error response."}},"tags":["knowledge"]}},"/v1/delta":{"get":{"description":"What changed about a topic since a date, with evidence, confidence, and a token-budgeted summary.","operationId":"getDelta","parameters":[{"$ref":"#/components/parameters/DeltaQuery.topic"},{"$ref":"#/components/parameters/DeltaQuery.since_date"},{"$ref":"#/components/parameters/DeltaQuery.token_budget"},{"$ref":"#/components/parameters/DeltaQuery.until_date"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeltaResponse"}}},"description":"The request has succeeded."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"An unexpected error response."}},"tags":["knowledge"]}},"/v1/entity":{"get":{"description":"Entity state, relationships, and fact history, optionally at a point in time.","operationId":"getEntity","parameters":[{"$ref":"#/components/parameters/EntityQuery.name_or_id"},{"$ref":"#/components/parameters/EntityQuery.at_date"},{"$ref":"#/components/parameters/EntityQuery.token_budget"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityResponse"}}},"description":"The request has succeeded."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"An unexpected error response."}},"tags":["knowledge"]}},"/v1/evidence":{"get":{"description":"Search source-grounded evidence by query, date range, and sources.","operationId":"searchEvidence","parameters":[{"$ref":"#/components/parameters/EvidenceQuery.query"},{"$ref":"#/components/parameters/EvidenceQuery.from_date"},{"$ref":"#/components/parameters/EvidenceQuery.to_date"},{"$ref":"#/components/parameters/EvidenceQuery.limit"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceResponse"}}},"description":"The request has succeeded."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"An unexpected error response."}},"tags":["knowledge"]}},"/v1/feedback":{"post":{"description":"Submit bounded feedback for operator review. Creates a review record only; canonical graph state is unchanged.","operationId":"submitFeedback","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}},"description":"The request has succeeded."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"An unexpected error response."}},"tags":["operations"]}},"/v1/freshness":{"get":{"description":"Report how fresh Intercal's knowledge is for a topic or entity.","operationId":"getFreshness","parameters":[{"$ref":"#/components/parameters/FreshnessQuery"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreshnessReport"}}},"description":"The request has succeeded."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"An unexpected error response."}},"tags":["knowledge"]}},"/v1/sources":{"get":{"description":"List the source documents backing an entity or claim.","operationId":"getSources","parameters":[{"$ref":"#/components/parameters/SourcesQuery.entity_or_claim_id"},{"$ref":"#/components/parameters/SourcesQuery.limit"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourcesResponse"}}},"description":"The request has succeeded."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"An unexpected error response."}},"tags":["knowledge"]}},"/v1/subscriptions":{"get":{"description":"List active subscriptions owned by the authenticated API key.","operationId":"listSubscriptions","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionsResponse"}}},"description":"The request has succeeded."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"An unexpected error response."}},"tags":["subscriptions"]},"post":{"description":"Create a polling or webhook subscription for a topic, entity, relationship type, or claim pattern.","operationId":"createSubscription","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}},"description":"The request has succeeded."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"An unexpected error response."}},"tags":["subscriptions"]}},"/v1/subscriptions/delete":{"post":{"description":"Deactivate a subscription owned by the authenticated API key.","operationId":"deleteSubscription","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSubscriptionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}},"description":"The request has succeeded."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"An unexpected error response."}},"tags":["subscriptions"]}},"/v1/subscriptions/dispatch":{"post":{"description":"Enqueue bounded notifications for matching subscriptions owned by the authenticated API key after a known knowledge change.","operationId":"dispatchSubscriptionNotifications","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispatchSubscriptionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispatchSubscriptionResponse"}}},"description":"The request has succeeded."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"An unexpected error response."}},"tags":["subscriptions"]}},"/v1/subscriptions/poll":{"post":{"description":"Poll pending notifications for a subscription. Returned notifications are marked delivered.","operationId":"pollSubscriptionNotifications","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PollSubscriptionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionNotificationsResponse"}}},"description":"The request has succeeded."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"An unexpected error response."}},"tags":["subscriptions"]}}},"servers":[{"description":"Local development","url":"http://localhost:8787","variables":{}}],"tags":[{"name":"knowledge"},{"name":"subscriptions"},{"name":"operations"}]}