Skip to main content
POST
/
v1
/
invoices
/
{invoiceId}
/
send
Send invoice by email
curl --request POST \
  --url https://api.infinity.swiss/v1/invoices/{invoiceId}/send \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '
{
  "email": "jsmith@example.com",
  "description": "<string>"
}
'
{
  "invoice": {
    "id": "<string>",
    "isDraft": true,
    "number": "<string>",
    "organisation": "<string>",
    "template": "<string>",
    "openingDate": "2023-12-25",
    "dueDate": "2023-12-25",
    "positions": [
      {
        "type": "product",
        "name": "<string>",
        "singleAmount": 12000,
        "quantity": 2,
        "contraAccount": 5499,
        "id": "<string>",
        "unit": "<string>",
        "taxCode": "",
        "articleNumber": "<string>",
        "description": "<string>",
        "date": "<string>",
        "discountRate": 50,
        "customTextColumns": {
          "customTextColumn1": "<string>",
          "customTextColumn2": "<string>",
          "customTextColumn3": "<string>"
        },
        "totalAmount": 123,
        "vatDebt": 123,
        "originalCurrency": "<string>",
        "exchangeRate": 123
      }
    ],
    "totalAmount": 123,
    "totalNetAmount": 123,
    "totalVatDebt": 123,
    "isQrInvoice": true,
    "totalAmountPaid": 123,
    "totalRestAmount": 123,
    "isPaid": true,
    "isOverpaid": true,
    "isAnnulled": true,
    "recipient": "<string>",
    "customRecipientText": "<string>",
    "title": "<string>",
    "payableInDays": 123,
    "introductoryText": "<string>",
    "closingText": "<string>",
    "originalCurrency": "<string>",
    "exchangeRate": 123,
    "columns": [],
    "emailDeliveries": [
      {
        "recipientEmail": "jsmith@example.com",
        "status": "<string>",
        "timestamp": "2023-11-07T05:31:56Z"
      }
    ],
    "publicPdfUrl": "<string>"
  }
}
If email is omitted, the invoice is sent to the recipient contact’s primary email address. The optional description is included in the email body. Each delivery attempt is logged on the invoice and returned in the emailDeliveries array of subsequent responses.

Authorizations

x-api-token
string
header
required

API token for authentication. Obtain from your Infinity account settings.

Path Parameters

invoiceId
string
required

The id of the invoice to send.

Body

application/json

Optional email override and description.

Request body for sending a document by email.

email
string<email>

Optional override of the recipient address. If not provided, the recipient contact's primary email is used.

description
string

Optional message to include in the email body.

Maximum string length: 2000

Response

The invoice was sent successfully.

invoice
Invoice · object

The full representation of a customer invoice.