For AI agents: markdown of this page — /docs-content-en/chats/sharing/individual-link.md documentation index — /llms.txt
Get an individual chat link
POST /v1/chats/:dialogId/sharing-links/individual
Returns your individual chat link and creates it if the link does not exist yet. An employee of the Bitrix24 account joins the chat with the link code, and each member has their own link.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ParameterdialogId (path) |
Typestring | Requiredyes | DescriptionDialog ID: chatXXX for a group chat, a numeric user ID for a private chat, me — your personal dialog. List — GET /v1/chats/recent |
Request fields (body)
The body is optional.
| Field | Type | Required | Description |
|---|---|---|---|
FieldgenerateIfNotExists |
Typeboolean | Requiredno | Descriptionfalse — only return the existing link without creating a new one. Defaults to true |
Other body fields and query parameters are rejected with 400 INVALID_PARAMS.
Examples
curl — personal key
curl -X POST "https://vibecode.bitrix24.com/v1/chats/chat42/sharing-links/individual" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X POST "https://vibecode.bitrix24.com/v1/chats/chat42/sharing-links/individual" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/chat42/sharing-links/individual', {
method: 'POST',
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { data } = await res.json()
console.log('Link code:', data.sharingLink.code)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/chat42/sharing-links/individual', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { data } = await res.json()
console.log('Link code:', data.sharingLink.code)
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata.sharingLink.id |
Typenumber | DescriptionLink ID |
Fielddata.sharingLink.entityType |
Typestring | Descriptionchat — a chat link |
Fielddata.sharingLink.entityId |
Typestring | DescriptionChat ID without the chat prefix |
Fielddata.sharingLink.code |
Typestring | DescriptionThe link code — for joining by code, reading and revoking |
Fielddata.sharingLink.type |
Typestring | Descriptionindividual — an individual link |
Fielddata.sharingLink.dateCreate |
Typestring | DescriptionCreation date, ISO 8601 |
Fielddata.sharingLink.dateExpire |
Typestring | null | DescriptionExpiration date. null — no expiration |
Fielddata.sharingLink.requireApproval |
Typeboolean | DescriptionWhether joining requires approval |
Fielddata.sharingLink.url |
Typestring | DescriptionThe link URL on the Bitrix24 account; the code is the value of its IM_CODE parameter |
Response example
{
"success": true,
"data": {
"sharingLink": {
"id": 1012,
"entityId": "42",
"entityType": "chat",
"code": "Xk9pQ2mZ7rT4vB1c",
"type": "individual",
"dateCreate": "2026-09-24T23:02:28+00:00",
"dateExpire": null,
"requireApproval": false,
"url": "https://portal.bitrix24.com/online/?IM_CODE=Xk9pQ2mZ7rT4vB1c"
}
}
}
Error response example
422 — there is no link, and generateIfNotExists is false:
{
"success": false,
"error": {
"code": "BITRIX_ERROR",
"message": "SHARING_LINK_NOT_FOUND",
"b24Code": "SHARING_LINK_NOT_FOUND"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
DescriptionA body field other than generateIfNotExists, a body that is not an object, a generateIfNotExists that is neither true nor false, or a query parameter. Checked before any call to Bitrix24 |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 returned an error; the portal code is in error.b24Code. SHARING_LINK_NOT_FOUND — no link exists with generateIfNotExists: false. CHAT_NOT_FOUND — the chat does not exist on the portal |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionBitrix24 answered with an unspecified "not found" code; the portal code is in error.b24Code |
| HTTP502 | CodeME_ALIAS_RESOLUTION_FAILED |
DescriptionFailed to resolve the user for the me alias |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionNo right to invite to this chat — Bitrix24 refused with the ACCESS_DENIED code |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key does not have the im scope |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionThe key is read-only and the call is a write — see access rights |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no Bitrix24 tokens configured |
The full list of general API errors — Errors.
Known specifics
A repeated call returns the same link. While the link is valid, every call returns it with the same code. A new code comes from regeneration.
The call is a write even without creating a link. With generateIfNotExists: false, no link is created, but a read-only key still gets 403 WRITE_BLOCKED_READONLY_KEY: the call may make the key owner a chat member if the chat allows auto-join.