# POST /reports/send

**Resource:** [Reports](./reports.md)  
**Scopes:** `opportunities:read`  
**Write operation:** yes

Send a report dashboard as an email digest. Dashboard cards render server-side and are inlined into the email body. Each recipient is scoped via current_user_id so cards filtered to "the current user" naturally show per-recipient data. Returns per-recipient send status with skipped_reason when a send is suppressed.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `dashboard_id` | body | uuid | yes | UUID of the dashboard to send. |
| `recipients` | body | array | yes | Array of recipients. Each item is a plain email string or { email, name?, user_id? }. user_id scopes the rendered report to that workspace user. |
| `subject` | body | string | no | Email subject line. Defaults to the dashboard name. |
| `intro_text` | body | string | no | Plain-text intro paragraph above the report block. Supports {{variable}} placeholders. Ignored when intro_html is also set. |
| `outro_text` | body | string | no | Plain-text outro paragraph below the report block. Supports {{variable}} placeholders. Ignored when outro_html is also set. |
| `intro_html` | body | string | no | Pre-authored HTML intro (e.g. from the rich-text wizard). Takes precedence over intro_text when both are provided. |
| `outro_html` | body | string | no | Pre-authored HTML outro. Takes precedence over outro_text when both are provided. |
| `sender_name` | body | string | no | Display name shown above the signature line. |
| `suppress_if_empty` | body | boolean | no | When true (default), skip sending to any recipient whose dashboard renders zero rows. Skipped sends are reported as success with skipped_reason: "empty_dashboard". |
| `email_config_id` | body | uuid | no | Optional email config UUID to pin the sender alias or provider. |
| `email_provider` | body | string | no | Provider to use: "postmark" (TrustPager Mail, default) or "gmail". Gmail requires the workspace email_config to have a Gmail sender connected; returns an error otherwise. |
| `contact_id` | body | uuid | no | Optional CRM contact UUID to associate with the email send log. |
| `customer_id` | body | uuid | no | Optional CRM company UUID to associate with the email send log. |
| `deal_id` | body | uuid | no | Optional CRM opportunity UUID to associate with the email send log. |

## Response example

```json
{
  "request": {
    "dashboard_id": "550e8400-e29b-41d4-a716-446655440000",
    "recipients": [
      {
        "email": "alice@example.com",
        "name": "Alice",
        "user_id": "usr_abc123"
      }
    ],
    "subject": "Your weekly sales report",
    "intro_html": "<p>Hi {{name}}, here is your weekly summary.</p>",
    "email_provider": "postmark",
    "suppress_if_empty": true
  },
  "response": {
    "success": true,
    "dashboard_name": "Sales Overview",
    "recipients": [
      {
        "email": "alice@example.com",
        "sent": true,
        "rendered_card_count": 4
      }
    ]
  }
}
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`