API to send invoice by invoice id

http
POST https://services.leadconnectorhq.com/invoices/{invoiceId}/send

Authorization

NameTypeRequiredExampleDescription
AuthorizationstringYesBearer token generated from the Leadway portal. See Authentication.
VersionstringYes2021-07-28API version.

Path parameters

NameTypeRequiredExampleDescription
invoiceIdstringYes6578278e879ad2646715ba9cInvoice Id

Body

NameTypeRequiredExampleDescription
altIdstringYes6578278e879ad2646715ba9caccount Id / company Id based on altType
altTypestringYesaccountAlt Type Possible values: 'account'
userIdstringYes6578278e879ad2646715ba9cPlease ensure that the UserId corresponds to an authorized personnel, either by an employee ID or agency ID, to access this account. This account will serve as the primary channel for all future communications and updates.
actionstringYesPossible values: 'sms_and_email', 'send_manually', 'email', 'sms'
liveModebooleanYes
sentFromobjectNosender details for invoice, valid only if invoice is not sent manually
autoPaymentobjectNoauto-payment configuration

Responses

200 - Successful response
  • invoice (object, required)

    • _id (string, required): Invoice Id Example: 6578278e879ad2646715ba9c

    • status (string, required): Invoice Status Possible values: 'draft', 'sent', 'payment_processing', 'paid', 'void', 'partially_paid' Example: draft

    • liveMode (boolean, required): Live Mode Example: False

    • amountPaid (number, required): Amount Paid Example: 0

    • altId (string, required): Account Id or Agency Id Example: 6578278e879ad2646715ba9c

    • altType (string, required): Possible values: 'account'

    • name (string, required): Name of the invoice Example: New Invoice

    • businessDetails (object, required): Business Details

    • invoiceNumber (number, required): Invoice Number Example: 19

    • currency (string, required): Currency Example: USD

    • contactDetails (object, required): Contact Details

    • issueDate (string, required): Issue date in YYYY-MM-DD format Example: 2023-01-01

    • dueDate (string, required): Due date in YYYY-MM-DD format Example: 2023-01-01

    • discount (object): Discount

    • invoiceItems (string[], required): Invoice Items

    • total (number, required): Total Amount Example: 999

    • title (string, required): Title Example: INVOICE

    • amountDue (number, required): Total Amount Due Example: 999

    • createdAt (string, required): created at Example: 2023-12-12T09:27:42.355Z

    • updatedAt (string, required): updated at Example: 2023-12-12T09:27:42.355Z

    • automaticTaxesEnabled (boolean): Automatic taxes enabled for the Invoice Example: True

    • automaticTaxesCalculated (boolean): Is Automatic taxes calculated for the Invoice items Example: True

    • paymentSchedule (object): split invoice into payment schedule summing up to full invoice amount

  • smsData (object, required)

  • emailData (object, required)

json
{
  "invoice": {
    "_id": "6578278e879ad2646715ba9c",
    "status": "draft",
    "liveMode": false,
    "amountPaid": 0,
    "altId": "6578278e879ad2646715ba9c",
    "altType": "account",
    "name": "New Invoice",
    "businessDetails": {
      "name": "Alex",
      "address": {
        "addressLine1": "9931 Beechwood",
        "city": "St. Houston",
        "state": "TX",
        "countryCode": "USA",
        "postalCode": "559-6993"
      },
      "phoneNo": "+1-214-559-6993",
      "website": "www.example.com"
    },
    "invoiceNumber": "19",
    "currency": "USD",
    "contactDetails": {
      "id": "c6tZZU0rJBf30ZXx9Gli",
      "phoneNo": "+1-214-559-6993",
      "email": "alex@example.com",
      "customFields": [],
      "name": "Alex",
      "address": {
        "countryCode": "US"
      }
    },
    "issueDate": "2023-01-01",
    "dueDate": "2023-01-01",
    "discount": {
      "type": "percentage",
      "value": 0
    },
  // truncado: 24 lineas mas
}
400 - Bad Request
json
{}
401 - Unauthorized
json
{}
422 - Unprocessable Entity
json
{}

Example

curl -X POST 'https://services.leadconnectorhq.com/invoices/YOUR_invoiceId/send' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "altId": "6578278e879ad2646715ba9c",
  "altType": "account",
  "userId": "6578278e879ad2646715ba9c",
  "action": "sms_and_email",
  "liveMode": true
}'

Last updated October 26, 2026

Was this page helpful?