Create Legal Entity
curl --request POST \
--url https://dataapi.dncscrub.com/v1.5/legalentity/Create \
--header 'Content-Type: <content-type>' \
--header 'loginId: <loginid>' \
--data '
{
"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/Create"
payload = {
"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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {loginId: '<loginid>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
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/Create', 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/Create",
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([
'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/Create"
payload := strings.NewReader("{\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("POST", 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.post("https://dataapi.dncscrub.com/v1.5/legalentity/Create")
.header("loginId", "<loginid>")
.header("Content-Type", "<content-type>")
.body("{\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/Create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["loginId"] = '<loginid>'
request["Content-Type"] = '<content-type>'
request.body = "{\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)
Create Legal Entity
Create a new legal entity for your account
POST
/
v1.5
/
legalentity
/
Create
Create Legal Entity
curl --request POST \
--url https://dataapi.dncscrub.com/v1.5/legalentity/Create \
--header 'Content-Type: <content-type>' \
--header 'loginId: <loginid>' \
--data '
{
"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/Create"
payload = {
"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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {loginId: '<loginid>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
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/Create', 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/Create",
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([
'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/Create"
payload := strings.NewReader("{\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("POST", 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.post("https://dataapi.dncscrub.com/v1.5/legalentity/Create")
.header("loginId", "<loginid>")
.header("Content-Type", "<content-type>")
.body("{\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/Create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["loginId"] = '<loginid>'
request["Content-Type"] = '<content-type>'
request.body = "{\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"
}
Create a new legal entity for your account. Legal entities represent the business identities under which your phone numbers are registered and are used for carrier registration and compliance purposes.
Request
Headers
Request Body
| 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 |
Example Request
curl --location --request POST \
'https://dataapi.dncscrub.com/v1.5/legalentity/Create' \
--header 'loginId: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"IsDefault": false,
"LegalName": "Test New Company LLC",
"EIN": "123456789",
"StreetAddress": "123 Main Street",
"City": "Austin",
"State": "TX",
"Zip": "78701",
"CountryCode": "US",
"IndustryId": "7",
"PrimaryContactName": "John Doe",
"PrimaryContactEmail": "john.doe@testcompany.com",
"PrimaryContactPhoneNumber": "5125551234",
"PrimaryPhoneNumber": "5125550000",
"CallsPerMonth": 10000,
"EmployeeCount": 50,
"DunsNumber": "123456789",
"Url": "https://www.testcompany.com",
"Dba": "Test Co",
"LicenceNumber": "LIC-12345",
"CallPurposeDescription": "Customer service follow-up calls",
"PotentialNegativeReaction": "Low"
}'
const response = await fetch(
'https://dataapi.dncscrub.com/v1.5/legalentity/Create',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'loginId': 'YOUR_API_KEY'
},
body: JSON.stringify({
LegalName: 'Test New Company LLC',
IsDefault: false,
EIN: '123456789',
StreetAddress: '123 Main Street',
City: 'Austin',
State: 'TX',
Zip: '78701',
CountryCode: 'US',
IndustryId: '7',
PrimaryPhoneNumber: '5125550000',
PrimaryContactName: 'John Doe',
PrimaryContactEmail: 'john.doe@testcompany.com',
PrimaryContactPhoneNumber: '5125551234',
EmployeeCount: 50,
CallsPerMonth: 10000,
DunsNumber: '123456789',
Url: 'https://www.testcompany.com',
Dba: 'Test Co',
LicenceNumber: 'LIC-12345',
CallPurposeDescription: 'Customer service follow-up calls',
PotentialNegativeReaction: 'Low'
})
}
);
const data = await response.json();
console.log(data);
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("loginId", "YOUR_API_KEY");
var requestData = new
{
LegalName = "Test New Company LLC",
IsDefault = false,
EIN = "123456789",
StreetAddress = "123 Main Street",
City = "Austin",
State = "TX",
Zip = "78701",
CountryCode = "US",
IndustryId = "7",
PrimaryPhoneNumber = "5125550000",
PrimaryContactName = "John Doe",
PrimaryContactEmail = "john.doe@testcompany.com",
PrimaryContactPhoneNumber = "5125551234",
EmployeeCount = 50,
CallsPerMonth = 10000,
DunsNumber = "123456789",
Url = "https://www.testcompany.com",
Dba = "Test Co",
LicenceNumber = "LIC-12345",
CallPurposeDescription = "Customer service follow-up calls",
PotentialNegativeReaction = "Low"
};
var content = new StringContent(
JsonSerializer.Serialize(requestData),
Encoding.UTF8,
"application/json"
);
var response = await client.PostAsync(
"https://dataapi.dncscrub.com/v1.5/legalentity/Create",
content
);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
{
"LegalEntityId": 68257,
"AcctId": "YOUR_ACCOUNT_ID"
}
Response Fields
Error Responses
| Status | Description |
|---|---|
| 400 Bad Request | Missing required fields (e.g., LegalName) or request body is empty |
| 401 Unauthorized | Invalid or missing API key |
| 409 Conflict | A legal entity with the same LegalName already exists |
| 500 Internal Server Error | Server error during processing |