curl --request PATCH \
--url https://api.app.lastaccountingcompany.com/portal/inbox-connections/{connection_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "<string>",
"label": "<string>",
"context_note": "<string>"
}
'import requests
url = "https://api.app.lastaccountingcompany.com/portal/inbox-connections/{connection_id}"
payload = {
"customer_id": "<string>",
"label": "<string>",
"context_note": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({customer_id: '<string>', label: '<string>', context_note: '<string>'})
};
fetch('https://api.app.lastaccountingcompany.com/portal/inbox-connections/{connection_id}', 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.app.lastaccountingcompany.com/portal/inbox-connections/{connection_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'customer_id' => '<string>',
'label' => '<string>',
'context_note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.app.lastaccountingcompany.com/portal/inbox-connections/{connection_id}"
payload := strings.NewReader("{\n \"customer_id\": \"<string>\",\n \"label\": \"<string>\",\n \"context_note\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.app.lastaccountingcompany.com/portal/inbox-connections/{connection_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"<string>\",\n \"label\": \"<string>\",\n \"context_note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.lastaccountingcompany.com/portal/inbox-connections/{connection_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"<string>\",\n \"label\": \"<string>\",\n \"context_note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}Update a Gmail inbox connection
Changes the customer-owned facts of one connected Gmail inbox: its display label, a context note, and the capture selection that decides what LAC keeps from the mailbox as accounting evidence. A Google grant alone selects nothing (capture_status: selection_required); the selection is made here or carried with the OAuth start, and the server stamps who chose it and when. Requires a write-scoped key or a signed-in company admin.
curl --request PATCH \
--url https://api.app.lastaccountingcompany.com/portal/inbox-connections/{connection_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "<string>",
"label": "<string>",
"context_note": "<string>"
}
'import requests
url = "https://api.app.lastaccountingcompany.com/portal/inbox-connections/{connection_id}"
payload = {
"customer_id": "<string>",
"label": "<string>",
"context_note": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({customer_id: '<string>', label: '<string>', context_note: '<string>'})
};
fetch('https://api.app.lastaccountingcompany.com/portal/inbox-connections/{connection_id}', 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.app.lastaccountingcompany.com/portal/inbox-connections/{connection_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'customer_id' => '<string>',
'label' => '<string>',
'context_note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.app.lastaccountingcompany.com/portal/inbox-connections/{connection_id}"
payload := strings.NewReader("{\n \"customer_id\": \"<string>\",\n \"label\": \"<string>\",\n \"context_note\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.app.lastaccountingcompany.com/portal/inbox-connections/{connection_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"<string>\",\n \"label\": \"<string>\",\n \"context_note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.lastaccountingcompany.com/portal/inbox-connections/{connection_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"<string>\",\n \"label\": \"<string>\",\n \"context_note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}Authorizations
Portal API key minted in portal Settings → API access. Scope read or write; pinned to one company. Send as Authorization: Bearer lac_sk_....
Path Parameters
Body
Target company. Optional for API keys.
What LAC keeps from a connected Gmail inbox as accounting evidence. mailbox keeps every message (a designated receipts or invoices inbox), attachments keeps only messages carrying a file, label keeps only messages under one Gmail label. Read back on the connection list as capture with selected_by and selected_at, beside capture_status (selected_mailbox, selection_required, selection_invalid).
Show child attributes
Show child attributes
Response
Update accepted; reread the connection list for the canonical state.