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

# How to Find Your Company ID

> Find the numeric ID DualEntry assigns to each company, in the Companies list, the API, the CLI, or Accounting Intelligence, and know which format to use.

Every company (legal entity) in DualEntry has a numeric company ID, such as `1204`. You need it when an integration, an API request, a CLI command, or an import asks for a `company_id`. This guide shows where to find the ID and how to convert the displayed form into the value those tools expect.

## Prerequisites

You need a DualEntry role that can view companies to open the Companies list. The list, the API, and the CLI show only the companies your role can access, so on an organization with restricted company access you may see a subset of entities.

To look up an ID from the API or CLI instead, you also need an API key. See [How to authenticate your requests](/developers/guides/api/api-keys/how-to-authenticate-your-requests) if you don't have one yet.

## Find a company ID in the Companies list

The Companies list in **Configuration → Company → Companies** shows every company's ID in the **Company #** column. That column formats the ID with a `CO-` prefix and pads it to six digits, so the value you send to other tools is the number without the prefix or leading zeros.

1. Navigate to **Configuration → Company → Companies**.
2. Find the company's row. In a multi-entity organization, check the **Parent Company** and **Country** columns to confirm you have the right entity, since related companies often have similar names.
3. Read the **Company #** column, for example `CO-001204`.
4. Drop the `CO-` prefix and the leading zeros to get the company ID: `CO-001204` is company ID `1204`.

You can also read the plain ID without converting it:

* **Company name tooltip:** Hover over the company name. The tooltip reads `Company ID: 1204`.
* **Company page URL:** Open the company. The ID is the last segment of the page URL, as in `app.dualentry.com/home/company/companies/1204`.

Use the plain number (`1204`) anywhere a `company_id` is requested. The `CO-001204` form is for display only; the API expects an integer and rejects the prefixed value.

## Look up a company ID from the API, CLI, or Accounting Intelligence

If you are already working outside the app, look the ID up where you are instead of switching to the Companies list. All three methods return the same numeric `id`.

**Public API.** Call `GET /public/v2/companies/` with the `search` parameter set to part of the company name. The request below returns matching companies; the `id` field on each item is the company ID.

```bash theme={null}
curl -s "https://api.dualentry.com/public/v2/companies/?search=Acme" \
  -H "X-API-KEY: YOUR_API_KEY"
```

Each item in `items` includes `id`, `name`, and `parent_company_id`. The response also includes a `code` field, which is a separate company code and not the company ID. See the [List companies reference](/developers/api/resources-v2/companies/list-companies) for every field and filter.

**DualEntry CLI.** Run `companies list` with `--search`. JSON output shows the `id` field for each match.

```bash theme={null}
dualentry companies list --search "Acme" --format json
```

**Accounting Intelligence or an MCP client.** Ask "What is the company ID for Acme Holdings?" in [Accounting Intelligence](../ai-automation/accounting-intelligence/ai-accounting-intelligence). It answers with the numeric ID and usually links to the Companies list. From an MCP client such as Claude, the same question calls the `list_companies` tool.

## Troubleshooting

These are the common reasons a company ID lookup fails or returns the wrong entity.

* **Company missing from the list:** Your role does not have access to that company. Ask an administrator to add it to your company access; see [User Roles and Permissions](./user-roles-and-permissions#entity-scoping).
* **Validation error on `company_id`:** You sent the displayed `CO-001204` form or a string. Send the integer `1204`.
* **Access error with a valid ID:** The API key or user does not have access to that company. Use a key whose role covers the company.
* **Record posted to the wrong entity:** Two companies have similar names. Confirm the parent company and country in the Companies list before you copy the ID.

## Result

After these steps, you have the numeric company ID to paste into an API request, a CLI `--company` filter, an import file, or an integration's company mapping. To set up or restructure the companies themselves, see [How to Configure Multi-Entity and Consolidation](./multi-entity-consolidation).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.