For AI agents: markdown of this page — /docs-content-en/entities/crm-emails/thread.md documentation index — /llms.txt

Get a CRM e-mail thread

GET /v1/crm-emails/:activityId/thread

Read the conversation thread of a CRM e-mail activity. Inaccessible messages are represented by hidden entries.

Parameters

Parameter Type Required Description
ParameteractivityId (path) Typeinteger Requiredyes DescriptionActivity identifier from the e-mail list.

Examples

curl — personal key

Terminal
curl -X GET "https://vibecode.bitrix24.com/v1/crm-emails/1203/thread" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X GET "https://vibecode.bitrix24.com/v1/crm-emails/1203/thread" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const response = await fetch('https://vibecode.bitrix24.com/v1/crm-emails/1203/thread', {
  method: 'GET',
  headers: {"X-Api-Key": "YOUR_API_KEY"},
})
const result = await response.json()

JavaScript — OAuth application

javascript
const response = await fetch('https://vibecode.bitrix24.com/v1/crm-emails/1203/thread', {
  method: 'GET',
  headers: {"X-Api-Key": "YOUR_APP_KEY", "Authorization": "Bearer USER_SESSION_TOKEN"},
})
const result = await response.json()

Response fields

Field Description
Fielddata.messages[].id DescriptionIdentifier.
Fielddata.messages[].subject DescriptionE-mail subject.
Fielddata.messages[].dateTime DescriptionDate and time, or null.
Fielddata.messages[].isIncoming DescriptionWhether the e-mail is incoming.
Fielddata.messages[].from DescriptionSender.
Fielddata.messages[].to DescriptionPrimary recipients.
Fielddata.messages[].cc DescriptionCC recipients. null for a hidden message.
Fielddata.messages[].bcc DescriptionBCC recipients. null for a hidden message.
Fielddata.messages[].isHidden DescriptionWhether the message is hidden. Only id:0, cc:null, bcc:null, isHidden:true are then available.
Fielddata.isTruncated DescriptionWhether Bitrix24 truncated the thread.

Response example

Response structure with neutral sample data.

JSON
{
  "success": true,
  "data": {
    "messages": [
      {
        "id": 1203,
        "subject": "Integration request",
        "dateTime": "2026-10-30T10:00:00+00:00",
        "isIncoming": true,
        "from": "sender@example.com",
        "to": [
          "reader@example.com"
        ],
        "cc": [],
        "bcc": [],
        "isHidden": false
      },
      {
        "id": 0,
        "cc": null,
        "bcc": null,
        "isHidden": true
      }
    ],
    "isTruncated": false
  }
}

Error response example

400 — unknown query parameter:

JSON
{
  "success": false,
  "error": {
    "code": "UNKNOWN_FILTER_FIELD",
    "message": "Unknown query parameter"
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptionInvalid type or identifier.
HTTP400 CodeUNKNOWN_FILTER_FIELD DescriptionUnknown query parameter.
HTTP401 CodeTOKEN_MISSING DescriptionThe key has no Bitrix24 credentials.
HTTP403 CodeSCOPE_DENIED DescriptionThe crm scope is required.
HTTP404 CodeENTITY_NOT_FOUND DescriptionThe record is absent or inaccessible.
HTTP404 CodeCRM_EMAIL_ACTIVITY_NOT_FOUND DescriptionThe e-mail activity was not found.
HTTP422 CodeMETHOD_NOT_YET_AVAILABLE DescriptionThe method is absent on the account. error.release names the required release.
HTTP502 CodeBITRIX_UNAVAILABLE DescriptionBitrix24 is unavailable or returned an invalid response shape.

Other Bitrix24 refusals retain their original code and message. Common API errors.

Known behavior

These are CRM activity e-mails. The Mail module uses different message identifiers.

See also