> ## Documentation Index
> Fetch the complete documentation index at: https://docs.worldrepublic.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a test election



## OpenAPI

````yaml /openapi.json get /elections/{electionId}
openapi: 3.1.0
info:
  title: World Republic public API
  version: 1.0.0
  description: >-
    Read-only access to the World Republic's public data: the party registry,
    test elections and their results, the party subsidies allocated to each
    party, and counts of verified citizens and parties. No sign-in. Test
    elections are experimental and non-binding; they are not public elections.
    Per-party results are published only after an election closes. Party names
    and descriptions are written by party leaders. The same reads are available
    to AI assistants through the MCP server at
    https://www.worldrepublic.org/api/mcp.
  termsOfService: https://www.worldrepublic.org/en/legal/terms
servers:
  - url: https://www.worldrepublic.org/api/v1
security: []
externalDocs:
  url: https://docs.worldrepublic.org
paths:
  /elections/{electionId}:
    get:
      summary: Get a test election
      operationId: getElection
      parameters:
        - name: electionId
          in: path
          required: true
          description: The election's id.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The election and its results.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ElectionDetail'
        '400':
          description: The request was malformed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such election.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            The data could not be read just now, or search was over its limit.
            Retry after the Retry-After header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ElectionDetail:
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
        name:
          type: string
        kind:
          type: string
          const: test_election
        binding:
          type: boolean
          const: false
        status:
          type: string
          enum:
            - open
            - upcoming
            - closed
        startsAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
          description: ISO 8601 timestamp, UTC.
        endsAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
          description: ISO 8601 timestamp, UTC.
        ballotMode:
          type: string
          enum:
            - tally
            - sealed
          description: >-
            tally: counted as ballots arrive. sealed: encrypted ballots, counted
            after the close.
        resultsAvailable:
          type: boolean
        ballotsCast:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
          description: >-
            While open, the only figure published is this total; per-party
            results appear only after the close.
        url:
          type: string
          format: uri
        note:
          type: string
          const: >-
            The World Republic's own test election: experimental and
            non-binding, not a public election. It confers no public office,
            mandate or authority. Its result decides how the platform divides
            that election's party subsidies.
        eligibleVoters:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
          description: >-
            Verified citizens who could vote: live while open, frozen at the
            close.
        results:
          type: array
          items:
            type: object
            properties:
              partyId:
                anyOf:
                  - type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                  - type: 'null'
                description: >-
                  Null when the party's content has been withheld; its votes
                  still count.
              partyName:
                type: string
              withheld:
                type: boolean
              votes:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
              seats:
                anyOf:
                  - type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  - type: 'null'
            required:
              - partyId
              - partyName
              - withheld
              - votes
              - seats
            additionalProperties: false
          description: Every party's votes. Empty until results are available.
      required:
        - id
        - name
        - kind
        - binding
        - status
        - startsAt
        - endsAt
        - ballotMode
        - resultsAvailable
        - ballotsCast
        - url
        - note
        - eligibleVoters
        - results
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - invalid_request
                - not_found
                - unavailable
            message:
              type: string
          required:
            - code
            - message
      required:
        - error

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.