# Add an iMessage sandbox contact

Adds an iMessage sandbox contact.

```http
POST https://api.pozy.ai/v1/imessage/sandbox/contacts
```

- Area: Messaging / iMessage
- Auth: Authorization: Bearer pz_live_...

## Request body

Content type: `application/json`

- `handle`, string, required

## Example request

```bash
curl -X POST "https://api.pozy.ai/v1/imessage/sandbox/contacts" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "handle": "acme"
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/imessage/sandbox/contacts", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    handle: "acme"
  }),
});
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/imessage/sandbox/contacts",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "handle": "acme",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 201

- `contact`, object
  - `id`, string
  - `handle`, string
  - `status`, string: One of `pending`, `active`
  - `joinText`, string
  - `joinLink`, string
  - `activatedAt`, string (date-time): Can be null
  - `lastInboundAt`, string (date-time): Can be null
  - `createdAt`, string (date-time)

```json
{
  "contact": {
    "id": "6bfebd43ddc270f6d2c56fc5",
    "handle": "acme",
    "status": "pending",
    "joinText": "Hello from Pozy",
    "joinLink": "string",
    "activatedAt": "2026-10-02T09:00:00.000Z",
    "lastInboundAt": "2026-10-02T09:00:00.000Z",
    "createdAt": "2026-10-02T09:00:00.000Z"
  }
}
```
