{"openapi":"3.1.0","info":{"title":"SourceFinch API","version":"1.0.0","description":"Monitor public sources as structured records, each value traceable to retained, hashed evidence. Authenticate with a project API key (`Authorization: Bearer sec_…`). Errors are RFC 9457 problem details with a stable `code`. Lists use cursor pagination (`limit`, `cursor` → `next_cursor`).","contact":{"name":"SourceFinch","url":"https://sourcefinch.com/docs/api","email":"hello@sourcefinch.com"},"license":{"name":"Proprietary","url":"https://sourcefinch.com/terms"}},"servers":[{"url":"https://sourcefinch.com","description":"Production"}],"tags":[{"name":"Meta","description":"API information"},{"name":"Sources","description":"Sources and their recipe versions"},{"name":"Runs","description":"Acquisition runs"},{"name":"Records","description":"Current structured records"},{"name":"Evidence","description":"Claims and the retained, hashed captures they came from"},{"name":"Delivery","description":"Destinations, signed webhooks and delivery receipts"}],"paths":{"/v1":{"get":{"operationId":"getApiInfo","summary":"API version and the project this credential is scoped to","tags":["Meta"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","mcp"],"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"API info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiInfo"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sources":{"get":{"operationId":"listSources","summary":"List sources","tags":["Sources"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","mcp","console"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"A page of sources, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourcePage"}}}},"400":{"description":"Problem details; `code` is `validation`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createSource","summary":"Create a source","description":"The source's origin must be approved for the workspace. Version 1 of the recipe is recorded.","tags":["Sources"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"write","x-sourcefinch-surfaces":["rest","sdk","cli","console","mcp"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes retries safe for 24 hours. Reusing a key with a different request returns 422.","schema":{"type":"string","maxLength":255}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceCreate"}}}},"responses":{"201":{"description":"The created source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Source"}}}},"400":{"description":"Problem details; `code` is `validation`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Problem details; `code` is `plan_limit`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Problem details; `code` is `policy` or `conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Problem details; `code` is `idempotency_mismatch`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sources/{source_id}":{"get":{"operationId":"getSource","summary":"Get a source","tags":["Sources"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","mcp","console"],"parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"The source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Source"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateSource","summary":"Update a source","description":"Changing url or recipe creates a new version (unchanged values create none). name, schedule and key_field change without a new version.","tags":["Sources"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"write","x-sourcefinch-surfaces":["rest","sdk","cli","console","mcp"],"parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceUpdate"}}}},"responses":{"200":{"description":"The updated source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Source"}}}},"400":{"description":"Problem details; `code` is `validation`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Problem details; `code` is `plan_limit`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Problem details; `code` is `policy`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sources/{source_id}/versions":{"get":{"operationId":"listSourceVersions","summary":"List a source's recipe versions","tags":["Sources"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","console","mcp"],"parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"Versions, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceVersionPage"}}}},"400":{"description":"Problem details; `code` is `validation`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sources/{source_id}/versions/{version}":{"get":{"operationId":"getSourceVersion","summary":"Get one recipe version","tags":["Sources"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","console","mcp"],"parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"The version","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceVersion"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sources/{source_id}/records":{"get":{"operationId":"listRecords","summary":"Current records","description":"Records from the source's latest validated run, in extraction order, with their evidence ids.","tags":["Records"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","mcp","console"],"parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"A page of current records","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordsPage"}}}},"400":{"description":"Problem details; `code` is `validation`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sources/{source_id}/runs":{"get":{"operationId":"listSourceRuns","summary":"List a source's runs","tags":["Runs"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","mcp","console"],"parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"Runs, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunPage"}}}},"400":{"description":"Problem details; `code` is `validation`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createRun","summary":"Queue a run","description":"Queues an acquisition of the source's current recipe version. Poll the run until it completes.","tags":["Runs"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"write","x-sourcefinch-surfaces":["rest","sdk","cli","mcp","console"],"parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes retries safe for 24 hours. Reusing a key with a different request returns 422.","schema":{"type":"string","maxLength":255}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false,"description":"Empty body. Send an Idempotency-Key header to make retries safe."}}}},"responses":{"202":{"description":"The queued run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Problem details; `code` is `plan_limit`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Problem details; `code` is `policy` or `conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Problem details; `code` is `idempotency_mismatch`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/runs":{"get":{"operationId":"listRuns","summary":"List runs","tags":["Runs"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","mcp","console"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"source_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/RunStatus"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"Runs, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunPage"}}}},"400":{"description":"Problem details; `code` is `validation`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/runs/{run_id}":{"get":{"operationId":"getRun","summary":"Get a run","description":"Status, validation, source health, metrics and change summary.","tags":["Runs"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","mcp","console"],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"The run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/runs/{run_id}:accept":{"post":{"operationId":"acceptRun","summary":"Accept a degraded run","description":"Confirms a degraded run (its output departed from recent healthy runs) is correct. It becomes current and joins future baselines. Only the newest output of a source can be accepted.","tags":["Runs"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"write","x-sourcefinch-surfaces":["rest","sdk","cli","console","mcp"],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes retries safe for 24 hours. Reusing a key with a different request returns 422.","schema":{"type":"string","maxLength":255}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false,"description":"Empty body. Send an Idempotency-Key header to make retries safe."}}}},"responses":{"200":{"description":"The accepted run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Problem details; `code` is `policy` or `conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Problem details; `code` is `idempotency_mismatch`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/runs/{run_id}/claims":{"get":{"operationId":"listRunClaims","summary":"A run's claims","description":"One claim per extracted record, each linked to the evidence it came from.","tags":["Evidence"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","console","mcp"],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"Claims in extraction order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimPage"}}}},"400":{"description":"Problem details; `code` is `validation`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/runs/{run_id}/evidence":{"get":{"operationId":"listRunEvidence","summary":"A run's evidence","tags":["Evidence"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","console","mcp"],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"Retained captures with their SHA-256","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePage"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/runs/{run_id}/events":{"get":{"operationId":"listRunEvents","summary":"A run's events","tags":["Runs"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","console","mcp"],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"Lifecycle events, oldest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEventPage"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/changes":{"get":{"operationId":"listChanges","summary":"Change feed","description":"Field-level record changes (added, changed, removed) across the project's sources, oldest first. Store `next_cursor` and pass it back as `cursor` to receive only newer changes.","tags":["Records"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","mcp","console"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"source_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"A page of changes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePage"}}}},"400":{"description":"Problem details; `code` is `validation`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/runs/{run_id}/manifest":{"get":{"operationId":"getRunManifest","summary":"A run's signed manifest","description":"The run's receipt: every capture hash, claim value and locator, validation and compliance state, signed with SourceFinch's evidence key and anchored with an RFC 3161 timestamp. Verify offline with the evidence bundle verifier.","tags":["Evidence"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","mcp"],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"Manifest, signature and anchor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunManifest"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/runs/{run_id}/export":{"get":{"operationId":"getRunExport","summary":"Export a validated run's records","description":"CSV, JSON, NDJSON or XLSX. Every row carries its record key, evidence id and evidence link; JSON/NDJSON/XLSX add the manifest SHA-256, acquisition path and usage rights (XLSX: Records, Data dictionary and Provenance sheets).","tags":["Records"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","console","mcp"],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["csv","json","ndjson","xlsx"],"default":"csv"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"The export file","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Problem details; `code` is `validation`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Problem details; `code` is `conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/runs/{run_id}/bundle":{"get":{"operationId":"getRunBundle","summary":"Download the run's evidence bundle","description":"A WACZ package with the retained captures, the signed manifest, the RFC 3161 timestamp and the public key, verifiable offline by a third party (pnpm verify-bundle). Requires the manifest (available a few seconds after the run finishes).","tags":["Evidence"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","console","mcp"],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"The bundle (application/wacz)","content":{"application/wacz":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/destinations":{"get":{"operationId":"listDestinations","summary":"List destinations","tags":["Delivery"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","mcp","console"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"Destinations, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationPage"}}}},"400":{"description":"Problem details; `code` is `validation`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createDestination","summary":"Create a destination","description":"Webhooks: every successful run of the selected sources is POSTed to the URL, signed (Standard Webhooks) and retried with backoff for 24 hours. The signing secret is returned once.","tags":["Delivery"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"write","x-sourcefinch-surfaces":["rest","sdk","cli","mcp","console"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes retries safe for 24 hours. Reusing a key with a different request returns 422.","schema":{"type":"string","maxLength":255}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationCreate"}}}},"responses":{"201":{"description":"The destination, with its signing secret (once)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationCreated"}}}},"400":{"description":"Problem details; `code` is `validation`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Problem details; `code` is `plan_limit`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Problem details; `code` is `policy`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Problem details; `code` is `idempotency_mismatch`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/destinations/{destination_id}":{"get":{"operationId":"getDestination","summary":"Get a destination","tags":["Delivery"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","mcp","console"],"parameters":[{"name":"destination_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"The destination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Destination"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateDestination","summary":"Rename, pause, resume or disable a destination","description":"Disabling cancels deliveries that have not been made yet.","tags":["Delivery"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"write","x-sourcefinch-surfaces":["rest","sdk","cli","mcp","console"],"parameters":[{"name":"destination_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationUpdate"}}}},"responses":{"200":{"description":"The destination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Destination"}}}},"400":{"description":"Problem details; `code` is `validation`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/destinations/{destination_id}:test":{"post":{"operationId":"testDestination","summary":"Send a test delivery","description":"Queues a signed `destination.test` delivery through the normal delivery path. Poll the delivery for its receipt.","tags":["Delivery"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"write","x-sourcefinch-surfaces":["rest","sdk","cli","mcp","console"],"parameters":[{"name":"destination_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes retries safe for 24 hours. Reusing a key with a different request returns 422.","schema":{"type":"string","maxLength":255}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false,"description":"Empty body. Send an Idempotency-Key header to make retries safe."}}}},"responses":{"202":{"description":"The queued test delivery","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delivery"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Problem details; `code` is `idempotency_mismatch`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/deliveries":{"get":{"operationId":"listDeliveries","summary":"Delivery receipts","tags":["Delivery"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","mcp","console"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"destination_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"run_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"Deliveries, newest first, with attempt receipts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryPage"}}}},"400":{"description":"Problem details; `code` is `validation`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/deliveries/{delivery_id}:redeliver":{"post":{"operationId":"redeliver","summary":"Redeliver","description":"Sends the same payload again with the same idempotency key (receivers dedupe on it).","tags":["Delivery"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"write","x-sourcefinch-surfaces":["rest","sdk","cli","mcp","console"],"parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes retries safe for 24 hours. Reusing a key with a different request returns 422.","schema":{"type":"string","maxLength":255}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false,"description":"Empty body. Send an Idempotency-Key header to make retries safe."}}}},"responses":{"202":{"description":"The delivery, pending again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delivery"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Problem details; `code` is `idempotency_mismatch`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/evidence/{evidence_id}":{"get":{"operationId":"getEvidence","summary":"Evidence metadata","tags":["Evidence"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","console","mcp"],"parameters":[{"name":"evidence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"200":{"description":"Capture metadata and SHA-256","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evidence"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/evidence/{evidence_id}/content":{"get":{"operationId":"getEvidenceContent","summary":"Download a capture","description":"Redirects (302) to a signed URL valid for 60 seconds. Recompute the SHA-256 to verify it.","tags":["Evidence"],"security":[{"bearer":[]}],"x-sourcefinch-scope":"read","x-sourcefinch-surfaces":["rest","sdk","cli","console","mcp"],"parameters":[{"name":"evidence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/Project"}],"responses":{"302":{"description":"Redirect to the retained bytes","headers":{"Location":{"schema":{"type":"string","format":"uri"}}}},"401":{"description":"Problem details; `code` is `unauthenticated`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Problem details; `code` is `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Problem details; `code` is `not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Problem details; `code` is `conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details; `code` is `rate_limited`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Problem details; `code` is `internal`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Project API key (sec_…) or a session token"}},"parameters":{"RequestId":{"name":"X-Request-Id","in":"header","required":false,"description":"Echoed in the response and logs; generated when absent.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,100}$"}},"Project":{"name":"SourceFinch-Project","in":"header","required":false,"description":"Project UUID. Required for session tokens; API keys are bound to their project.","schema":{"type":"string","format":"uuid"}}},"schemas":{"Problem":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"code":{"$ref":"#/components/schemas/ErrorCode"},"request_id":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["type","title","status","code"],"additionalProperties":false,"description":"application/problem+json"},"ErrorCode":{"type":"string","enum":["validation","unauthenticated","forbidden","not_found","conflict","policy","plan_limit","rate_limited","idempotency_mismatch","internal"]},"Schedule":{"type":"string","enum":["manual","hourly","daily","weekly"]},"RunStatus":{"type":"string","enum":["queued","running","success","degraded","failed","blocked"]},"RunTrigger":{"type":"string","enum":["manual","schedule","api"]},"AcquisitionPath":{"type":"string","enum":["official_api","bulk_file","open_data_portal","licensed_feed","publisher_partnership","pay_per_crawl","public_web","customer_authorized","records_request","manual_upload"]},"FailureClass":{"type":"string","enum":["transient_network","origin_5xx","rate_limited","robots_unavailable","robots_disallowed","blocked_challenge","http_4xx","payment_required","redirect_blocked","budget_exceeded","policy_refused","extraction_failed","validation_failed"]},"UsageRights":{"type":"object","properties":{"basis":{"type":"string","enum":["catalog","private_recipe"]},"licence_basis":{"type":"string","enum":["public_domain_gov","open_data_licence","site_terms","licensed_feed","customer_supplied","unknown"]},"licence_id":{"type":["string","null"]},"commercial_use":{"type":"string","enum":["allowed","restricted","prohibited","unknown"]},"redistribution":{"type":"string","enum":["allowed","restricted","prohibited","unknown"]},"attribution_required":{"type":"boolean"},"attribution_text":{"type":["string","null"]},"terms_snapshot_sha256":{"type":["string","null"]},"reviewed_at":{"type":["string","null"],"description":"ISO-8601 timestamp (UTC)"},"usage_rights_id":{"type":"string","format":"uuid"},"version":{"type":"integer"}},"required":["basis","licence_basis","commercial_use","redistribution","attribution_required"],"additionalProperties":false,"description":"Usage rights snapshotted at capture (documented provenance and terms posture; not legal advice)"},"Change":{"type":"object","properties":{"id":{"type":"integer"},"source_id":{"type":"string","format":"uuid"},"run_id":{"type":"string","format":"uuid"},"record_key":{"type":"string"},"kind":{"type":"string","enum":["added","changed","removed"]},"changed_fields":{"type":"array","items":{"type":"string"}},"before":{"description":"The record before the change (null when added)"},"after":{"description":"The record after the change (null when removed)"},"baseline":{"type":"boolean","description":"True for the first recorded run of a source: everything is 'added'"},"created_at":{"type":"string","description":"ISO-8601 timestamp (UTC)"}},"required":["id","source_id","run_id","record_key","kind","changed_fields","baseline","created_at"],"additionalProperties":false,"description":"A field-level record change, in the order SourceFinch observed it"},"ChangePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Change"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"RunManifest":{"type":"object","properties":{"manifest":{"type":"object","additionalProperties":{},"description":"The sourcefinch/manifest@1 document"},"manifest_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 of the RFC 8785 canonical manifest: the run's receipt"},"signature":{"type":["string","null"],"description":"Base64 Ed25519 signature over the canonical manifest bytes"},"key_id":{"type":["string","null"],"description":"RFC 7638 thumbprint of the key at /.well-known/sourcefinch-evidence-keys.json"},"created_at":{"type":"string","description":"ISO-8601 timestamp (UTC)"},"anchor":{"anyOf":[{"type":"object","properties":{"merkle_root":{"type":"string"},"proof":{"type":"array","items":{"type":"string"}},"tsa_url":{"type":"string"},"tsa_token":{"type":"string","description":"Base64 DER RFC 3161 TimeStampResp over merkle_root"},"anchored_at":{"type":"string","description":"ISO-8601 timestamp (UTC)"}},"required":["merkle_root","proof","tsa_url","tsa_token","anchored_at"],"additionalProperties":false},{"type":"null"}],"description":"Null until the next anchoring batch (about a minute)"}},"required":["manifest","manifest_sha256","signature","key_id","created_at","anchor"],"additionalProperties":false,"description":"Signed, timestamp-anchored manifest of a finished run (Evidence v2)"},"DestinationKind":{"type":"string","enum":["webhook","email","slack","google_sheets","postgres","s3","warehouse"]},"Destination":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"kind":{"$ref":"#/components/schemas/DestinationKind"},"name":{"type":"string"},"config":{"type":"object","additionalProperties":{}},"mode":{"type":"string","enum":["changes","snapshot"]},"source_ids":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}]},"status":{"type":"string","enum":["active","paused","disabled"]},"status_reason":{"type":["string","null"]},"created_at":{"type":"string","description":"ISO-8601 timestamp (UTC)"},"updated_at":{"type":"string","description":"ISO-8601 timestamp (UTC)"}},"required":["id","project_id","kind","name","config","mode","source_ids","status","status_reason","created_at","updated_at"],"additionalProperties":false,"description":"Where SourceFinch delivers a project's results. Secrets are never returned."},"DestinationCreated":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Destination/properties/id"},"project_id":{"$ref":"#/components/schemas/Destination/properties/project_id"},"kind":{"$ref":"#/components/schemas/DestinationKind"},"name":{"$ref":"#/components/schemas/Destination/properties/name"},"config":{"$ref":"#/components/schemas/Destination/properties/config"},"mode":{"$ref":"#/components/schemas/Destination/properties/mode"},"source_ids":{"$ref":"#/components/schemas/Destination/properties/source_ids"},"status":{"$ref":"#/components/schemas/Destination/properties/status"},"status_reason":{"$ref":"#/components/schemas/Destination/properties/status_reason"},"created_at":{"$ref":"#/components/schemas/Destination/properties/created_at"},"updated_at":{"$ref":"#/components/schemas/Destination/properties/updated_at"},"signing_secret":{"type":["string","null"],"description":"Webhooks only, shown once: verify the `webhook-signature` header with it (Standard Webhooks, HMAC-SHA256)"}},"required":["id","project_id","kind","name","config","mode","source_ids","status","status_reason","created_at","updated_at","signing_secret"],"additionalProperties":false,"description":"Where SourceFinch delivers a project's results. Secrets are never returned."},"DestinationCreate":{"type":"object","properties":{"kind":{"type":"string","const":"webhook","description":"Webhooks are available now; credential-backed destinations follow (ADR 0011)"},"name":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","format":"uri","maxLength":2048},"mode":{"type":"string","enum":["changes","snapshot"],"default":"changes"},"source_ids":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100},{"type":"null"}],"default":null}},"required":["kind","name","url"],"additionalProperties":false},"DestinationUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"status":{"type":"string","enum":["active","paused","disabled"]}},"additionalProperties":false},"DestinationPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Destination"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"Delivery":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"destination_id":{"type":"string","format":"uuid"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"test":{"type":"boolean"},"idempotency_key":{"type":"string"},"status":{"type":"string","enum":["pending","in_flight","delivered","dead","cancelled"]},"attempts":{"type":"integer"},"next_attempt_at":{"type":"string","description":"ISO-8601 timestamp (UTC)"},"payload_sha256":{"type":["string","null"]},"last_status_code":{"anyOf":[{"type":"integer"},{"type":"null"}]},"last_error":{"type":["string","null"]},"last_attempt_at":{"type":["string","null"],"description":"ISO-8601 timestamp (UTC)"},"delivered_at":{"type":["string","null"],"description":"ISO-8601 timestamp (UTC)"},"created_at":{"type":"string","description":"ISO-8601 timestamp (UTC)"}},"required":["id","destination_id","run_id","source_id","test","idempotency_key","status","attempts","next_attempt_at","payload_sha256","last_status_code","last_error","last_attempt_at","delivered_at","created_at"],"additionalProperties":false},"DeliveryPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Delivery"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"DeliveryPayload":{"type":"object","properties":{"schema":{"type":"string","const":"sourcefinch/delivery@1"},"event":{"type":"string","enum":["run.completed","destination.test"]},"delivery_id":{"type":"string","format":"uuid"},"idempotency_key":{"type":"string"},"created_at":{"type":"string","description":"ISO-8601 timestamp (UTC)"},"destination":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"mode":{"type":"string","enum":["changes","snapshot"]}},"required":["id","mode"],"additionalProperties":false},"run":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"source":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"links":{"type":"object","additionalProperties":{"type":"string"}},"changes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"records":{"type":"array","items":{"type":"object","additionalProperties":{}}},"truncated":{"type":"boolean"}},"required":["schema","event","delivery_id","idempotency_key","created_at","destination","run","source","links","truncated"],"additionalProperties":false,"description":"Webhook body. Headers: webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>), sourcefinch-idempotency-key. Every record carries its evidence id and API links; the run carries its manifest SHA-256 and usage rights."},"Recipe":{"type":"object","properties":{"schema":{"type":"string","const":"sourcefinch/recipe@1"},"mode":{"type":"string","enum":["http","browser"],"default":"http"},"format":{"type":"string","enum":["html","json","xml"],"default":"html"},"items":{"type":"string","minLength":1,"maxLength":200},"fields":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Recipe/properties/items"},"propertyNames":{"pattern":"^[a-zA-Z][a-zA-Z0-9_]{0,39}$"}},"pagination":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"param"},"param":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,40}$"},"start":{"type":"integer","minimum":0,"maximum":100000,"default":1},"step":{"type":"integer","minimum":1,"maximum":1000,"default":1},"maxPages":{"type":"integer","minimum":2,"maximum":5}},"required":["kind","param","maxPages"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"next"},"selector":{"$ref":"#/components/schemas/Recipe/properties/items"},"maxPages":{"type":"integer","minimum":2,"maximum":5}},"required":["kind","selector","maxPages"],"additionalProperties":false}]},"waitFor":{"$ref":"#/components/schemas/Recipe/properties/items"},"required":{"type":"array","items":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_]{0,39}$"},"maxItems":12}},"required":["items","fields"],"additionalProperties":false},"Source":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"url":{"type":"string"},"recipe":{"type":"object","additionalProperties":{},"description":"A recipe@1 document (see the Recipe schema)"},"version":{"type":"integer"},"schedule":{"$ref":"#/components/schemas/Schedule"},"key_field":{"type":["string","null"]},"next_run_at":{"type":["string","null"],"description":"ISO-8601 timestamp (UTC)"},"created_at":{"type":"string","description":"ISO-8601 timestamp (UTC)"},"updated_at":{"type":"string","description":"ISO-8601 timestamp (UTC)"}},"required":["id","project_id","name","url","recipe","version","schedule","key_field","next_run_at","created_at","updated_at"],"additionalProperties":false,"description":"A monitored source: a URL, a recipe and a schedule."},"SourcePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Source"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"SourceVersion":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"},"version":{"type":"integer"},"url":{"type":"string"},"recipe":{"type":"object","additionalProperties":{}},"created_at":{"type":"string","description":"ISO-8601 timestamp (UTC)"}},"required":["source_id","version","url","recipe","created_at"],"additionalProperties":false},"SourceVersionPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SourceVersion"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"Run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"source_id":{"type":"string","format":"uuid"},"source_version":{"anyOf":[{"type":"integer"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/RunStatus"},"trigger":{"$ref":"#/components/schemas/RunTrigger"},"attempt":{"type":"integer"},"created_at":{"type":"string","description":"ISO-8601 timestamp (UTC)"},"completed_at":{"type":["string","null"],"description":"ISO-8601 timestamp (UTC)"},"error":{"type":["string","null"]},"validation":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"health":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"metrics":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"changes":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"acquisition_path":{"anyOf":[{"$ref":"#/components/schemas/AcquisitionPath"},{"type":"null"}]},"usage_rights":{"anyOf":[{"$ref":"#/components/schemas/UsageRights"},{"type":"null"}],"description":"Usage rights snapshotted at capture (documented provenance and terms posture; not legal advice)"},"failure_class":{"anyOf":[{"$ref":"#/components/schemas/FailureClass"},{"type":"null"}],"description":"Why the last attempt failed; transient classes are retried automatically"},"compliance":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}],"description":"Compliance state at capture: acquisition path, usage rights, terms posture, robots.txt hash and verdict, AI/TDM signals, crawler identity, pay-per-crawl"}},"required":["id","source_id","source_version","status","trigger","attempt","created_at","completed_at","error","validation","health","metrics","changes","acquisition_path","usage_rights","failure_class","compliance"],"additionalProperties":false},"RunPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Run"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"Claim":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"evidence_id":{"type":"string","format":"uuid"},"ordinal":{"type":"integer"},"claim_key":{"type":"string"},"value":{},"extractor":{"type":"string"},"extractor_version":{"type":"string"},"extracted_at":{"type":"string","description":"ISO-8601 timestamp (UTC)"},"locators":{"anyOf":[{"type":"object","properties":{"item":{"type":"object","additionalProperties":{}},"fields":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]}}},"required":["item","fields"],"additionalProperties":false},{"type":"null"}],"description":"Where in the capture each field came from: JSON Pointer (RFC 6901) or a CSS path (+ attribute)"}},"required":["id","evidence_id","ordinal","claim_key","extractor","extractor_version","extracted_at","locators"],"additionalProperties":false},"ClaimPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Claim"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"Evidence":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"run_id":{"type":"string","format":"uuid"},"url":{"type":"string"},"observed_at":{"type":"string","description":"ISO-8601 timestamp (UTC)"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer"},"content_type":{"type":"string"},"purged_at":{"type":["string","null"],"description":"When the payload was removed by retention; the hash is kept"},"metadata":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]}},"required":["id","run_id","url","observed_at","sha256","byte_size","content_type","purged_at","metadata"],"additionalProperties":false},"EvidencePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Evidence"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"RunEvent":{"type":"object","properties":{"id":{"type":"integer"},"kind":{"type":"string"},"data":{"type":"object","additionalProperties":{}},"created_at":{"type":"string","description":"ISO-8601 timestamp (UTC)"}},"required":["id","kind","data","created_at"],"additionalProperties":false},"RunEventPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RunEvent"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"RecordsPage":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Run/properties/id"},"source_version":{"$ref":"#/components/schemas/Run/properties/source_version"},"completed_at":{"$ref":"#/components/schemas/Run/properties/completed_at"},"changes":{"$ref":"#/components/schemas/Run/properties/changes"},"acquisition_path":{"$ref":"#/components/schemas/Run/properties/acquisition_path"},"usage_rights":{"$ref":"#/components/schemas/Run/properties/usage_rights"}},"required":["id","source_version","completed_at","changes","acquisition_path","usage_rights"],"additionalProperties":false},"data":{"type":"array","items":{},"description":"Records from the source's latest validated run"},"evidence_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"next_cursor":{"type":["string","null"]}},"required":["run","data","evidence_ids","next_cursor"],"additionalProperties":false},"ApiInfo":{"type":"object","properties":{"api_version":{"type":"string"},"project_id":{"type":"string","format":"uuid"},"openapi":{"type":"string"}},"required":["api_version","project_id","openapi"],"additionalProperties":false},"SourceCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","format":"uri","maxLength":2048},"recipe":{"$ref":"#/components/schemas/Recipe"},"rights":{"type":"boolean","const":true,"description":"Confirms you have the right to collect this source (Terms §4)"},"schedule":{"$ref":"#/components/schemas/Schedule","default":"manual"},"key_field":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_]{0,39}$"},{"type":"null"}],"default":null}},"required":["name","url","recipe","rights"],"additionalProperties":false},"SourceUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","format":"uri","maxLength":2048},"recipe":{"$ref":"#/components/schemas/Recipe"},"schedule":{"$ref":"#/components/schemas/Schedule"},"key_field":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_]{0,39}$"},{"type":"null"}]}},"additionalProperties":false,"description":"Changing url or recipe creates a new source version; name, schedule and key_field do not."}}}}