ONE invoice:send
← Receivers

invoice:send

invoice family

mcp

Send a draft (or re-send a sent) estimate or invoice: emails the customer the hosted page where they accept or pay. An invoice's first send also starts its reminder path, if the workspace has the invoice-reminder template installed: one before the due date, two after. Mail is capped at 5 per document, one a minute, 100 an hour per workspace.

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
owner
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
free
What one call costs, so you can budget before acting.
Reversible
no
This cannot be undone. Dry-run it first where the contract allows.
Settles
offchain
Moves real value off chain — a balance changes.
Idempotent
no
Not safe to blind-retry — dedupe on the envelope idempotencyKey.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/invoice:send \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "id": <string> }}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • workspace string optional Defaults to the attested caller's own; the caller must control it
  • id string required The document id (inv_… or est_…) from invoice:create

Response

What comes back from the call.

  • ok boolean
  • id string
  • number string
  • status string
  • url string
  • emailed boolean false when no mail went: the document is still sent, by link
  • reason string Why no mail went: no_customer_email · email_rate_limited · too_many_emails · workspace_email_cap · email_failed
  • remindersStarted boolean true when the reminder path was fired for this invoice (once per invoice)
  • error string sign_in_required · not_your_workspace · not_found · invoice_paid · estimate_accepted · doc_void · doc_declined · no_db

Traffic

Every call to invoice:send, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names invoice:send, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

API route 2
  • one.ie/web/src/lib/pay/customer-invoice-send.ts:3
  • one.ie/web/src/lib/receiver-index.generated.ts:252
Workflow 1
  • one.ie/web/src/lib/workflow-templates.ts:970
CLI 2
  • packages/cli/src/invoice.ts:144
  • packages/cli/src/lib/money-receivers.ts:26
→

Answered by

invoice:send one.ie/web/src/lib/resolvers/customer-invoice.ts:311 Dispatched through POST /api/ask/invoice:send, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace": {
      "description": "Defaults to the attested caller's own; the caller must control it",
      "type": "string"
    },
    "id": {
      "type": "string",
      "description": "The document id (inv_… or est_…) from invoice:create"
    }
  },
  "required": [
    "id"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "id": {
      "type": "string"
    },
    "number": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "emailed": {
      "description": "false when no mail went: the document is still sent, by link",
      "type": "boolean"
    },
    "reason": {
      "description": "Why no mail went: no_customer_email · email_rate_limited · too_many_emails · workspace_email_cap · email_failed",
      "type": "string"
    },
    "remindersStarted": {
      "description": "true when the reminder path was fired for this invoice (once per invoice)",
      "type": "boolean"
    },
    "error": {
      "description": "sign_in_required · not_your_workspace · not_found · invoice_paid · estimate_accepted · doc_void · doc_declined · no_db",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}