> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sphinxhq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sphinx Models

> Understanding the core data structures of the Sphinx API

<CardGroup cols={2}>
  <Card title="Customer" icon="user" href="/models/customer">
    Represents an individual or company undergoing checks.
  </Card>

  <Card title="Case" icon="briefcase" href="/models/case">
    A container for all checks and documents related to a single customer investigation. API interactions work primarily through Cases.
  </Card>

  <Card title="Check" icon="check" href="/models/check">
    A specific verification process, like a sanctions screening or address verification. One check would be one "alert" or "hit" - not multiple. For each check within a KYB or EDD, such as UBOs or web presence, a new check is created.
  </Card>

  <Card title="Document" icon="file" href="/models/document">
    Supporting files, such as identity documents or proofs of address. Not required. A sanctions screening might solely rely on details provided in the Customer object, or the Customer might have supporting documentation such as a driver's license.
  </Card>
</CardGroup>

## Relationships

The diagram below illustrates how these models are interconnected. A `Customer` can have multiple `Cases`, each `Case` can have multiple `Checks`, and `Documents` can be associated with a `Case` or a `Check`.

```mermaid theme={null}
---
config:
  theme: 'neutral'
  look: handDrawn
---
graph TD
    subgraph "Core Models"
        direction LR
        Customer-->Case;
        Case-->Check;
        Document-.->Case;
        Document-.->Check;
    end

```

#### What to link a document to?

Documents can be associated with a Case or a Check, but only one at a time. Each association serves different purposes:

* **Linking to a Case**: General document storage for the entire case workflow. **Recommended starting point.**
* **Linking to a Check**: More precise. Isolated work for the AI agent and faster processing. Useful is check types such as Proof of Address.
  When creating a case, you can attach documents at the case level via `document_ids`, or attach them to a specific check by including `document_ids` inside that check object.
