# Send Yourself A Test

> Solarium docs, Invoices. All requests are `POST https://api.trysolarium.com/graphql/` with `Authorization: Bearer <api key>` and a JSON body `{"query": ..., "variables": ...}`. Every query and mutation takes an `organizationId` (find it with `myOrganizations`). Index of all pages: https://trysolarium.com/llms.txt

Emails you the exact email and PDF your customer gets, for a draft or a sent invoice. The subject starts with [Test], a banner says your customer didn't get it, and the PDF is stamped TEST. A draft shows Draft where the number goes. Nothing else changes: no number is used, nothing is booked, and the status, sent date and reminders stay as they are. Its View Invoice link is a preview that lasts 7 days and never marks the invoice viewed. Up to 10 a day per invoice. A read-only accountant can't send one.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `params.invoice_id` | `String!` | Yes | The invoice |
| `params.to` | `String` | No | One email (default: yours). Your customer's own email is refused |

### Request

```graphql
mutation {
  runOp(organizationId: "a1b2c3d4-...", name: "test_send_invoice", apply: true,
        params: { invoice_id: "9f3c..." }) { success result }
}
```

### Response

```json
{
  "data": {
    "runOp": {
      "success": true,
      "result": {
        "summary": "Sent A Test Of Draft To owner@example.com. Your Customer Didn't Get It.",
        "data": { "to": "owner@example.com", "number": "Draft", "status": "draft" }
      }
    }
  }
}
```
