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

# Your First Document

> Step-by-step guide to uploading your first document

This guide walks through the complete workflow of ingesting a document and waiting for extraction.

## The Workflow

```mermaid theme={null}
flowchart LR
    A[Upload PDF] --> B[Wait for Processing]
    B --> C[Extraction Complete]
```

## Prerequisites

* DocIntell API key ([get one here](/authentication))
* A PDF document (we'll use an invoice as an example)

## Step 1: Upload the Document

```bash theme={null}
curl -X POST https://api.docintell.com/v1/documents \
  -H "Authorization: Bearer dk_live_YOUR_API_KEY" \
  -F "file=@invoice.pdf" \
  -F "retention_years=7"
```

You'll receive a `202 Accepted` response:

```json theme={null}
{
  "document_id": "019370ab-c123-7def-8901-234567890abc",
  "job_id": "019370ab-c456-7def-8901-234567890def",
  "status": "pending"
}
```

## Step 2: Wait for Processing

Poll the job status or use webhooks:

```bash theme={null}
curl -X GET https://api.docintell.com/v1/jobs/019370ab-c456-7def-8901-234567890def \
  -H "Authorization: Bearer dk_live_YOUR_API_KEY"
```

Wait until `status` is `"completed"`.

<Tip>
  Use [webhooks](/guides/webhook-setup) instead of polling for production workloads.
</Tip>

## Next Steps

<CardGroup cols={2}>
  <Card title="Webhooks" icon="webhook" href="/guides/webhook-setup">
    Set up real-time notifications
  </Card>

  <Card title="Error Handling" icon="bug" href="/guides/error-handling">
    Handle errors gracefully
  </Card>
</CardGroup>
