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

# Sandbox

> Free sandbox line for testing with 50 messages per day

Every Messages.dev account includes a **sandbox line**: a shared iMessage number you can use immediately to send and receive up to 50 messages per day.

## How it works

The sandbox is a Messages.dev-owned iMessage line that all users share. To keep messages private, each user pairs their personal phone number with their account through an activation code.

### Activation

1. Go to the **Lines** page in your [dashboard](https://app.messages.dev)
2. Scan the QR code with your phone, or copy the activation code and text it to the sandbox number
3. Once the message is received, your sandbox is activated and your phone number is paired

After activation, you can send messages to your paired phone and receive webhooks for incoming messages, just like a dedicated line.

### Limits

|                      |                                                           |
| -------------------- | --------------------------------------------------------- |
| **Messages per day** | 50                                                        |
| **Reset time**       | Midnight UTC                                              |
| **Recipient**        | Your paired phone number only                             |
| **Features**         | Send, receive, reactions, typing, read receipts, webhooks |

The daily limit is per account, not per API key. All your API keys share the same 50-message sandbox budget.

## Sending messages

Use the sandbox line handle as the `from` field and your paired phone number as `to`:

<CodeGroup>
  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
  import { createClient } from "@messages-dev/sdk";

  const client = createClient();

  await client.sendMessage({
    from: "+15551234567",
    to: "+15559876543",
    text: "Hello from the sandbox!",
  });
  ```

  ```bash curl theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
  curl -X POST "https://api.messages.dev/v1/messages" \
    -H "Authorization: Bearer sk_live_..." \
    -H "Content-Type: application/json" \
    -d '{
      "from": "+15551234567",
      "to": "+15559876543",
      "text": "Hello from the sandbox!"
    }'
  ```
</CodeGroup>

## Receiving messages

Register a webhook on the sandbox line to receive notifications when your paired phone sends messages back:

1. Go to **Webhooks** in the dashboard
2. Select the sandbox line and enter your endpoint URL
3. Webhooks are scoped to your account; you only receive events for your paired phone number

## Upgrading to a dedicated line

The sandbox is designed for testing and evaluation. For production use:

* Set up a dedicated iMessage line with no daily limits
* See the [quickstart guide](/quickstart) for setup instructions

## Errors

| Status | Code                       | Meaning                                                                                 |
| ------ | -------------------------- | --------------------------------------------------------------------------------------- |
| 403    | `sandbox_not_activated`    | Your sandbox hasn't been activated yet. Text the activation code to the sandbox number. |
| 400    | `sandbox_contact_mismatch` | You can only send to your paired phone number on the sandbox line.                      |
| 429    | `sandbox_quota_exceeded`   | Daily limit of 50 messages reached. Resets at midnight UTC.                             |
