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

# Quickstart

> Send your first registered letter in a few minutes.

This walkthrough creates a **registered letter** (`shipType=2`) and tracks it.

## 1. Check your balance

```bash theme={null}
curl "https://app.escrybe.com.br/api/v2/balance/YOUR_TOKEN"
```

```json Response theme={null}
{ "status": 200, "status_message": "Sucesso", "data": { "account_balance": 152.30, "total_val_pending_jobs": 4.10, "dif_account_balance": 148.20 } }
```

## 2. Validate before paying (optional)

Send `test=1` to validate the payload and PDF without creating the order or
charging credits.

```bash theme={null}
curl -X POST "https://app.escrybe.com.br/api/v2/post" \
  -F "userSecurityToken=YOUR_TOKEN" \
  -F "shipType=2" \
  -F "test=1" \
  -F "name=Maria Silva" \
  -F "addr1=Rua das Flores" \
  -F "street_number=100" \
  -F "zip=01001000" \
  -F "city=São Paulo" \
  -F "state=SP" \
  -F "country=Brasil" \
  -F "pdfFile=@/path/to/letter.pdf"
```

## 3. Create the order

Drop `test=1` to actually submit. The `data` field returns the order's
**visual id** — store it.

```json Response theme={null}
{ "status": 200, "status_message": "Sucesso - pedido aceito", "data": "2607031" }
```

## 4. Track the order

```bash theme={null}
curl "https://app.escrybe.com.br/api/v2/get/YOUR_TOKEN/2607031"
```

The `status` field follows this lifecycle:

| Code | Meaning              |
| ---- | -------------------- |
| 0    | Processing           |
| 1    | Production           |
| 2    | Insufficient credits |
| 3    | Printed              |
| 4    | Posted               |
| 5    | Cancelled            |
| 6    | Returned             |

<Tip>
  Once `tracking` is populated, you can follow the Correios tracking code, and
  download the submitted PDF, envelope front, return receipt (AR) or sender's
  copy via
  [`/api/v2/download/{securityToken}/{job_id}/{type}`](/en/products/letters).
</Tip>
