# Sphinx Document Fraud API ## Docs - [Get a document check](https://docs.watchdoc.sphinxhq.com/api-reference/document-checks/get-a-document-check.md): Fetch a check by id. Poll this until `status` is `completed` or `failed`. - [List document checks](https://docs.watchdoc.sphinxhq.com/api-reference/document-checks/list-document-checks.md): Newest first. When `has_more` is true, pass the last id in the page as `starting_after` to fetch the next one. - [List flag codes](https://docs.watchdoc.sphinxhq.com/api-reference/document-checks/list-flag-codes.md): The complete flag catalogue. Stable; safe to cache. - [Send feedback on a check](https://docs.watchdoc.sphinxhq.com/api-reference/document-checks/send-feedback-on-a-check.md): Tell us the engine got this check right or wrong. Supply `flag_code` to name a specific detector, omit it to talk about the overall verdict. - [Submit a document](https://docs.watchdoc.sphinxhq.com/api-reference/document-checks/submit-a-document.md): Upload a `file` (multipart) or pass a `url` (JSON). Returns `201` immediately with `status: processing`. Poll the retrieve endpoint, or pass `webhook_url` to be pushed the result. - [Create a rule](https://docs.watchdoc.sphinxhq.com/api-reference/rules/create-a-rule.md): Rules apply to every document analysed after they are created. - [Delete a rule](https://docs.watchdoc.sphinxhq.com/api-reference/rules/delete-a-rule.md): Soft-deletes the rule. Past checks keep the rules they were scored against. - [Get a rule](https://docs.watchdoc.sphinxhq.com/api-reference/rules/get-a-rule.md): Create and manage workspace rules that guide the fraud engine. - [Get flag settings](https://docs.watchdoc.sphinxhq.com/api-reference/rules/get-flag-settings.md): Lists every published flag code and whether it is enabled for this workspace. - [Get thresholds](https://docs.watchdoc.sphinxhq.com/api-reference/rules/get-thresholds.md): The workspace cut lines currently applied to `risk_score` to produce `action`. - [List rules](https://docs.watchdoc.sphinxhq.com/api-reference/rules/list-rules.md): Every rule in the workspace, newest first. Deleted rules are omitted. - [Replace a rule](https://docs.watchdoc.sphinxhq.com/api-reference/rules/replace-a-rule.md): Full replacement. Omitted optional fields reset to their defaults; use PATCH to edit in place. - [Update a rule](https://docs.watchdoc.sphinxhq.com/api-reference/rules/update-a-rule.md): Send any subset of fields. Set `status` to `disabled` to stop it running. - [Update flag settings](https://docs.watchdoc.sphinxhq.com/api-reference/rules/update-flag-settings.md): Replace the workspace's ignored flag codes. Ignored flags are omitted from new checks and do not contribute to risk_score. Existing checks are unchanged. - [Update thresholds](https://docs.watchdoc.sphinxhq.com/api-reference/rules/update-thresholds.md): Send either or both bounds. Applies to new analyses only; each check snapshots the cut lines it was scored against. - [Authentication](https://docs.watchdoc.sphinxhq.com/authentication.md): Authenticate every API request with a workspace API key. - [Errors](https://docs.watchdoc.sphinxhq.com/errors.md): Stripe-style error envelopes returned by the API. - [Feedback](https://docs.watchdoc.sphinxhq.com/feedback.md): Tell us when the engine got a check wrong. - [Flag reference](https://docs.watchdoc.sphinxhq.com/flags.md): The closed set of flag codes v1 can emit. - [Quickstart](https://docs.watchdoc.sphinxhq.com/index.md): Submit a document, get an id, and poll until analysis completes. - [Result model](https://docs.watchdoc.sphinxhq.com/result-model.md): The document_check object returned by the API, webhooks, and app. - [Rules](https://docs.watchdoc.sphinxhq.com/rules.md): Guide the fraud engine with workspace rules, and set score cut lines for action. - [Webhooks](https://docs.watchdoc.sphinxhq.com/webhooks.md): Get notified when a document check finishes. ## OpenAPI Specs - [api_schema](https://docs.watchdoc.sphinxhq.com/api_schema.yaml)