Pollunit Voters API

The Voters API from Pollunit — 2 operation(s) for voters.

GitHub OpenAPI

Operations 5

GET /api/v1/polls/{poll_id}/voters List poll participants #
POST /api/v1/polls/{poll_id}/voters Create participant #
GET /api/v1/polls/{poll_id}/voters/{id} Get participant #
PATCH /api/v1/polls/{poll_id}/voters/{id} Update participant #
DELETE /api/v1/polls/{poll_id}/voters/{id} Delete participant #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/pollunit-com:pollunit-com-voters-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

pollunit-com-voters-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Pollunit Com Voters API
  version: v1
  description: 'Operations tagged Voters across 2 of this provider''s published API definitions: pollunit-com-openapi.json, pollunit-com-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://pollunit.com
  description: Production
- url: http://localhost:3000
  description: Development
security:
- bearerAuth: []
tags:
- name: Voters
paths:
  /api/v1/polls/{poll_id}/voters:
    parameters:
    - name: poll_id
      in: path
      description: Poll member_hash or admin_hash
      required: true
      schema:
        type: string
    - name: organization_id
      in: query
      required: false
      description: public_id of an organization the user belongs to. When given, the request runs in that organization context instead of the personal account.
      schema:
        type: string
    get:
      summary: List poll participants
      tags:
      - Voters
      security:
      - bearerAuth: []
      description: Returns one page of the participants of the poll. Polls that hide their participants only list them with admin access. Use the X-Total-Pages / X-Total-Count response headers to page through the full list.
      parameters:
      - name: page
        in: query
        required: false
        description: Page to return, 1-based. Defaults to 1.
        schema:
          type: integer
      - name: per
        in: query
        required: false
        description: Participants per page. Defaults to 30. At most 100.
        schema:
          type: integer
      responses:
        '200':
          description: participants listed
          headers:
            X-Page:
              schema:
                type: integer
              description: Current page, 1-based
            X-Per-Page:
              schema:
                type: integer
              description: Participants per page
            X-Total-Pages:
              schema:
                type: integer
              description: Number of pages
            X-Total-Count:
              schema:
                type: integer
              description: Total number of participants of the poll
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Voter'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: poll hides its participants
        '404':
          description: poll not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
      operationId: getApiV1PollsByPollIdVoters
      x-operation-id-source: derived
    post:
      summary: Create participant
      tags:
      - Voters
      security:
      - bearerAuth: []
      description: 'Adds a participant to the poll, which is the object the votes of one person belong to. A private token creates the participant on behalf of its user, a public token creates it anonymously and the X-POLLUNIT-USER-IDENTIFIER header decides which anonymous user it belongs to. The call is idempotent for one user: a repeated request updates the existing participant instead of adding a second one. The poll has to be votable, and its participant limit and access restrictions apply.'
      parameters:
      - name: X-POLLUNIT-USER-IDENTIFIER
        in: header
        required: false
        description: 'Your own identification of the user on whose behalf the request is made, any string. The user identifiers should not be guessable and stay secret, otherwise users could get access to other users'' contents. Only used with a public API token: the created or changed object belongs to that anonymous user instead of the token owner, which keeps the user in control of it in later requests with the same identifier.'
        schema:
          type: string
      - name: X-POLLUNIT-POLL-PASSWORD
        in: header
        required: false
        description: Access password of the poll. Only needed for password protected polls.
        schema:
          type: string
      responses:
        '201':
          description: participant created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Voter'
        '200':
          description: voting fee has to be paid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VotingFeePayment'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: poll does not accept votes
        '404':
          description: poll not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '422':
          description: invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoterCreateRequest'
      operationId: postApiV1PollsByPollIdVoters
      x-operation-id-source: derived
    servers:
    - url: https://pollunit.com
      description: Production
    - url: http://localhost:3000
      description: Development
  /api/v1/polls/{poll_id}/voters/{id}:
    parameters:
    - name: poll_id
      in: path
      description: Poll member_hash or admin_hash
      required: true
      schema:
        type: string
    - name: id
      in: path
      description: Voter public_id
      required: true
      schema:
        type: string
    - name: organization_id
      in: query
      required: false
      description: public_id of an organization the user belongs to. When given, the request runs in that organization context instead of the personal account.
      schema:
        type: string
    get:
      summary: Get participant
      tags:
      - Voters
      security:
      - bearerAuth: []
      responses:
        '200':
          description: participant found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Voter'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '404':
          description: participant not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
      operationId: getApiV1PollsByPollIdVotersById
      x-operation-id-source: derived
    patch:
      summary: Update participant
      tags:
      - Voters
      security:
      - bearerAuth: []
      description: Changes an existing participant. Only the given attributes are written, the others keep their value. The participant has to belong to the requesting user — identified by the private token or, for anonymous users, by the X-POLLUNIT-USER-IDENTIFIER header — and the poll has to still accept votes. Admins may additionally change other participants of voting and table polls that do not anonymize or hide their participants.
      parameters:
      - name: X-POLLUNIT-USER-IDENTIFIER
        in: header
        required: false
        description: 'Your own identification of the user on whose behalf the request is made, any string. The user identifiers should not be guessable and stay secret, otherwise users could get access to other users'' contents. Only used with a public API token: the created or changed object belongs to that anonymous user instead of the token owner, which keeps the user in control of it in later requests with the same identifier.'
        schema:
          type: string
      responses:
        '200':
          description: participant updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Voter'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: forbidden (the participant belongs to somebody else)
        '404':
          description: participant not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '422':
          description: invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoterUpdateRequest'
      operationId: patchApiV1PollsByPollIdVotersById
      x-operation-id-source: derived
    delete:
      summary: Delete participant
      tags:
      - Voters
      security:
      - bearerAuth: []
      description: 'Removes the votes of the participant, and the participant record itself when deleting it is allowed. Deleting the votes requires that the participation belongs to the requesting user and the poll still accepts votes, or admin access to a survey, or admin access with an account that allows deleting; participants of a poll with a voting wallet can never be deleted, and the request is rejected with 403 when none of this applies. The participant record is kept — with its votes removed — when the requesting account is not allowed to delete it, so that the participation itself stays on record. Both outcomes answer with 204: read the participant back to tell them apart, a kept participant is still found.'
      parameters:
      - name: X-POLLUNIT-USER-IDENTIFIER
        in: header
        required: false
        description: 'Your own identification of the user on whose behalf the request is made, any string. The user identifiers should not be guessable and stay secret, otherwise users could get access to other users'' contents. Only used with a public API token: the created or changed object belongs to that anonymous user instead of the token owner, which keeps the user in control of it in later requests with the same identifier.'
        schema:
          type: string
      responses:
        '204':
          description: votes deleted, and the participant when deleting it is allowed
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: forbidden (the participant belongs to somebody else)
        '404':
          description: participant not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
      operationId: deleteApiV1PollsByPollIdVotersById
      x-operation-id-source: derived
    servers:
    - url: https://pollunit.com
      description: Production
    - url: http://localhost:3000
      description: Development
components:
  schemas:
    VoterCreateRequest:
      type: object
      properties:
        voter:
          $ref: '#/components/schemas/VoterInput'
      required:
      - voter
    Voter:
      type: object
      description: 'A participant of the poll. Which fields are returned depends on the poll type and on your access level: `complete` only for surveys, `required_option_votes_complete` only when the poll requires votes on all options or all dots, and moderation fields only with admin access.'
      properties:
        id:
          type: string
          description: Voter public_id
        user_name:
          type:
          - string
          - 'null'
          description: Name of the participant. A generated name when the poll has `anonymize_voter_names`.
        changed_by_admin:
          type:
          - boolean
          - 'null'
          description: The votes of this participant were changed by an admin.
        complete:
          type:
          - boolean
          - 'null'
          description: 'Surveys only: the participant finished the survey.'
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
        fraudulent:
          type:
          - boolean
          - 'null'
          description: Admin access only
        paid:
          type:
          - boolean
          - 'null'
          description: Admin access only. `false` while a voting fee for this participant is still open.
        required_option_votes_complete:
          type:
          - boolean
          - 'null'
          description: Admin access only, and only when the poll has `option_vote_requirement` `all_options` or `require_all_dots` enabled.
        privacy_policy_accepted:
          type:
          - boolean
          - 'null'
          description: Admin access only, and only when the poll has `privacy_policy_for_voters`.
        terms_accepted:
          type:
          - boolean
          - 'null'
          description: Admin access only, and only when the poll has `terms_for_voters`.
      required:
      - id
    NotFound:
      type: object
      properties:
        error:
          type: string
          example: Not Found
    Unauthorized:
      type: object
      properties:
        error:
          type: string
          example: Unauthorized
    VoterInput:
      type: object
      description: Attributes accepted when creating a participant. The fields the poll configuration makes mandatory are listed in the poll show response as `voter_required_fields`.
      properties:
        user_name:
          type:
          - string
          - 'null'
          example: Jack
          description: 'Name of the participant. Required for anonymous participants unless the poll generates the names through `anonymize_voter_names` or does not require them. Ignored with a private token: the name of the token owner is used.'
        additional_attributes:
          type:
          - object
          - 'null'
          description: Values for the poll's `additional_attributes`, keyed by attribute id. Keys the poll does not define are dropped. Pass the double opt in address as `optin_email`.
        terms:
          type:
          - boolean
          - 'null'
          description: Set to `true` (or `"true"` / `"1"`) to accept the poll's terms. Required when the poll has `terms_for_voters`.
        privacy_policy:
          type:
          - boolean
          - 'null'
          description: Set to `true` (or `"true"` / `"1"`) to accept the poll's privacy policy. Required when the poll has `privacy_policy_for_voters`.
    VoterUpdateRequest:
      type: object
      properties:
        voter:
          type: object
          description: Only the given attributes are written, the others keep their value. Terms and privacy policy use their stored attribute names here, not the `terms` / `privacy_policy` names of the create request.
          properties:
            user_name:
              type:
              - string
              - 'null'
            additional_attributes:
              type:
              - object
              - 'null'
              description: Values for the poll's `additional_attributes`. Omit to keep the stored values; when given, the hash replaces all of them, so it has to carry every required value.
            terms_accepted:
              type:
              - boolean
              - 'null'
            privacy_policy_accepted:
              type:
              - boolean
              - 'null'
      required:
      - voter
    VotingFeePayment:
      type: object
      description: Returned instead of the participant when the poll charges a voting fee or asks for a donation. The participant already exists but stays unpaid until the payment page has been completed.
      properties:
        message:
          type: string
          example: Complete payment for voter
        url:
          type: string
          format: uri
          description: Payment page for this participant.
    Errors:
      type: object
      properties:
        error:
          type: string
          example: Unprocessable Entity
        errors:
          type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: opaque
      description: Personal API token — find yours under My Account → API.
x-refined-from:
- pollunit-com-openapi.json
- pollunit-com-openapi.yml