# Add a list entry

**`POST https://myagentmail.com/v1/inboxes/{id}/lists/{lid}/entries`**

Group: Lists
Operation ID: `addListEntry`

## Path parameters

- `id` (string, required) — Inbox UUID
- `lid` (string, required) — List UUID

## Request body

Content-Type: `application/json`

```json
{
  "email": "agent@example.com",
  "displayName": "string",
  "metadata": {}
}
```

## Responses

### 201 — Created

```json
{
  "id": "00000000-0000-0000-0000-000000000000",
  "email": "agent@example.com",
  "displayName": "string",
  "metadata": {},
  "createdAt": "2026-05-01T08:11:44.631Z"
}
```

### 409 — Resource already exists

```json
{
  "error": "string",
  "code": "VALIDATION_ERROR"
}
```

## Code samples

### TypeScript

```typescript
import { MyAgentMail } from "myagentmail";

const client = new MyAgentMail({ apiKey: process.env.MYAGENTMAIL_API_KEY! });

// POST /v1/inboxes/{id}/lists/{lid}/entries
const result = await client.request("post", "/v1/inboxes/{id}/lists/{lid}/entries", { params: { id: "00000000-0000-0000-0000-000000000000", lid: "00000000-0000-0000-0000-000000000000" } }, { body: {
  "email": "agent@example.com",
  "displayName": "string",
  "metadata": {}
} });
```

### curl

```bash
curl -X POST 'https://myagentmail.com/v1/inboxes/00000000-0000-0000-0000-000000000000/lists/00000000-0000-0000-0000-000000000000/entries' \
  -H 'X-API-Key: $MYAGENTMAIL_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "email": "agent@example.com",
  "displayName": "string",
  "metadata": {}
}'
```

### Python

```python
import os, requests

r = requests.post(
    "https://myagentmail.com/v1/inboxes/00000000-0000-0000-0000-000000000000/lists/00000000-0000-0000-0000-000000000000/entries",
    headers={"X-API-Key": os.environ["MYAGENTMAIL_API_KEY"]},
    json={
        "email": "agent@example.com",
        "displayName": "string",
        "metadata": {}
    },
)
r.raise_for_status()
print(r.json())
```
