Invoice Receivables
Send invoice email
Sends an invoice receivable email with the given email information
POST
/
v1
/
invoice-receivables
/
{invoiceReceivableId}
/
send-email
Send invoice email
curl --request POST \
--url https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/send-email \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"subject": "<string>",
"replyTo": "<string>",
"recipients": [
"<string>"
],
"cc": [
"<string>"
],
"customMessage": "<string>"
}
'import requests
url = "https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/send-email"
payload = {
"subject": "<string>",
"replyTo": "<string>",
"recipients": ["<string>"],
"cc": ["<string>"],
"customMessage": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json;charset=UTF-8'},
body: JSON.stringify({
subject: '<string>',
replyTo: '<string>',
recipients: ['<string>'],
cc: ['<string>'],
customMessage: '<string>'
})
};
fetch('https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/send-email', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/send-email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subject' => '<string>',
'replyTo' => '<string>',
'recipients' => [
'<string>'
],
'cc' => [
'<string>'
],
'customMessage' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json;charset=UTF-8"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/send-email"
payload := strings.NewReader("{\n \"subject\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"recipients\": [\n \"<string>\"\n ],\n \"cc\": [\n \"<string>\"\n ],\n \"customMessage\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/send-email")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"subject\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"recipients\": [\n \"<string>\"\n ],\n \"cc\": [\n \"<string>\"\n ],\n \"customMessage\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/send-email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json;charset=UTF-8'
request.body = "{\n \"subject\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"recipients\": [\n \"<string>\"\n ],\n \"cc\": [\n \"<string>\"\n ],\n \"customMessage\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
apiKeyAuthbearerAuth
Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.
Path Parameters
Body
application/json;charset=UTF-8
Email subject line
Reply-to email address
List of email addresses to send the invoice to
List of email addresses to send the invoice to
List of email addresses to CC on the invoice email
List of email addresses to CC on the invoice email
Optional custom message added to the invoice email body
Response
default - application/json;charset=UTF-8
default response
⌘I
Send invoice email
curl --request POST \
--url https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/send-email \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"subject": "<string>",
"replyTo": "<string>",
"recipients": [
"<string>"
],
"cc": [
"<string>"
],
"customMessage": "<string>"
}
'import requests
url = "https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/send-email"
payload = {
"subject": "<string>",
"replyTo": "<string>",
"recipients": ["<string>"],
"cc": ["<string>"],
"customMessage": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json;charset=UTF-8'},
body: JSON.stringify({
subject: '<string>',
replyTo: '<string>',
recipients: ['<string>'],
cc: ['<string>'],
customMessage: '<string>'
})
};
fetch('https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/send-email', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/send-email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subject' => '<string>',
'replyTo' => '<string>',
'recipients' => [
'<string>'
],
'cc' => [
'<string>'
],
'customMessage' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json;charset=UTF-8"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/send-email"
payload := strings.NewReader("{\n \"subject\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"recipients\": [\n \"<string>\"\n ],\n \"cc\": [\n \"<string>\"\n ],\n \"customMessage\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/send-email")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"subject\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"recipients\": [\n \"<string>\"\n ],\n \"cc\": [\n \"<string>\"\n ],\n \"customMessage\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/send-email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json;charset=UTF-8'
request.body = "{\n \"subject\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"recipients\": [\n \"<string>\"\n ],\n \"cc\": [\n \"<string>\"\n ],\n \"customMessage\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body