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

Typing indicator

POST /v1/bots/:botId/typing

Shows a status indicator in the chat. Call it before sending a reply so the user can see the bot is working.

Parameters

Parameter Type Required Description
ParameterbotId (path) Typenumber Requiredyes DescriptionBot ID. List: GET /v1/bots

Request fields (body)

Field Type Required Default Description
FielddialogId Typestring Requiredyes Default— DescriptionDialog ID: the numeric user ID for direct messages (list: GET /v1/users). chatXXX for group chats — from the Create a chat response or from the chat.dialogId field of bot events
FieldstatusMessageCode Typestring Requiredno Default— DescriptionAction status code (see the table below). If omitted, the standard "typing" indicator is shown
Fieldduration Typenumber Requiredno Default— DescriptionDisplay duration in seconds (1-600)

Status codes

Code Description
CodeIMBOT_AGENT_ACTION_THINKING DescriptionThinking
CodeIMBOT_AGENT_ACTION_SEARCHING DescriptionSearching
CodeIMBOT_AGENT_ACTION_GENERATING DescriptionGenerating
CodeIMBOT_AGENT_ACTION_ANALYZING DescriptionAnalyzing
CodeIMBOT_AGENT_ACTION_PROCESSING DescriptionProcessing
CodeIMBOT_AGENT_ACTION_TRANSLATING DescriptionTranslating
CodeIMBOT_AGENT_ACTION_CONNECTING DescriptionConnecting
CodeIMBOT_AGENT_ACTION_CHECKING DescriptionChecking
CodeIMBOT_AGENT_ACTION_CALCULATING DescriptionCalculating
CodeIMBOT_AGENT_ACTION_READING_DOCS DescriptionReading documentation
CodeIMBOT_AGENT_ACTION_COMPOSING DescriptionComposing a reply

Examples

curl — personal key

Terminal
curl -X POST https://vibecode.bitrix24.com/v1/bots/42/typing \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "dialogId": "chat123",
    "statusMessageCode": "IMBOT_AGENT_ACTION_THINKING",
    "duration": 30
  }'

curl — OAuth application

Terminal
curl -X POST https://vibecode.bitrix24.com/v1/bots/42/typing \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "dialogId": "chat123",
    "statusMessageCode": "IMBOT_AGENT_ACTION_THINKING",
    "duration": 30
  }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/bots/42/typing', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    dialogId: 'chat123',
    statusMessageCode: 'IMBOT_AGENT_ACTION_THINKING',
    duration: 30,
  }),
})

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

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/bots/42/typing', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    dialogId: 'chat123',
    statusMessageCode: 'IMBOT_AGENT_ACTION_THINKING',
    duration: 30,
  }),
})

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

Response fields

Field Type Description
Fielddata.result Typeboolean Descriptiontrue on successful send

Response example

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

Error response example

404 — bot not found:

JSON
{
  "success": false,
  "error": {
    "code": "BOT_NOT_FOUND",
    "message": "Bot 999 not found. Register it first via POST /v1/bots."
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_BOT_ID DescriptionbotId is not a number
HTTP404 CodeBOT_NOT_FOUND DescriptionNo bot found with this ID
HTTP403 CodeBOT_ACCESS_DENIED DescriptionThe bot belongs to a different API key
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 error (error text in message)
HTTP403 CodeSCOPE_DENIED DescriptionThe API key lacks the imbot scope
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key is read-only — see access rights
HTTP410 CodeBOT_DISABLED DescriptionThe bot is disabled and does not process API calls. How to restore it — Bot disabled
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens

Full list of common API errors — Errors.

Known specifics

AI bots: use statusMessageCode for an informative status. For example, IMBOT_AGENT_ACTION_ANALYZING while processing the request, then IMBOT_AGENT_ACTION_COMPOSING before sending the reply.

Automatic hiding: the indicator disappears when the bot sends a message or after duration elapses.

See also