[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fcompanies\u002Fget":3,"docs-tabs-entities\u002Fcompanies\u002Fget":6},{"content":4,"lastmod":5},"\n## Get company\n\n`GET \u002Fv1\u002Fcompanies\u002F:id`\n\nReturns a company by ID. \n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Company ID. List: [`GET \u002Fv1\u002Fcompanies`](\u002Fdocs\u002Fentities\u002Fcompanies\u002Flist) |\n| `include` (query) | string | no | Related data: `contact`. The result is in `data._included.contacts`. See [Related data](#related-data) |\n| `select` (query) | string | no | Comma-separated response fields, for example `id,title`. Without the parameter, all fields are returned. The `id` field is always returned. Names come from [Company fields](\u002Fdocs\u002Fentities\u002Fcompanies\u002Ffields) |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcompanies\u002F1\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcompanies\u002F1\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcompanies\u002F1', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\nconsole.log('Company:', data.title)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcompanies\u002F1', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | `true` when the request succeeds |\n| `data` | object | The company with all fields, including the `ufCrm*` user fields. With the `select` parameter, only the listed fields and `id` are returned. All fields — [Company fields](\u002Fdocs\u002Fentities\u002Fcompanies\u002Ffields) |\n| `data._included` | object | Related data. Returned only with the `include` parameter: `contacts` is an array of linked contacts, each with all contact fields and the binding fields `isPrimary`, `sort` and `roleId`. See [Related data](#related-data) |\n| `meta.warnings` | array | Returned when a name that is absent from the company schema is listed alongside `*` in `select`: the company comes back without that field. Each warning is an object with `code`, `field` and `message`, and the code is `UNKNOWN_SELECT_FIELD`. Without `*`, such a name causes the whole request to be rejected |\n\n## Related data\n\nTo get the linked contacts together with the company, pass the `include` parameter in the GET request:\n\n```\nGET \u002Fv1\u002Fcompanies\u002F1?include=contact&select=id,title\n```\n\nThe available `include` value is `contact`. The result is in `data._included.contacts`. The main contact fields are shown:\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": 1,\n    \"title\": \"Acme Inc.\",\n    \"_included\": {\n      \"contacts\": [\n        { \"id\": 87, \"name\": \"John\", \"lastName\": \"Smith\", \"companyId\": 1, \"isPrimary\": true, \"sort\": 10, \"roleId\": 0 },\n        { \"id\": 17, \"name\": \"Anna\", \"lastName\": \"Brown\", \"companyId\": 1, \"isPrimary\": false, \"sort\": 10, \"roleId\": 0 }\n      ]\n    }\n  }\n}\n```\n\nHow the `include` parameter works — [Related data](\u002Fdocs\u002Fincludes).\n\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": 1,\n    \"title\": \"Acme Inc.\",\n    \"industry\": \"IT\",\n    \"typeId\": \"CUSTOMER\",\n    \"assignedById\": 1,\n    \"phone\": \"+12025550123\",\n    \"phoneWork\": \"+12025550123\",\n    \"email\": \"info@example.com\",\n    \"emailWork\": \"info@example.com\",\n    \"emailHome\": \"home@example.com\",\n    \"hasPhone\": true,\n    \"hasEmail\": true,\n    \"fm\": [\n      { \"id\": 65, \"typeId\": \"PHONE\", \"valueType\": \"WORK\", \"value\": \"+12025550123\" },\n      { \"id\": 67, \"typeId\": \"EMAIL\", \"valueType\": \"WORK\", \"value\": \"info@example.com\" },\n      { \"id\": 69, \"typeId\": \"EMAIL\", \"valueType\": \"HOME\", \"value\": \"home@example.com\" }\n    ],\n    \"createdTime\": \"2020-05-08T10:48:20+00:00\",\n    \"updatedTime\": \"2025-08-22T13:01:31+00:00\"\n  }\n}\n```\n\nPhone and email in the response are strings with the primary value, and per-type values are in the `phoneWork`, `phoneMobile`, `emailWork`, `emailHome` fields. The full list with types is in the `fm[]` array (`{ id, typeId, valueType, value }`, where `id` is the entry identifier). Check presence via `hasPhone`\u002F`hasEmail`: when there is no phone, `phone` comes back as an empty string. A specific `fm[]` entry cannot be modified or removed by its `id` through the API — PATCH adds new entries.\n\n## Error response example\n\n404 — company not found:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"Item not found\"\n  }\n}\n```\n\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 404 | `ENTITY_NOT_FOUND` | Company not found |\n| 400 | `UNKNOWN_SELECT_FIELD` | `select` lists an unknown field. The message lists the valid names |\n| 400 | `INVALID_INCLUDE` | `include` names a value the company does not have. The message names the valid one — `contact` |\n| 403 | `ACCESS_DENIED` | No access |\n| 403 | `SCOPE_DENIED` | The API key does not have the `crm` scope |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Working with files in CRM fields](\u002Fdocs\u002Frecipes\u002Fcrm-files)\n- [Update company](\u002Fdocs\u002Fentities\u002Fcompanies\u002Fupdate)\n- [Company fields](\u002Fdocs\u002Fentities\u002Fcompanies\u002Ffields)\n- [Contacts](\u002Fdocs\u002Fentities\u002Fcontacts)\n- [Limits and optimization](\u002Fdocs\u002Foptimization)\n","2026-10-22",{},1794739344780]