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

# Choosing a NAICS industry

> Classify a company on create with the precise industry label, how it relates to the deprecated naicsCode, and the validation rules.

The create-company endpoint classifies a company by NAICS. There are two fields for it: the precise **`industry`** label (recommended) and the legacy **`naicsCode`** (deprecated). Each `industry` value maps to a single classification, so it's the precise way to set what a company is filed as.

<Warning>
  **`naicsCode` is deprecated.** It keeps working through **2026-09-21** (a 90-day window) so existing integrations are unaffected, then it will be removed. Migrate to `industry` before then.
</Warning>

## Source the value from the reference list

Read the catalogue with [List NAICS codes](/api/api-reference/reference-data/list-naics-codes) and use the `industry` field of the entry you want. Treat it as the source of truth rather than hard-coding labels.

```json theme={null}
{
  "payload": [
    { "naicsCodeId": "3Abc…", "naicsCode": "524113", "industry": "Life insurance" }
  ],
  "error": null
}
```

Send the chosen `industry` verbatim on create:

```json theme={null}
{
  "doolaCustomerId": "<KSUID>",
  "state": "WY",
  "industry": "Life insurance",
  "description": "…",
  "responsibleParty": { },
  "members": [ ]
}
```

## Precedence

When both fields are present, doola classifies from `industry` and ignores `naicsCode` (it isn't validated). This makes migration painless: you can keep sending your existing `naicsCode` alongside an `industry` during the switch. If you send an `industry`, it must be a valid one — doola uses it as the classification and does not substitute `naicsCode`.

| `industry` | `naicsCode`               | Result                                                  |
| ---------- | ------------------------- | ------------------------------------------------------- |
| valid      | absent, valid, or invalid | **201** — classified by `industry`; `naicsCode` ignored |
| absent     | valid                     | **201** — classified by `naicsCode` (deprecated path)   |
| absent     | invalid                   | **400** — `naicsCode` → `E_NAICS_INVALID`               |
| invalid    | anything                  | **400** — `industry` → `E_INDUSTRY_INVALID`             |
| absent     | absent                    | **400** — `industry` → `E_INDUSTRY_INVALID`             |

<Note>
  "valid" means the value exists in [List NAICS codes](/api/api-reference/reference-data/list-naics-codes) — an `industry` matching an entry's `industry`, or a `naicsCode` matching an entry's `naicsCode`. Blank strings count as absent.
</Note>

## The response echoes both

A successful create returns both the resolved `naicsCode` and `industry`, so you can confirm the classification that was persisted.

```json theme={null}
{
  "payload": {
    "doolaCompanyId": "3Xyz…",
    "naicsCode": "524113",
    "industry": "Life insurance",
    "entityType": "LLC"
  },
  "error": null
}
```

## Validation errors

These are field-level entries inside the standard [validation envelope](/api/errors): the top-level `error.code` is `E_VALIDATION_FAILED`, and the detail is under `error.fields`. Branch on `error.fields.<field>.code`.

| Field       | Code                 | When                                                                 | Message                |
| ----------- | -------------------- | -------------------------------------------------------------------- | ---------------------- |
| `industry`  | `E_INDUSTRY_INVALID` | `industry` is present but not in the reference list                  | `invalid industry`     |
| `industry`  | `E_INDUSTRY_INVALID` | neither `industry` nor `naicsCode` was sent                          | `industry is required` |
| `naicsCode` | `E_NAICS_INVALID`    | `naicsCode` is sent without `industry` and not in the reference list | `invalid naics code`   |

```json theme={null}
{
  "payload": null,
  "error": {
    "code": "E_VALIDATION_FAILED",
    "message": "one or more fields are invalid",
    "requestId": "3D2mMaLHsT60sI5qyeHuBlS9TEM",
    "fields": {
      "industry": { "code": "E_INDUSTRY_INVALID", "message": "invalid industry" }
    }
  }
}
```

## Migrating off `naicsCode`

1. Call [List NAICS codes](/api/api-reference/reference-data/list-naics-codes) and map each `naicsCode` you send to the `industry` of the entry you want.
2. Switch the create payload from `naicsCode` to `industry`. Nothing else changes.
3. Drop `naicsCode` from the payload before **2026-09-21**.
