---
title: "Add email address to BoxTrapper allowed senders"
method: GET
path: "/BoxTrapper/whitelist_messages"
tags: ["BoxTrapper", "Spam Prevention (BoxTrapper)"]
---

# Add email address to BoxTrapper allowed senders

`GET /BoxTrapper/whitelist_messages`

This function whitelists email messages.

**Important:**

When you disable the [Receive Mail](https://go.cpanel.net/serverroles) role, the system **disables** this function.

**Note:**

To retrieve email messages in the BoxTrapper queue from senders that you did not previously whitelist, use the UAPI `BoxTrapper::deliver_messages` function.

## Query parameters

- `queuefile` string, required
- `email` string, email

## Response `200`

HTTP Request was successful.

- object
  - `apiversion` integer — The version of the API.
  - `func` string — The name of the method called.
  - `module` string — The name of the module called.
  - `result` object
    - `data` object[] — An array of one or more objects, depending on how many queuefiles were passed as parameters. Each object contains information about the whitelisted email message.
      - `email` string, email — A whitelisted email address.
      - `failed` '1' — The system failed to whitelist the message. * `1` — The function failed to whitelist the message. This is the only possible value. **Note:** The function only returns this property if it failed to whitelist the message.
      - `matches` string[] — An array of message files that the system whitelisted. **Note:** The function **only** returns this value if it whitelists the message.
      - `operator` 'whitelist' — The action that the system performed.
      - `reason` string — The reason the function skipped the message during whitelisting. The `reason` property is returned only if the function failed to whitelist the message.
      - `warning` 1 — Whether the system experienced issues when it whitelisted the message. * `1` — There was an issue whitelisting the message. This is the only possible value. **Note:** The function only returns this property if it failed to whitelist the message.
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` object
      - `transformed` 1 — Post-processing may have transformed the data.
    - `status` 0 | 1 — * `1` - Success * `0` - Failed. Check the `errors` field for more details.
    - `warnings` string[], nullable — List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running an API.

---

[API](https://skmtc.net/cpanel/apis/cpanel-uapi.md) · [All operations](https://skmtc.net/cpanel/apis/cpanel-uapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/cpanel-uapi/revisions/632e2f8e6d04/schema)
