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

Get a poll

GET /v1/polls/:pollId

Returns a poll by attachment ID, including active questions, answers, counters, the current vote and permissions.

Results follow Bitrix24 visibility rules: when resultsVisible: false, counters and percentages are null, voters is empty and votersComplete is false. See the poll object for visibility rules.

Scope: vote. Key restrictions: Polls.

Parameters

Parameter Type Required Default Description
ParameterpollId (path) Typenumber Requiredyes Default— DescriptionPositive attachment ID: the id field from poll discovery, rather than voteId

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/polls/7" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl "https://vibecode.bitrix24.com/v1/polls/7" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/polls/7', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})
const result = await res.json()

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/polls/7', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})
const result = await res.json()

Response fields

Field Type Description
Fieldsuccess Typeboolean Descriptiontrue on success
Fielddata Typeobject DescriptionPoll object

Response example

Illustrative response based on the normalizer and test fixtures; not a live Bitrix24 response.

JSON
{
  "success": true,
  "data": {
    "id": 7,
    "voteId": 8,
    "status": "active",
    "anonymous": true,
    "allowRevote": true,
    "resultsHidden": true,
    "resultsVisible": true,
    "votersCount": 3,
    "questions": [
      {
        "id": 10,
        "text": "First",
        "multipleChoice": false,
        "required": false,
        "votesCount": 0,
        "answers": [
          {
            "id": 11,
            "text": "One",
            "votesCount": 0,
            "percent": 0
          },
          {
            "id": 12,
            "text": "Two",
            "votesCount": 0,
            "percent": 0
          }
        ]
      },
      {
        "id": 20,
        "text": "Second",
        "multipleChoice": true,
        "required": true,
        "votesCount": 2,
        "answers": [
          {
            "id": 22,
            "text": "A",
            "votesCount": 2,
            "percent": 100
          },
          {
            "id": 23,
            "text": "B",
            "votesCount": 0,
            "percent": 0
          }
        ]
      }
    ],
    "myVote": {
      "voted": true,
      "answerIds": [
        22
      ]
    },
    "permissions": {
      "canVote": false,
      "canRevote": true,
      "canManage": true
    }
  }
}

Errors

HTTP Code Cause and action
HTTP400 CodeINVALID_PARAMS Cause and actionInvalid ID or request parameter
HTTP401 CodeTOKEN_MISSING Cause and actionNo Bitrix24 user session
HTTP403 CodeSCOPE_DENIED Cause and actionRequired scope is missing
HTTP403 CodeCOWORK_READONLY Cause and actionOperation forbidden for a Cowork portal-readonly key
HTTP404 CodePOLL_NOT_FOUND Cause and actionPoll missing or inaccessible
HTTP403 CodePOLL_ACCESS_DENIED Cause and actionBitrix24 denied the operation
HTTP422 CodeBITRIX_ERROR Cause and actionBitrix24 rejected the request, for example because the method is unavailable in this version

Other authentication refusals, limits and shared errors: error codes.

JSON
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "Invalid poll parameters."
  }
}