
## Company fields

`GET /v1/companies/fields`

Returns the full list of available fields, including custom ones (`ufCrm_*`).

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/companies/fields" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/companies/fields" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/companies/fields', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/companies/fields', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success, data } = await res.json()
```

## Response fields

| Field | Type | RO | Description |
|------|-----|:--:|---------|
| `id` | number | yes | Company ID |
| `title` | string | | Name |
| `typeId` | string | | Company type: `CUSTOMER`, `SUPPLIER`, `COMPETITOR`. Values list: `GET /v1/statuses?filter[entityId]=COMPANY_TYPE` |
| `industry` | string | | Industry. List: `GET /v1/statuses?filter[entityId]=INDUSTRY` |
| `revenue` | number | | Annual revenue |
| `currencyId` | string | | Currency. List: `GET /v1/currencies` |
| `phone` | multifield | | Phone. On input (POST/PATCH) accepts `string \| string[] \| object[]`. On output `phone` is a string with the primary value, per-type values are in `phoneWork`/`phoneMobile`, and the full list with types is in the `fm[]` array (format `{ id, typeId, valueType, value }`). ⚠ PATCH **only adds** new records — existing `phone` entries are not removed. See [Update company](/docs/entities/companies/update). ⚠ The UPPER form `[{ "VALUE": "...", "VALUE_TYPE": "WORK" }]` is **not accepted** — it returns `400 INVALID_MULTIFIELD_SHAPE`. Use camelCase: `[{ "value": "...", "typeId": "WORK" }]`. |
| `email` | multifield | | Email. On input accepts `string \| string[] \| object[]`. On output `email` is a string with the primary value, per-type values are in `emailWork`/`emailHome`/`emailMailing`, and the full list is in the `fm[]` array. ⚠ PATCH **only adds** new records — existing `email` entries are not removed. ⚠ The UPPER form `[{ "VALUE": "...", "VALUE_TYPE": "WORK" }]` is **not accepted** — it returns `400 INVALID_MULTIFIELD_SHAPE`. Use camelCase: `[{ "value": "...", "typeId": "WORK" }]`. |
| `web` | multifield | | Website. On input accepts `string \| string[] \| object[]`. On output `web` is a string with the primary value, per-type values are in `webWork`, and the full list is in the `fm[]` array. ⚠ PATCH **only adds** new records — existing `web` entries are not removed. ⚠ The UPPER form `[{ "VALUE": "...", "VALUE_TYPE": "WORK" }]` is **not accepted** — it returns `400 INVALID_MULTIFIELD_SHAPE`. Use camelCase: `[{ "value": "...", "typeId": "WORK" }]`. |
| `hasPhone` | boolean | yes | Whether a phone is set |
| `hasEmail` | boolean | yes | Whether an email is set |
| `hasImol` | boolean | yes | Whether there is an Open Channel contact |
| `comments` | string | | Comment |
| `sourceId` | string | | Source. List: `GET /v1/statuses?filter[entityId]=SOURCE` |
| `sourceDescription` | string | | Source description |
| `assignedById` | number | | Responsible person. List: `GET /v1/users` |
| `createdBy` | number | yes | Creator. Lookup: `GET /v1/users` |
| `updatedBy` | number | yes | Who modified it. Lookup: `GET /v1/users` |
| `createdTime` | datetime | yes | Creation date |
| `updatedTime` | datetime | yes | Modification date |
| `opened` | boolean | | Available to everyone |
| `leadId` | number | | ID of the source lead |

**Custom fields** (`ufCrm_*`) are also returned and accepted.



## Available includes

The `GET /v1/companies/fields` endpoint returns the list of available includes: `requisite`.

Usage example: [Get company](/docs/entities/companies/get#related-data).

More about includes: [Related data](/docs/includes).


## Response example

```json
{
  "success": true,
  "data": {
    "fields": {
      "id": { "type": "number", "readonly": true, "label": "ID", "description": "Company identifier." },
      "title": { "type": "string", "readonly": false, "label": "Name", "description": "Company name." },
      "assignedById": { "type": "number", "readonly": false, "label": "Responsible person", "description": "User responsible for the company." }
    },
    "batch": ["create", "update", "delete"]
  }
}
```

3 of many fields are shown. The full list is in the table above. Besides `type` and `readonly`, each field carries `label` (a human-readable name) and `description` (a short description), returned in English.

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 403 | `SCOPE_DENIED` | The API key does not have the `crm` scope |
| 401 | `TOKEN_MISSING` | The API key has no configured tokens |

Full list of common API errors — [Errors](/docs/errors).

## See also

- [Create company](/docs/entities/companies/create) — which fields to pass
- [Custom fields](/docs/userfields) — `ufCrm_*`
- [Entity API](/docs/entity-api) — select for fetching the fields you need
- [Limits and optimization](/docs/optimization) — rate limits
