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

# Quickstart

> Sign up, create your app, and parse your first document in minutes.

## 1. Sign up

Create your tenant account at [dashboard.trueparser.com](https://dashboard.trueparser.com).

* **Authentication**: TrueParser Dashboard uses Google authentication to manage your account.
* **Initial State**: New accounts start in a `Pending Activation` state. You will receive an automated email once your organization is active.

***

## 2. Create an App

To access the parsing platform, create a tenant application in the dashboard. The app gives your backend or Demo UI a `client_id` and `client_secret` for OAuth 2.0 `client_credentials`.

<Steps>
  <Step title="Open The Apps Section">
    Navigate to **Apps** in the dashboard and click **Add Application**.
  </Step>

  <Step title="Name Your App">
    Identify the service connecting to TrueParser, for example `my-document-parser`.
  </Step>

  <Step title="Set The License Region">
    Choose the geographic region closest to your primary data region.
  </Step>

  <Step title="Save Your Credentials">
    Immediately copy your `client_id` and `client_secret`. The secret is shown in plaintext only at this step.
  </Step>
</Steps>

<CardGroup cols={2}>
  <Card title="App Setup" icon="gear" href="/dashboard/app-setup">
    Review the app fields, allowed domains, and credential rules.
  </Card>

  <Card title="Demo UI" icon="display" href="/dashboard/demo-ui">
    Use the tenant-facing workspace to test one app manually.
  </Card>
</CardGroup>

***

## 3. Optional: Configure Storage

If your tenant wants to use its own S3-compatible storage, configure that on the app before you go live.

* the storage config is stored per app
* supported providers include AWS S3, Tigris, Cloudflare R2, MinIO, and Backblaze B2
* the platform uses your stored storage credentials on your behalf

<Tip>
  You still retrieve results through the platform API. Your application does
  not connect directly to the bucket.
</Tip>

***

## 4. Recommended: Activate A Plan

To parse technical documents, your application may need a usable plan. A plan adds the `entitlements` claim to the app token.

<Tip>
  A usable plan provides the monthly Document Unit quota and any feature flags
  your app is entitled to use.
</Tip>

<Note>
  If you do not assign a plan, token issuance can still succeed, but the
  `entitlements` claim is omitted.
</Note>

***

## 5. Understand Document Units

TrueParser measures parsing consumption in **Document Units**.

Depending on the parser family, one Document Unit may correspond to:

* one page for PDF, Microsoft Office, and OpenDocument files
* one email or message item for MailKit sources
* one SQL statement for SQL sources
* one logical dataset for GIS sources
* one processed document for CAD sources

***

## 6. Get An Access Token

Exchange your application credentials for a security token at the token endpoint:

```bash theme={null}
curl -X POST https://admin-api.trueparser.com/connect/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials" \
  -d "client_id=YOUR_CLIENT_ID" \
  -d "client_secret=YOUR_CLIENT_SECRET" \
  -d "scope=TrueParser.API"
```

***

## 7. Ingest A Document

Submit a document for parsing. Some formats require additional routing parameters:

* PDF requires `pdfMode`
* SQL requires `sqlDialect`
* CSV requires `csvRoute`
* Parquet can include `parquetMode` (`MetadataOnly` or `MetadataPlusRows`)
* ZIP-based uploads should include an explicit `documentType`

```bash theme={null}
curl -X POST "https://api.trueparser.com/api/v1/documents/upload?fileName=document.pdf&documentType=Pdf&pdfMode=SingleColumn" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/pdf" \
  --data-binary "@/path/to/document.pdf"
```

TrueParser always processes documents asynchronously. The API returns a
`202 Accepted` with a `documentId` for tracking, then you poll status until
the job completes and fetch the result afterward.

***

## 8. Poll For Completion

TrueParser is an asynchronous platform. Before fetching results, poll the status endpoint until the job reaches `completed`.

```bash theme={null}
curl -X GET https://api.trueparser.com/api/v1/documents/YOUR_DOC_ID/status \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

**Response:**
Wait for `"status": "completed"`. Typical status values include `queued`, `processing`, `completed`, and `failed`. If the status is `failed`, inspect the returned payload for error details.

***

## 9. Retrieve Results

Once the status is confirmed as `completed`, download your structured JSON results from the API:

```bash theme={null}
curl -X GET https://api.trueparser.com/api/v1/documents/YOUR_DOC_ID/result \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

<Note>
  If your app uses tenant-owned S3-compatible storage, TrueParser writes the
  result there on your behalf. Your application still uses the API for status
  checks and result retrieval.
</Note>

<Tip>
  If you call `/result` before processing is finished, the API can still return
  `202 Accepted` with a processing status payload. Poll `/status` until the job
  is complete, then fetch `/result`.
</Tip>

<CardGroup cols={1}>
  <Card title="Demo UI" icon="display" href="/dashboard/demo-ui">
    Try the manual test workspace before building a backend integration.
  </Card>
</CardGroup>
