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

# Email a Maurice proposal and Order

> Send the one fixed, branded Maurice commercial handoff with a private Order link as its sole CTA.

`POST /v1/maurice-order-emails` sends the fixed customer email for a Maurice
proposal and Order. It is deliberately not a general email API: Erdo owns the
subject, preheader, body, audit context, sender, and single CTA. The request can
name only the customer and the already-issued Order.

Use an unscoped `erdo_api_` key belonging to the selected organization.
Scoped keys, Clerk/OAuth sessions, external-user `erdo_token_` credentials, and
trial `erdo_guest_` credentials are rejected because sending email is an
operator-only external side effect.

```bash theme={null}
curl -X POST "https://api.erdo.ai/v1/maurice-order-emails" \
  -H "Authorization: Bearer $ERDO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "ana@example.com",
    "to_name": "Ana Buyer",
    "customer_company_name": "619 Brickell",
    "order_revision": 3,
    "starts_on": "2026-09-01",
    "ends_on": "2026-12-31",
    "order_url": "https://usemaurice.com/order/abcdefghijklmnopqrstuvwxyz_12345",
    "order_id": "123e4567-e89b-42d3-a456-426614174000",
    "idempotency_key": "maurice-order-619-brickell-r3"
  }'
```

The Order URL must be an absolute HTTPS URL on a public host, use exactly one
`/order/<token>` path where the base64url token is 32–128 characters, and
contain no credentials, query, or fragment. Local
development may use HTTP only on exact `localhost`, `127.0.0.1`, or `[::1]`
origins, with an optional port. Dates use
`YYYY-MM-DD` and the end cannot precede the start. The idempotency key is
required, limited to 256 characters, and may contain letters, numbers, dots,
underscores, colons, and hyphens.

The fixed customer copy is:

* subject: `Your Maurice proposal and Order are ready`
* preheader: `Review your proposal, accept the Order, and set up billing for <company>.`
* heading: `Your Maurice proposal and Order`
* sole CTA: `Review proposal and accept Order`

The body says: `Your Maurice proposal and Order for <company> are ready to
review in one place. Review the proposal, accept the Order, and set up billing
when you are ready.` The request cannot add another link or replace the copy.

A successful response identifies Erdo's audited email row:

```json theme={null}
{
  "email_id": "5d68f1fd-dbeb-4a2a-83ec-8dfc3f617861",
  "to": "ana@example.com",
  "subject": "Your Maurice proposal and Order are ready",
  "status": "sent",
  "from": "orders@usemaurice.com"
}
```

Retry the same logical send with the same idempotency key. An already accepted
message returns the same audited result as `status:"sent"` without another
provider send, while its read-log state remains delivered, bounced, or another
later delivery state. A failed attempt is safely retried; a stale in-progress
attempt can be recovered after its five-minute lease, and a concurrent active
attempt returns a conflict. Using the key with different content is rejected.
Resend receives the same key as a provider-level backstop.

<Warning>
  The Order URL is a private bearer link. Use it only in this request. Never put
  it in the public sales proposal, Knowledge, content artifacts, analytics,
  scratch data, or another public surface.
</Warning>

In Erdo chat, use the approval-required Maurice action
`email_billing_order` after `issue_billing_order`. It passes only the returned
`orderId` and `orderUrl` to Maurice. A fresh `get_billing_orders` call returns
`proposalEmail` status.
