---
title: "Send Ar Scheduler Test"
method: POST
path: "/api/finance/ar-scheduler/drafts/{invoice_id}/{step}/test"
tags: ["finance"]
---

# Send Ar Scheduler Test

`POST /api/finance/ar-scheduler/drafts/{invoice_id}/{step}/test`

## Request

- Base URL: `https://api.pigeonly.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pigeonly.com/api/finance/ar-scheduler/drafts/{invoice_id}/{step}/test`
- Auth: none declared

Send Test -- v1 parity: POST /drafts/:invoiceId/:step/test
(ar-agent.ts:1560-1606). Deliberately bypasses
app/platform/email_out.send_email's claim-once floor: a test send must
NEVER consume the real `ar:{invoice_id}:{cadence_step}` idempotency
slot (that would permanently block the real send for this invoice/step
the moment someone clicked Test), matching v1's own test path (a bare
sendGmailMessage call, no activity_log write at all) -- see
app/modules/finance/ar_scheduler_send.py's send_test_email docstring.

A STUBBED SEND MUST NEVER PRESENT AS A DELIVERED ONE. `build_ar_email_
sender` returns `StubEmailSender` whenever any of its three gates is
off -- `ar_customer_email_enabled` is false on production today, so
this route's sender IS the stub right now. Before this build task the
response was an unconditional `{"ok": True}` regardless: Frederick
clicked Send Test and got exactly that, with no mail and no error.

## Path parameters

- `invoice_id` string, uuid, required
- `step` string, required

## Request body

- SendTestRequest
  - `test_email` string, required

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os.md) - [All operations](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/llms.txt) - [OpenAPI document](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/revisions/14571c4b7007?raw)
