[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-chats\u002Fmessages\u002Flinks":3,"docs-tabs-chats\u002Fmessages\u002Flinks":6},{"content":4,"lastmod":5},"## List a chat's links\n\n`GET \u002Fv1\u002Fchats\u002F:chatId\u002Flinks`\n\nReturns a page of the links sent in the chat's messages: the same list as on the Links tab of the chat's side panel. The newest links come first.\n\n## Parameters\n\n| Parameter | Type | Required | Default | Description |\n|----------|-----|:-----:|-----------|---------|\n| `chatId` (path) | number | yes | — | Chat ID. Get it from [`GET \u002Fv1\u002Fchats\u002Frecent`](\u002Fdocs\u002Fchats\u002Fdiscovery\u002Frecent) |\n| `limit` (query) | number | no | 50 | How many links to return, from 1 to 200. An out-of-range value is clamped to the nearest bound, and the response then carries `meta.requestedLimit` and `meta.appliedLimit` |\n| `offset` (query) | number | no | 0 | How many links to skip from the start of the list, a non-negative integer. For the next page, pass the number of links already received |\n| `searchQuery` (query) | string | no | — | Returns only links whose address contains this text. A non-empty string of at most 255 characters |\n\nOther query parameters and repeated ones are rejected with `400 INVALID_PARAMS`.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002F1001\u002Flinks?limit=50\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002F1001\u002Flinks?limit=50\" \\\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\u002Fchats\u002F1001\u002Flinks?limit=50', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { data } = await res.json()\nconsole.log('Links:', data.list.map((link) => link.url.source))\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002F1001\u002Flinks?limit=50', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { data } = await res.json()\nconsole.log('Links:', data.list.map((link) => link.url.source))\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data.list` | array | The links on this page |\n| `data.list[].id` | number | Link ID. Needed to [remove it from the list](\u002Fdocs\u002Fchats\u002Fmessages\u002Flinks-delete) |\n| `data.list[].messageId` | number | ID of the message that carries the link |\n| `data.list[].chatId` | number | Chat ID |\n| `data.list[].authorId` | number | ID of the message sender; the profile is in `data.users` |\n| `data.list[].dateCreate` | string | When it was sent (ISO 8601) |\n| `data.list[].url.source` | string | The link address as written in the message |\n| `data.list[].url.richData` | object | Link preview data: `id`, `type`, `name`, `description`, `previewUrl`, `link`. For a link without a preview all fields are `null` |\n| `data.users` | array | Message senders. Fields are those of a member in the [chat member list](\u002Fdocs\u002Fchats\u002Fmembers\u002Flist): `id`, `name`, `firstName`, `lastName`, `active`, `type` and others |\n| `data.tariffRestrictions.isHistoryLimitExceeded` | boolean | `true` when the plan hides part of the older chat history, and its links are not returned |\n| `meta.requestedLimit` | number | The `limit` passed. Only when it is outside the 1–200 range |\n| `meta.appliedLimit` | number | The `limit` applied after clamping. Only together with `meta.requestedLimit` |\n\n## Response example\n\nThe employee profile is trimmed to the main fields:\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"users\": [\n      {\n        \"id\": 6,\n        \"active\": true,\n        \"name\": \"Anna Smith\",\n        \"firstName\": \"Anna\",\n        \"lastName\": \"Smith\",\n        \"workPosition\": \"\",\n        \"bot\": false,\n        \"extranet\": false,\n        \"status\": \"online\",\n        \"type\": \"user\"\n      }\n    ],\n    \"tariffRestrictions\": {\n      \"isHistoryLimitExceeded\": false\n    },\n    \"list\": [\n      {\n        \"id\": 12,\n        \"messageId\": 34213,\n        \"chatId\": 1001,\n        \"authorId\": 6,\n        \"dateCreate\": \"2026-03-03T11:44:09+00:00\",\n        \"url\": {\n          \"source\": \"https:\u002F\u002Fexample.com\u002Fpage\",\n          \"richData\": {\n            \"id\": null,\n            \"type\": null,\n            \"name\": null,\n            \"description\": null,\n            \"previewUrl\": null,\n            \"link\": null\n          }\n        }\n      },\n      {\n        \"id\": 11,\n        \"messageId\": 34211,\n        \"chatId\": 1001,\n        \"authorId\": 6,\n        \"dateCreate\": \"2026-03-03T11:43:35+00:00\",\n        \"url\": {\n          \"source\": \"https:\u002F\u002Fexample.com\u002Fnotes\",\n          \"richData\": {\n            \"id\": null,\n            \"type\": null,\n            \"name\": null,\n            \"description\": null,\n            \"previewUrl\": null,\n            \"link\": null\n          }\n        }\n      }\n    ]\n  }\n}\n```\n\nWith `limit=500` the response also carries `\"meta\": { \"requestedLimit\": 500, \"appliedLimit\": 200 }`.\n\n## Error response example\n\n400 — a parameter the method does not accept was passed:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_PARAMS\",\n    \"message\": \"Query parameter `lastId` is not accepted by GET \u002Fv1\u002Fchats\u002F:chatId\u002Flinks. Accepted: limit, offset, searchQuery.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_CHAT_ID` | `chatId` is not a positive integer. Checked before any call to Bitrix24 |\n| 400 | `INVALID_PARAMS` | `limit` is not an integer, `offset` is not a non-negative integer, `searchQuery` is empty or longer than 255 characters, a parameter is repeated, or a parameter is unknown — the message names it and lists the accepted ones. Checked before any call to Bitrix24 |\n| 422 | `BITRIX_ERROR` | `error.b24Code` is `ACCESS_ERROR` — the employee has no access to the chat, or there is no such chat |\n| 404 | `ENTITY_NOT_FOUND` | Bitrix24 returned a generic \"not found\" error; the Bitrix24 code is in `error.b24Code` |\n| 403 | `SCOPE_DENIED` | The API key does not have the `im` scope |\n| 401 | `TOKEN_MISSING` | The API key has no Bitrix24 tokens configured |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**End of the list.** A page with fewer links than `limit` is the last one.\n\n**Only the visible history is returned.** If the employee can see the chat history only from a certain point on — for example, they were added later without access to older messages — links before that point are not returned.\n\n## See also\n\n- [Number of a chat's links](\u002Fdocs\u002Fchats\u002Fmessages\u002Flinks-count)\n- [Remove a link from the list](\u002Fdocs\u002Fchats\u002Fmessages\u002Flinks-delete)\n- [Chat file list](\u002Fdocs\u002Fchats\u002Ffiles\u002Flist)\n- [Messages](\u002Fdocs\u002Fchats\u002Fmessages)\n","2026-11-20",{},1795415436816]