> ## Documentation Index
> Fetch the complete documentation index at: https://docs.macro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SetSenderPolicy

> Set where future mail from a sender lands in one of the user's inboxes. This is the same control a human has in the inbox menus: Sender → Signal, Sender → Noise, and Block Sender.  Policies: - `signal`: the sender's future mail shows in the Signal view. Use for senders the user says are important. - `noise`: the sender's future mail shows in the Noise view. Mail still arrives and stays searchable. Use for newsletters, promos, and other low-value senders. - `block`: ALL future mail from the sender is sent straight to trash and never reaches the inbox. This is much stronger than noise. Only use it when the user explicitly asks to block a sender; when they just call mail unwanted or spammy, prefer `noise`.  Policies are per inbox. When acting on a specific thread (e.g. after GetThread), pass `thread_id` so the policy applies to the inbox that owns that thread, which matters for delegated or secondary inboxes. Otherwise pass `inbox` (an inbox email address from ListInboxes) to name one, or omit both to use the primary inbox.  Get `sender_email` from GetThread (`from.email`) or ListEntities (`sender_email`); do not guess addresses. Calling again with a different policy overwrites the previous one. Repeating a call with the same arguments is safe.

# SetSenderPolicy

Set where future mail from a sender lands in one of the user's inboxes. This is the same control a human has in the inbox menus: Sender → Signal, Sender → Noise, and Block Sender.

Policies:

* `signal`: the sender's future mail shows in the Signal view. Use for senders the user says are important.
* `noise`: the sender's future mail shows in the Noise view. Mail still arrives and stays searchable. Use for newsletters, promos, and other low-value senders.
* `block`: ALL future mail from the sender is sent straight to trash and never reaches the inbox. This is much stronger than noise. Only use it when the user explicitly asks to block a sender; when they just call mail unwanted or spammy, prefer `noise`.

Policies are per inbox. When acting on a specific thread (e.g. after GetThread), pass `thread_id` so the policy applies to the inbox that owns that thread, which matters for delegated or secondary inboxes. Otherwise pass `inbox` (an inbox email address from ListInboxes) to name one, or omit both to use the primary inbox.

Get `sender_email` from GetThread (`from.email`) or ListEntities (`sender_email`); do not guess addresses. Calling again with a different policy overwrites the previous one. Repeating a call with the same arguments is safe.

## Parameters

| Parameter      | Type                                 | Required | Description                                                                                                                                        |
| -------------- | ------------------------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sender_email` | string                               | Yes      | The sender's email address, e.g. `from.email` on a GetThread message or `sender_email` on a ListEntities email row. Exact address, not a domain.   |
| `policy`       | `"signal"` \| `"noise"` \| `"block"` | Yes      | Where future mail from this sender lands: `signal`, `noise`, or `block`.                                                                           |
| `thread_id`    | string                               | No       | Apply the policy to the inbox that owns this thread (same UUID returned by ListEntities, search, or GetThread). Takes precedence over `inbox`.     |
| `inbox`        | string                               | No       | Apply the policy to a specific inbox by its email address (from ListInboxes). Ignored when `thread_id` is set. Omit both to use the primary inbox. |
