> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dncscrub.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Legal Entity

> Update an existing legal entity for your account

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

<ParamField header="loginId" type="string" required>
  Your API Key (LoginId from your DNCScrub account)
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Must be `application/json`
</ParamField>

### Request Body

<ParamField body="LegalEntityId" type="integer" required>
  The unique identifier of the legal entity to update
</ParamField>

<ParamField body="LegalName" type="string" required>
  The registered legal name of the business entity
</ParamField>

<ParamField body="IsDefault" type="boolean">
  Set to `true` to make this the default legal entity for the account
</ParamField>

<ParamField body="EIN" type="string">
  Employer Identification Number (EIN), digits without a dash (e.g., "987654321")
</ParamField>

<ParamField body="StreetAddress" type="string">
  Street address of the legal entity
</ParamField>

<ParamField body="City" type="string">
  City of the legal entity's address
</ParamField>

<ParamField body="State" type="string">
  State or province code (e.g., "NY", "CA")
</ParamField>

<ParamField body="Zip" type="string">
  ZIP or postal code
</ParamField>

<ParamField body="CountryCode" type="string">
  Two-letter country code (e.g., "US")
</ParamField>

<ParamField body="IndustryId" type="string">
  Industry identifier code. See the table below for valid values.
</ParamField>

| 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                    |

<ParamField body="PrimaryPhoneNumber" type="string">
  Primary contact phone number for the legal entity
</ParamField>

<ParamField body="PrimaryContactName" type="string">
  Name of the primary contact person
</ParamField>

<ParamField body="PrimaryContactEmail" type="string">
  Email address of the primary contact
</ParamField>

<ParamField body="PrimaryContactPhoneNumber" type="string">
  Phone number of the primary contact person
</ParamField>

<ParamField body="EmployeeCount" type="integer">
  Number of employees at the company
</ParamField>

<ParamField body="CallsPerMonth" type="integer">
  Estimated number of outbound calls per month
</ParamField>

<ParamField body="DunsNumber" type="string">
  Dun & Bradstreet DUNS number
</ParamField>

<ParamField body="Url" type="string" required>
  Company website URL
</ParamField>

<ParamField body="Dba" type="string">
  "Doing Business As" name, if different from legal name
</ParamField>

<ParamField body="LicenceNumber" type="string">
  Business license number
</ParamField>

<ParamField body="CallPurposeDescription" type="string">
  Description of the purpose of outbound calls
</ParamField>

<ParamField body="PotentialNegativeReaction" type="string">
  Description of potential negative reaction
</ParamField>

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  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"
    }'
  ```

  ```javascript JavaScript theme={null}
  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);
  ```

  ```csharp C# theme={null}
  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);
  }
  ```
</CodeGroup>

<ResponseExample>
  ```json Response theme={null}
  {
    "LegalEntityId": 68257,
    "AcctId": "YOUR_ACCOUNT_ID"
  }
  ```
</ResponseExample>

## Response Fields

<ResponseField name="LegalEntityId" type="integer">
  The unique identifier of the updated legal entity
</ResponseField>

<ResponseField name="AcctId" type="string">
  The account ID the legal entity belongs to
</ResponseField>

## 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                                                  |

<Tip>
  Use the [Get All Legal Entities](/api-reference/trustcall/get-all-legal-entities) endpoint to retrieve the `LegalEntityId` values for your account's legal entities.
</Tip>
