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

# Quickstart

> Get started with the Uplint API in under 5 minutes.

## 1. Create an account

Sign up at [app.uplint.dev](https://app.uplint.dev/signup) to get access to the dashboard. The free tier includes 500 uploads/month with full platform access.

## 2. Get your API key

Navigate to **Settings → API Keys** in the dashboard, or create one via the API:

```bash theme={null}
curl -X POST https://api.uplint.dev/api/v1/api-keys \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My First Key",
    "scopes": ["upload", "download", "metadata"]
  }'
```

The response includes your API key — **store it securely**, it's only shown once:

```json theme={null}
{
  "status": "SUCCESS",
  "data": {
    "api_key_id": "6612f1a2c3b4d5e6f7890123",
    "api_key": "ul_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
    "name": "My First Key",
    "scopes": ["upload", "download", "metadata"]
  }
}
```

## 3. Create a file context

File contexts define your upload pipelines — what file types are allowed, size limits, and which validations to run:

```bash theme={null}
curl -X POST https://api.uplint.dev/api/v1/contexts \
  -H "Authorization: Bearer ul_live_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{
    "context_key": "patient_reports",
    "display_name": "Patient Reports",
    "description": "Medical reports uploaded by patients",
    "allowed_extensions": ["pdf", "png", "jpg", "jpeg"],
    "max_file_size_mb": 25,
    "reject_blank_files": true,
    "reject_corrupt_files": true,
    "scan_for_viruses": true
  }'
```

## 4. Upload a file

Upload a file into your context. Uplint validates it against all configured rules before storing it:

```bash theme={null}
curl -X POST https://api.uplint.dev/api/v1/files/upload \
  -H "Authorization: Bearer ul_live_a1b2c3d4..." \
  -F "file=@report.pdf" \
  -F "context=patient_reports" \
  -F 'metadata={"department": "radiology", "patient_id": "P-12345"}'
```

**If the file passes all checks:**

```json theme={null}
{
  "status": "SUCCESS",
  "message": "File uploaded",
  "data": {
    "file_id": "6612f1a2c3b4d5e6f7890abc",
    "original_filename": "report.pdf",
    "content_type": "application/pdf",
    "size_bytes": 843776,
    "context_key": "patient_reports"
  }
}
```

**If the file fails validation** (blank, corrupt, virus, wrong extension, oversized):

```json theme={null}
{
  "status": "ERROR",
  "message": "File rejected: blank document detected",
  "errors": ["blank_document"]
}
```

## 5. Retrieve your file

Generate a pre-signed download URL:

```bash theme={null}
curl https://api.uplint.dev/api/v1/files/FILE_ID \
  -H "Authorization: Bearer ul_live_a1b2c3d4..."
```

```json theme={null}
{
  "status": "SUCCESS",
  "data": {
    "file_id": "6612f1a2c3b4d5e6f7890abc",
    "download_url": "https://s3.amazonaws.com/...",
    "expires_in_seconds": 300,
    "original_filename": "report.pdf"
  }
}
```

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    Learn about API key scopes and security best practices.
  </Card>

  <Card title="File Contexts" icon="folder-open" href="/concepts/file-contexts">
    Understand how to configure upload pipelines.
  </Card>

  <Card title="Trust Pipeline" icon="diagram-project" href="/concepts/trust-pipeline">
    See every validation stage your files pass through.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Explore the full API with request/response examples.
  </Card>
</CardGroup>
