Update a customer
curl --request PUT \
--url https://api.dev.bsa.ai/v1/customers/external/{customer_external_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalId": "<string>"
}
'import requests
url = "https://api.dev.bsa.ai/v1/customers/external/{customer_external_id}"
payload = { "externalId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({externalId: '<string>'})
};
fetch('https://api.dev.bsa.ai/v1/customers/external/{customer_external_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.dev.bsa.ai/v1/customers/external/{customer_external_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'externalId' => '<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.dev.bsa.ai/v1/customers/external/{customer_external_id}"
payload := strings.NewReader("{\n \"externalId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.dev.bsa.ai/v1/customers/external/{customer_external_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"externalId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.bsa.ai/v1/customers/external/{customer_external_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyCustomers
Update a customer
Change the externalId on an existing customer record.
PUT
/
v1
/
customers
/
external
/
{customer_external_id}
Update a customer
curl --request PUT \
--url https://api.dev.bsa.ai/v1/customers/external/{customer_external_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalId": "<string>"
}
'import requests
url = "https://api.dev.bsa.ai/v1/customers/external/{customer_external_id}"
payload = { "externalId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({externalId: '<string>'})
};
fetch('https://api.dev.bsa.ai/v1/customers/external/{customer_external_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.dev.bsa.ai/v1/customers/external/{customer_external_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'externalId' => '<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.dev.bsa.ai/v1/customers/external/{customer_external_id}"
payload := strings.NewReader("{\n \"externalId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.dev.bsa.ai/v1/customers/external/{customer_external_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"externalId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.bsa.ai/v1/customers/external/{customer_external_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyRebrands a customer record by changing its
externalId. This is the
only mutable customer attribute.
firstname and displayName move with externalId — the create-time
invariant that firstname mirrors externalId for searchability is
preserved on update. If you depend on either of those fields in your
own systems, expect them to change.
Other customer attributes (mobileNo, emailAddress, names beyond
firstname) cannot be modified through this API. Close the customer and
create a new one if you need a different shape.
Two equivalent forms. Prefer the externalId form — address the
customer by the reference you already store, with no mapping to a numeric
LMS id. See Addressing a customer.
Path parameters
string
required
The customer’s current externalId. On the alternative
/v1/customers/{customer_id} form, the numeric LMS id is in the path
instead.Request body
string
required
The new external identifier. Must be unique across all customers
on the deployment.
Examples
# By current externalId (recommended) — rename ext-ada-001 → ext-ada-002
curl -sf -X PUT "$BASE/v1/customers/external/ext-ada-001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"externalId": "ext-ada-002"}'
# Same effect, by LMS id
curl -sf -X PUT "$BASE/v1/customers/42" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"externalId": "ext-ada-002"}'
Response
200 OK returns the updated customer object.
{
"id": "42",
"accountNo": "000000042",
"externalId": "ext-ada-002",
"status": "Active",
"active": true,
"officeId": "1",
"officeName": "Head Office",
"firstname": "ext-ada-002",
"lastname": "Customer",
"displayName": "ext-ada-002 Customer",
"activationDate": "2026-05-25"
}
Errors
| Code | When |
|---|---|
invalid_argument | externalId missing or empty |
not_found | No customer with that externalId or id |
aborted | A different customer already has the requested externalId |

