For AI agents: markdown of this page — /docs-content-en/chats/messages/typing.md documentation index — /llms.txt

Typing indicator

POST /v1/chats/:dialogId/typing

Shows the other chat members that the current user is typing a message, recording a voice message or a video, or sending a photo or a file.

Parameters

Parameter Type Required Default Description
dialogId (path) string yes — Dialog ID: a numeric user ID for personal messages, chatXXX for group chats. Take it from the id field of a recent dialogs row or, for a user, from the user list. The special me alias is the current user's personal dialog — see the Chats overview for details

Request body fields

Field Type Required Description
type string no What the user is doing: writing — typing, recordingVoice — recording a voice message, sendingPhoto — sending a photo, sendingFile — sending a file, recordingVideo — recording a video. Defaults to writing

The body may be omitted. Any other body field and any query parameter are rejected with 400 INVALID_PARAMS.

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/chats/chat42/typing" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "type": "recordingVoice" }'

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/chats/chat42/typing" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "type": "recordingVoice" }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/chat42/typing', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ type: 'recordingVoice' }),
})

const { success } = await res.json()
console.log('Indicator sent:', success)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/chat42/typing', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ type: 'recordingVoice' }),
})

const { success } = await res.json()
console.log('Indicator sent:', success)

Response fields

Field Type Description
success boolean Always true on success
data object Result of sending the event
data.result boolean true — the event was sent to the members

Response example

JSON
{
  "success": true,
  "data": {
    "result": true
  }
}

Error response example

400 — an unknown type value:

JSON
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "`type` must be one of: writing, recordingVoice, sendingPhoto, sendingFile, recordingVideo."
  }
}

Errors

HTTP Code Description
400 INVALID_PARAMS type outside the five values, any other body field, or any query parameter. Checked before any call to Bitrix24
401 TOKEN_MISSING The API key has no Bitrix24 tokens configured
403 SCOPE_DENIED The API key does not have the im scope
403 WRITE_BLOCKED_READONLY_KEY The key is read-only, and the call sends an event to the chat members — see access rights
404 ENTITY_NOT_FOUND Bitrix24 reported "not found"; the Bitrix24 code is in error.b24Code
422 BITRIX_ERROR Bitrix24 returned an error, for example CHAT_NOT_FOUND; the Bitrix24 code is in error.b24Code
502 ME_ALIAS_RESOLUTION_FAILED Failed to resolve the current user for me: Bitrix24 did not return their ID
502 BITRIX_UNAVAILABLE Bitrix24 is unavailable or returned a server error

Full list of common API errors — Errors.

Known specifics

The indicator turns off on its own. The event shows the indicator for a few seconds. While the user keeps typing, repeat the call — but no more often than needed to keep the indicator on: the endpoint has no rate limit of its own, and every call goes to Bitrix24.

writing reaches beyond the chat. The "typing" event also goes to Open Channels, which pass it on to the external client, and to the chat's bots.

It does not make you a member. Unlike reading a chat, the call does not add the user as a member.

See also