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

# Get All Legal Entities

> Retrieve all legal entities associated with an account

Retrieve all legal entities associated with your account. Legal entities represent the business identities under which your phone numbers are registered.

## Request

### Headers

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

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl --location --request GET \
    'https://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities' \
    --header 'loginId: YOUR_API_KEY'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities',
    {
      method: 'GET',
      headers: { 'loginId': 'YOUR_API_KEY' }
    }
  );

  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 response = await client.GetAsync(
          "https://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities"
      );

      var result = await response.Content.ReadAsStringAsync();
      Console.WriteLine(result);
  }
  ```
</CodeGroup>

<ResponseExample>
  ```json Response theme={null}
  [
    {
      "LegalEntityId": 123,
      "AcctId": "YOUR_ACCOUNT_ID",
      "IsDefault": true,
      "LegalName": "Acme Corporation",
      "Ein": "***6789",
      "PrimaryPhoneNumber": "5551234567",
      "StreetAddress": "123 Main Street",
      "City": "New York",
      "State": "NY",
      "Zip": "10001",
      "CountryCode": "US"
    },
    {
      "LegalEntityId": 456,
      "AcctId": "YOUR_ACCOUNT_ID",
      "IsDefault": false,
      "LegalName": "Acme Subsidiary LLC",
      "Ein": "***4321",
      "PrimaryPhoneNumber": "5559876543",
      "StreetAddress": "456 Oak Avenue",
      "City": "Los Angeles",
      "State": "CA",
      "Zip": "90001",
      "CountryCode": "US"
    }
  ]
  ```
</ResponseExample>

## Response Fields

<ResponseField name="LegalEntityId" type="integer">
  Unique identifier for the legal entity
</ResponseField>

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

<ResponseField name="IsDefault" type="boolean">
  Whether this is the default legal entity for the account
</ResponseField>

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

<ResponseField name="Ein" type="string">
  Masked Employer Identification Number (EIN) showing only the last 4 digits (e.g., `***6789`)
</ResponseField>

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

<ResponseField name="StreetAddress" type="string">
  Street address of the legal entity
</ResponseField>

<ResponseField name="City" type="string">
  City of the legal entity's address
</ResponseField>

<ResponseField name="State" type="string">
  State or province code
</ResponseField>

<ResponseField name="Zip" type="string">
  ZIP or postal code
</ResponseField>

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

## Error Responses

| Status           | Description                |
| ---------------- | -------------------------- |
| 401 Unauthorized | Invalid or missing API key |
