# Test mode and magic numbers

> How wk_test_ keys keep you away from real customers and money, magic numbers, test recipients and simulated inbound messages.

## What a test key can and cannot do

A `wk_test_` key works in your organisation's **test workspace**, created the first time you use the key. It holds
its own contacts, chats, messages, webhook endpoints and events; your live workspace never sees them, and live keys
never see test data.

- Messages from the test workspace **never go through your real WhatsApp number** and never reach Meta with your
  credentials. They are simulated, or delivered from the shared Wapitick test number to phones you verified.
- Wallet, AI credits, ads, voice, billing, exports and channel connection are **not available** with a test key: those
  requests answer `403 test_mode_unsupported`. Messages, contacts, conversations, templates (read), webhooks, events,
  the request log and usage are.
- Every event and webhook delivery carries `"livemode": false`. Test webhook endpoints receive only test events.
- Test traffic has its own per-minute rate limits and does not count toward `api.requests.day`.

The test workspace has three sample templates: `hello_world`, `order_update` (`{{1}}` name, `{{2}}` order) and
`test_rejected` (always refused, to see `template_not_approved`).

## Magic numbers

Send to these numbers to get a fixed outcome. Any other number is simulated as delivered.

| Number | Outcome | Meta code |
|---|---|---|
| `+15550100001` | Sent, then delivered. | - |
| `+15550100002` | Sent, delivered, then read. | - |
| `+15550100003` | Fails: the number cannot receive WhatsApp messages (Meta 131026). | 131026 |
| `+15550100004` | Fails: the template was rejected or paused (Meta 132015). | 132015 |
| `+15550100005` | Fails: the person stopped marketing messages (Meta 131050). | 131050 |
| `+15550100006` | Fails: too many messages to this number (Meta 131056 pair rate limit). | 131056 |

Failures carry the Meta error code in `message.failed` and `GET /v1/messages/{id}` (`error.code`). The list is also
at `GET /v1/test/magic-numbers` (`test_magic_numbers_list`).

## Test recipients: get test messages on your own phone

Up to 5 phones per workspace. `POST /v1/test/recipients` (`test_recipients_create`) with `{"phone": "+91..."}` returns
`join_text` (`START ABC123`) and a `join_link`. Send that text from the phone to the shared Wapitick test number on
WhatsApp within 24 hours. Or send a bare `START`: the number replies with a 6-digit code you enter with
`POST /v1/test/recipients/{id}/verify`. After that, test sends to that phone arrive for real, as text.

## Simulate a customer writing to you

```bash
curl https://api.wapitick.com/v1/test/inbound -H "Authorization: Bearer $WAPITICK_API_KEY" \
  -H "Content-Type: application/json" -d '{"from":"+15550100009","text":"Is this in stock?","name":"Ravi"}'
```

`test_inbound_create` goes through the normal pipeline: the contact and conversation are created and
`message.received` reaches your test webhook endpoints within a couple of seconds.
