# Start a sandbox activation

Starts a sandbox activation.

```http
POST https://api.pozy.ai/v1/whatsapp/sandbox/sessions
```

- Area: WhatsApp / WhatsApp Sandbox
- Auth: Authorization: Bearer pz_live_...

## Request body

Content type: `application/json`

- `phone`, string, required

## Example request

```bash
curl -X POST "https://api.pozy.ai/v1/whatsapp/sandbox/sessions" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "phone": "+14155550123"
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/whatsapp/sandbox/sessions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    phone: "+14155550123"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.post(
    "https://api.pozy.ai/v1/whatsapp/sandbox/sessions",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "phone": "+14155550123",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `session`, object
  - `id`, string, required
  - `phoneE164`, string, required
  - `status`, string, required: One of `pending`, `active`
  - `expiresAt`, string (date-time), required
  - `activatedAt`, string (date-time): Can be null
  - `createdAt`, string (date-time): Can be null
- `sandboxNumber`, string

```json
{
  "session": {
    "id": "6bfebd43ddc270f6d2c56fc5",
    "phoneE164": "+14155550123",
    "status": "pending",
    "expiresAt": "2026-10-02T09:00:00.000Z",
    "activatedAt": "2026-10-02T09:00:00.000Z",
    "createdAt": "2026-10-02T09:00:00.000Z"
  },
  "sandboxNumber": "string"
}
```
