Update Legal Entity
curl --request PUT \
--url https://dataapi.dncscrub.com/v1.5/legalentity/Update \
--header 'Content-Type: <content-type>' \
--header 'loginId: <loginid>' \
--data '
{
"LegalEntityId": 123,
"LegalName": "<string>",
"IsDefault": true,
"EIN": "<string>",
"StreetAddress": "<string>",
"City": "<string>",
"State": "<string>",
"Zip": "<string>",
"CountryCode": "<string>",
"IndustryId": "<string>",
"PrimaryPhoneNumber": "<string>",
"PrimaryContactName": "<string>",
"PrimaryContactEmail": "<string>",
"PrimaryContactPhoneNumber": "<string>",
"EmployeeCount": 123,
"CallsPerMonth": 123,
"DunsNumber": "<string>",
"Url": "<string>",
"Dba": "<string>",
"LicenceNumber": "<string>",
"CallPurposeDescription": "<string>",
"PotentialNegativeReaction": "<string>"
}
'import requests
url = "https://dataapi.dncscrub.com/v1.5/legalentity/Update"
payload = {
"LegalEntityId": 123,
"LegalName": "<string>",
"IsDefault": True,
"EIN": "<string>",
"StreetAddress": "<string>",
"City": "<string>",
"State": "<string>",
"Zip": "<string>",
"CountryCode": "<string>",
"IndustryId": "<string>",
"PrimaryPhoneNumber": "<string>",
"PrimaryContactName": "<string>",
"PrimaryContactEmail": "<string>",
"PrimaryContactPhoneNumber": "<string>",
"EmployeeCount": 123,
"CallsPerMonth": 123,
"DunsNumber": "<string>",
"Url": "<string>",
"Dba": "<string>",
"LicenceNumber": "<string>",
"CallPurposeDescription": "<string>",
"PotentialNegativeReaction": "<string>"
}
headers = {
"loginId": "<loginid>",
"Content-Type": "<content-type>"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {loginId: '<loginid>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
LegalEntityId: 123,
LegalName: '<string>',
IsDefault: true,
EIN: '<string>',
StreetAddress: '<string>',
City: '<string>',
State: '<string>',
Zip: '<string>',
CountryCode: '<string>',
IndustryId: '<string>',
PrimaryPhoneNumber: '<string>',
PrimaryContactName: '<string>',
PrimaryContactEmail: '<string>',
PrimaryContactPhoneNumber: '<string>',
EmployeeCount: 123,
CallsPerMonth: 123,
DunsNumber: '<string>',
Url: '<string>',
Dba: '<string>',
LicenceNumber: '<string>',
CallPurposeDescription: '<string>',
PotentialNegativeReaction: '<string>'
})
};
fetch('https://dataapi.dncscrub.com/v1.5/legalentity/Update', 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://dataapi.dncscrub.com/v1.5/legalentity/Update",
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([
'LegalEntityId' => 123,
'LegalName' => '<string>',
'IsDefault' => true,
'EIN' => '<string>',
'StreetAddress' => '<string>',
'City' => '<string>',
'State' => '<string>',
'Zip' => '<string>',
'CountryCode' => '<string>',
'IndustryId' => '<string>',
'PrimaryPhoneNumber' => '<string>',
'PrimaryContactName' => '<string>',
'PrimaryContactEmail' => '<string>',
'PrimaryContactPhoneNumber' => '<string>',
'EmployeeCount' => 123,
'CallsPerMonth' => 123,
'DunsNumber' => '<string>',
'Url' => '<string>',
'Dba' => '<string>',
'LicenceNumber' => '<string>',
'CallPurposeDescription' => '<string>',
'PotentialNegativeReaction' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"loginId: <loginid>"
],
]);
$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://dataapi.dncscrub.com/v1.5/legalentity/Update"
payload := strings.NewReader("{\n \"LegalEntityId\": 123,\n \"LegalName\": \"<string>\",\n \"IsDefault\": true,\n \"EIN\": \"<string>\",\n \"StreetAddress\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"Zip\": \"<string>\",\n \"CountryCode\": \"<string>\",\n \"IndustryId\": \"<string>\",\n \"PrimaryPhoneNumber\": \"<string>\",\n \"PrimaryContactName\": \"<string>\",\n \"PrimaryContactEmail\": \"<string>\",\n \"PrimaryContactPhoneNumber\": \"<string>\",\n \"EmployeeCount\": 123,\n \"CallsPerMonth\": 123,\n \"DunsNumber\": \"<string>\",\n \"Url\": \"<string>\",\n \"Dba\": \"<string>\",\n \"LicenceNumber\": \"<string>\",\n \"CallPurposeDescription\": \"<string>\",\n \"PotentialNegativeReaction\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("loginId", "<loginid>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://dataapi.dncscrub.com/v1.5/legalentity/Update")
.header("loginId", "<loginid>")
.header("Content-Type", "<content-type>")
.body("{\n \"LegalEntityId\": 123,\n \"LegalName\": \"<string>\",\n \"IsDefault\": true,\n \"EIN\": \"<string>\",\n \"StreetAddress\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"Zip\": \"<string>\",\n \"CountryCode\": \"<string>\",\n \"IndustryId\": \"<string>\",\n \"PrimaryPhoneNumber\": \"<string>\",\n \"PrimaryContactName\": \"<string>\",\n \"PrimaryContactEmail\": \"<string>\",\n \"PrimaryContactPhoneNumber\": \"<string>\",\n \"EmployeeCount\": 123,\n \"CallsPerMonth\": 123,\n \"DunsNumber\": \"<string>\",\n \"Url\": \"<string>\",\n \"Dba\": \"<string>\",\n \"LicenceNumber\": \"<string>\",\n \"CallPurposeDescription\": \"<string>\",\n \"PotentialNegativeReaction\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dataapi.dncscrub.com/v1.5/legalentity/Update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["loginId"] = '<loginid>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"LegalEntityId\": 123,\n \"LegalName\": \"<string>\",\n \"IsDefault\": true,\n \"EIN\": \"<string>\",\n \"StreetAddress\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"Zip\": \"<string>\",\n \"CountryCode\": \"<string>\",\n \"IndustryId\": \"<string>\",\n \"PrimaryPhoneNumber\": \"<string>\",\n \"PrimaryContactName\": \"<string>\",\n \"PrimaryContactEmail\": \"<string>\",\n \"PrimaryContactPhoneNumber\": \"<string>\",\n \"EmployeeCount\": 123,\n \"CallsPerMonth\": 123,\n \"DunsNumber\": \"<string>\",\n \"Url\": \"<string>\",\n \"Dba\": \"<string>\",\n \"LicenceNumber\": \"<string>\",\n \"CallPurposeDescription\": \"<string>\",\n \"PotentialNegativeReaction\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"LegalEntityId": 68257,
"AcctId": "YOUR_ACCOUNT_ID"
}
Call Deliverability (TrustCall)
Update Legal Entity
Update an existing legal entity for your account
PUT
/
v1.5
/
legalentity
/
Update
Update Legal Entity
curl --request PUT \
--url https://dataapi.dncscrub.com/v1.5/legalentity/Update \
--header 'Content-Type: <content-type>' \
--header 'loginId: <loginid>' \
--data '
{
"LegalEntityId": 123,
"LegalName": "<string>",
"IsDefault": true,
"EIN": "<string>",
"StreetAddress": "<string>",
"City": "<string>",
"State": "<string>",
"Zip": "<string>",
"CountryCode": "<string>",
"IndustryId": "<string>",
"PrimaryPhoneNumber": "<string>",
"PrimaryContactName": "<string>",
"PrimaryContactEmail": "<string>",
"PrimaryContactPhoneNumber": "<string>",
"EmployeeCount": 123,
"CallsPerMonth": 123,
"DunsNumber": "<string>",
"Url": "<string>",
"Dba": "<string>",
"LicenceNumber": "<string>",
"CallPurposeDescription": "<string>",
"PotentialNegativeReaction": "<string>"
}
'import requests
url = "https://dataapi.dncscrub.com/v1.5/legalentity/Update"
payload = {
"LegalEntityId": 123,
"LegalName": "<string>",
"IsDefault": True,
"EIN": "<string>",
"StreetAddress": "<string>",
"City": "<string>",
"State": "<string>",
"Zip": "<string>",
"CountryCode": "<string>",
"IndustryId": "<string>",
"PrimaryPhoneNumber": "<string>",
"PrimaryContactName": "<string>",
"PrimaryContactEmail": "<string>",
"PrimaryContactPhoneNumber": "<string>",
"EmployeeCount": 123,
"CallsPerMonth": 123,
"DunsNumber": "<string>",
"Url": "<string>",
"Dba": "<string>",
"LicenceNumber": "<string>",
"CallPurposeDescription": "<string>",
"PotentialNegativeReaction": "<string>"
}
headers = {
"loginId": "<loginid>",
"Content-Type": "<content-type>"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {loginId: '<loginid>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
LegalEntityId: 123,
LegalName: '<string>',
IsDefault: true,
EIN: '<string>',
StreetAddress: '<string>',
City: '<string>',
State: '<string>',
Zip: '<string>',
CountryCode: '<string>',
IndustryId: '<string>',
PrimaryPhoneNumber: '<string>',
PrimaryContactName: '<string>',
PrimaryContactEmail: '<string>',
PrimaryContactPhoneNumber: '<string>',
EmployeeCount: 123,
CallsPerMonth: 123,
DunsNumber: '<string>',
Url: '<string>',
Dba: '<string>',
LicenceNumber: '<string>',
CallPurposeDescription: '<string>',
PotentialNegativeReaction: '<string>'
})
};
fetch('https://dataapi.dncscrub.com/v1.5/legalentity/Update', 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://dataapi.dncscrub.com/v1.5/legalentity/Update",
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([
'LegalEntityId' => 123,
'LegalName' => '<string>',
'IsDefault' => true,
'EIN' => '<string>',
'StreetAddress' => '<string>',
'City' => '<string>',
'State' => '<string>',
'Zip' => '<string>',
'CountryCode' => '<string>',
'IndustryId' => '<string>',
'PrimaryPhoneNumber' => '<string>',
'PrimaryContactName' => '<string>',
'PrimaryContactEmail' => '<string>',
'PrimaryContactPhoneNumber' => '<string>',
'EmployeeCount' => 123,
'CallsPerMonth' => 123,
'DunsNumber' => '<string>',
'Url' => '<string>',
'Dba' => '<string>',
'LicenceNumber' => '<string>',
'CallPurposeDescription' => '<string>',
'PotentialNegativeReaction' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"loginId: <loginid>"
],
]);
$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://dataapi.dncscrub.com/v1.5/legalentity/Update"
payload := strings.NewReader("{\n \"LegalEntityId\": 123,\n \"LegalName\": \"<string>\",\n \"IsDefault\": true,\n \"EIN\": \"<string>\",\n \"StreetAddress\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"Zip\": \"<string>\",\n \"CountryCode\": \"<string>\",\n \"IndustryId\": \"<string>\",\n \"PrimaryPhoneNumber\": \"<string>\",\n \"PrimaryContactName\": \"<string>\",\n \"PrimaryContactEmail\": \"<string>\",\n \"PrimaryContactPhoneNumber\": \"<string>\",\n \"EmployeeCount\": 123,\n \"CallsPerMonth\": 123,\n \"DunsNumber\": \"<string>\",\n \"Url\": \"<string>\",\n \"Dba\": \"<string>\",\n \"LicenceNumber\": \"<string>\",\n \"CallPurposeDescription\": \"<string>\",\n \"PotentialNegativeReaction\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("loginId", "<loginid>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://dataapi.dncscrub.com/v1.5/legalentity/Update")
.header("loginId", "<loginid>")
.header("Content-Type", "<content-type>")
.body("{\n \"LegalEntityId\": 123,\n \"LegalName\": \"<string>\",\n \"IsDefault\": true,\n \"EIN\": \"<string>\",\n \"StreetAddress\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"Zip\": \"<string>\",\n \"CountryCode\": \"<string>\",\n \"IndustryId\": \"<string>\",\n \"PrimaryPhoneNumber\": \"<string>\",\n \"PrimaryContactName\": \"<string>\",\n \"PrimaryContactEmail\": \"<string>\",\n \"PrimaryContactPhoneNumber\": \"<string>\",\n \"EmployeeCount\": 123,\n \"CallsPerMonth\": 123,\n \"DunsNumber\": \"<string>\",\n \"Url\": \"<string>\",\n \"Dba\": \"<string>\",\n \"LicenceNumber\": \"<string>\",\n \"CallPurposeDescription\": \"<string>\",\n \"PotentialNegativeReaction\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dataapi.dncscrub.com/v1.5/legalentity/Update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["loginId"] = '<loginid>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"LegalEntityId\": 123,\n \"LegalName\": \"<string>\",\n \"IsDefault\": true,\n \"EIN\": \"<string>\",\n \"StreetAddress\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"Zip\": \"<string>\",\n \"CountryCode\": \"<string>\",\n \"IndustryId\": \"<string>\",\n \"PrimaryPhoneNumber\": \"<string>\",\n \"PrimaryContactName\": \"<string>\",\n \"PrimaryContactEmail\": \"<string>\",\n \"PrimaryContactPhoneNumber\": \"<string>\",\n \"EmployeeCount\": 123,\n \"CallsPerMonth\": 123,\n \"DunsNumber\": \"<string>\",\n \"Url\": \"<string>\",\n \"Dba\": \"<string>\",\n \"LicenceNumber\": \"<string>\",\n \"CallPurposeDescription\": \"<string>\",\n \"PotentialNegativeReaction\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"LegalEntityId": 68257,
"AcctId": "YOUR_ACCOUNT_ID"
}
Update an existing legal entity for your account. Use this endpoint to modify legal entity information such as address, contact details, or business information.
Request
Headers
string
required
Your API Key (LoginId from your DNCScrub account)
string
required
Must be
application/jsonRequest Body
integer
required
The unique identifier of the legal entity to update
string
required
The registered legal name of the business entity
boolean
Set to
true to make this the default legal entity for the accountstring
Employer Identification Number (EIN), digits without a dash (e.g., “987654321”)
string
Street address of the legal entity
string
City of the legal entity’s address
string
State or province code (e.g., “NY”, “CA”)
string
ZIP or postal code
string
Two-letter country code (e.g., “US”)
string
Industry identifier code. See the table below for valid values.
| ID | Industry |
|---|---|
| 1 | Education |
| 2 | Transportation |
| 3 | Retail |
| 4 | Delivery/Shipping |
| 5 | Government |
| 6 | Health Care |
| 7 | Financial |
| 8 | Public Service |
| 9 | Real Estate |
| 10 | Legal |
| 11 | Restaurant/Food Services |
| 12 | Automotive |
| 13 | Religious |
| 14 | Veterinary Services |
| 15 | Trade Contractors |
| 16 | Personal Services |
| 17 | Business Services |
| 18 | Hospitality/Entertainment |
| 19 | Insurance |
| 20 | Manufacturing |
| 21 | Other Business |
| 22 | Telecommunications |
| 23 | Technology |
| 24 | Non-Profit |
| 25 | Travel |
| 26 | Utilities |
| 27 | Prison |
string
Primary contact phone number for the legal entity
string
Name of the primary contact person
string
Email address of the primary contact
string
Phone number of the primary contact person
integer
Number of employees at the company
integer
Estimated number of outbound calls per month
string
Dun & Bradstreet DUNS number
string
required
Company website URL
string
“Doing Business As” name, if different from legal name
string
Business license number
string
Description of the purpose of outbound calls
string
Description of potential negative reaction
Example Request
curl --location --request PUT \
'https://dataapi.dncscrub.com/v1.5/legalentity/Update' \
--header 'loginId: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"LegalEntityId": 68257,
"LegalName": "Updated Company LLC",
"IsDefault": true,
"EIN": "987654321",
"StreetAddress": "456 Updated Avenue",
"City": "Dallas",
"State": "TX",
"Zip": "75201",
"CountryCode": "US",
"IndustryId": "22",
"PrimaryContactName": "Jane Smith",
"PrimaryContactEmail": "jane.smith@updatedcompany.com",
"PrimaryContactPhoneNumber": "2145551234",
"PrimaryPhoneNumber": "2145550000",
"CallsPerMonth": 25000,
"EmployeeCount": 1000,
"DunsNumber": "987654321",
"Url": "https://www.updatedcompany.com",
"Dba": "Updated Co",
"LicenceNumber": "LIC-98765",
"CallPurposeDescription": "Sales and marketing outreach",
"PotentialNegativeReaction": "Medium"
}'
const response = await fetch(
'https://dataapi.dncscrub.com/v1.5/legalentity/Update',
{
method: 'PUT',
headers: {
'Content-Type': 'application/json',
'loginId': 'YOUR_API_KEY'
},
body: JSON.stringify({
LegalEntityId: 68257,
LegalName: 'Updated Company LLC',
IsDefault: true,
EIN: '987654321',
StreetAddress: '456 Updated Avenue',
City: 'Dallas',
State: 'TX',
Zip: '75201',
CountryCode: 'US',
IndustryId: '22',
PrimaryContactName: 'Jane Smith',
PrimaryContactEmail: 'jane.smith@updatedcompany.com',
PrimaryContactPhoneNumber: '2145551234',
PrimaryPhoneNumber: '2145550000',
CallsPerMonth: 25000,
EmployeeCount: 1000,
DunsNumber: '987654321',
Url: 'https://www.updatedcompany.com',
Dba: 'Updated Co',
LicenceNumber: 'LIC-98765',
CallPurposeDescription: 'Sales and marketing outreach',
PotentialNegativeReaction: 'Medium'
})
}
);
const data = await response.json();
console.log(data);
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("loginId", "YOUR_API_KEY");
var requestData = new
{
LegalEntityId = 68257,
LegalName = "Updated Company LLC",
IsDefault = true,
EIN = "987654321",
StreetAddress = "456 Updated Avenue",
City = "Dallas",
State = "TX",
Zip = "75201",
CountryCode = "US",
IndustryId = "22",
PrimaryContactName = "Jane Smith",
PrimaryContactEmail = "jane.smith@updatedcompany.com",
PrimaryContactPhoneNumber = "2145551234",
PrimaryPhoneNumber = "2145550000",
CallsPerMonth = 25000,
EmployeeCount = 1000,
DunsNumber = "987654321",
Url = "https://www.updatedcompany.com",
Dba = "Updated Co",
LicenceNumber = "LIC-98765",
CallPurposeDescription = "Sales and marketing outreach",
PotentialNegativeReaction = "Medium"
};
var content = new StringContent(
JsonSerializer.Serialize(requestData),
Encoding.UTF8,
"application/json"
);
var response = await client.PutAsync(
"https://dataapi.dncscrub.com/v1.5/legalentity/Update",
content
);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
{
"LegalEntityId": 68257,
"AcctId": "YOUR_ACCOUNT_ID"
}
Response Fields
integer
The unique identifier of the updated legal entity
string
The account ID the legal entity belongs to
Error Responses
| Status | Description |
|---|---|
| 400 Bad Request | Missing required field (LegalEntityId) or request body is empty |
| 401 Unauthorized | Invalid or missing API key |
| 404 Not Found | Legal entity with the specified LegalEntityId does not exist for your account |
| 500 Internal Server Error | Server error during processing |
Use the Get All Legal Entities endpoint to retrieve the
LegalEntityId values for your account’s legal entities.⌘I