# Test mode

Test mode is the whole product with one difference: no email leaves. You get the same API on the same host, with the key deciding the mode.

## How it works

A key that starts with `di_test_` is a test key. There is no separate environment or second account. Test and live are separate worlds: a key never sees the other mode's documents.

| | Test key | Live key |
|---|---|---|
| Emails signers | Never | Yes |
| `send_document` | Sends at once and returns signing links | Follows the key's send policy |
| Approval step | Same as live: agent and MCP sends wait for approval. `simulate_approval` finishes it | Required for agents |
| Daily send limit | None | 100 a day per account in the beta |
| `simulate_signer`, `simulate_approval` | Work | Refused with `test_only` |
| Public PDF checker | Never matches | Matches |

Finished test PDFs are marked as test documents, so nobody can mistake one for the real thing.

## Three ways to finish a test document

**Open the link.** `send_document` returns `signing_links`. Open one and sign as a person would.

**Call `simulate_signer`.** It plays a signer's part, so a script can run the whole flow with no browser.

```
curl https://docuinked.com/v1/test/documents/DOCUMENT_ID/simulate \
  -H "Authorization: Bearer $DOCUINKED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"signer": 1, "action": "sign"}'
```

**Use a magic address.** In test mode, the address says what happens when the document is sent.

| Signer email | What happens |
|---|---|
| `sign@test.docuinked.com` | Signs at once |
| `decline@test.docuinked.com` | Declines at once |

## Good for agent evals

Test keys email no one, and an agent sees the same approval step it will hit live. To run end to end unattended, have the eval call `simulate_approval` when a send returns `pending_approval`, then `simulate_signer` (or use a magic address). Check the final state with `get_document` and `get_evidence`; a simulated approval is marked as one in the evidence.

```
curl https://docuinked.com/v1/test/documents/DOCUMENT_ID/approve \
  -H "Authorization: Bearer $DOCUINKED_API_KEY" -H "Content-Type: application/json" -d '{}'
```

A test key set to "Sends directly" skips the approval step entirely, the same as it would live.

## Common questions

### Is a test document signed for real?

No. It goes through the same steps and gets a seal, but it is a practice run. It is marked as a test and the public checker won't match it. Don't use one for a real agreement.

### Can a test key ever email someone by mistake?

No. Test documents skip the mail step on the server, whatever address you enter. Reminders are skipped too.

### How long are test documents kept?

30 days from when they're made. Then they're deleted the same way a delete call deletes them: the file's key is destroyed. Use live mode for anything you need to keep.

### Do I need a card or a separate sandbox account?

No. Test keys come from your normal account, and test documents are always free. A card is only asked for when you send a sixth live document.
