# Client — Spam

<a id="get-api-v1-client-spam-emails"></a>
#### `GET /api/v1/client/spam/emails`

*List spam-enabled emails (client)*

Return all email accounts owned by the authenticated client with their per-address spam summary.

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `ApiSuccess_list_dict_str__Any___` | Successful Response |

**Response example (200):**

```json
{
  "data": [
    {}
  ],
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}
```

**cURL example:**

```bash
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/client/spam/emails
```

---

<a id="delete-api-v1-client-spam-settings-email"></a>
#### `DELETE /api/v1/client/spam/settings/{email}`

*Reset spam settings (client)*

Reset spam settings to defaults for a specific email address owned by the authenticated client.

**Path parameters:**

| Name | Type | Required | Notes |
|------|------|----------|-------|
| `email` | string | yes | — |

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `ApiSuccess_dict_str__Any__` | Successful Response |
| `422` | `HTTPValidationError` | Validation Error |

**Response example (200):**

```json
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}
```

**cURL example:**

```bash
curl -X DELETE \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/client/spam/settings/{email}
```

---

<a id="get-api-v1-client-spam-settings-email"></a>
#### `GET /api/v1/client/spam/settings/{email}`

*Get spam settings (client)*

Return spam settings (whitelist, blacklist, enabled flag) for a specific email address.

**Path parameters:**

| Name | Type | Required | Notes |
|------|------|----------|-------|
| `email` | string | yes | — |

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `ApiSuccess_dict_str__Any__` | Successful Response |
| `422` | `HTTPValidationError` | Validation Error |

**Response example (200):**

```json
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}
```

**cURL example:**

```bash
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/client/spam/settings/{email}
```

---

<a id="put-api-v1-client-spam-settings-email"></a>
#### `PUT /api/v1/client/spam/settings/{email}`

*Update spam settings (client)*

Update spam settings (whitelist, blacklist, enabled flag) for a specific email address owned by the authenticated client. Entries are sender addresses or domains, at most 100 per list (422 VALIDATION_ERROR otherwise); the lists are applied by the mail filter when the message's recipients agree.

**Path parameters:**

| Name | Type | Required | Notes |
|------|------|----------|-------|
| `email` | string | yes | — |

**Body fields:**

| Field | Type | Required | Notes |
|-------|------|----------|-------|
| `blacklist` | array<string> | no | — |
| `spam_enabled` | boolean | no | default `True` |
| `whitelist` | array<string> | no | — |

**Request body example:**

```json
{
  "blacklist": [
    "string"
  ],
  "spam_enabled": true,
  "whitelist": [
    "string"
  ]
}
```

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `ApiSuccess_dict_str__Any__` | Successful Response |
| `422` | `HTTPValidationError` | Validation Error |

**Response example (200):**

```json
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}
```

**cURL example:**

```bash
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/client/spam/settings/{email}
```

---
