Polkadot Governance API

The Governance API from Polkadot — 40 operation(s) for governance.

OpenAPI Specification

polkadot-governance-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Polkadot REST Account Governance API
  description: High-performance Rust REST API for Substrate/Polkadot blockchain data. Drop-in replacement for substrate-api-sidecar.
  contact:
    url: https://github.com/paritytech/polkadot-rest-api
  license:
    name: GPL-3.0-or-later
  version: 0.1.3
servers:
- url: http://localhost:8080/v1
  description: Localhost
tags:
- name: Governance
paths:
  /api/scan/account/referendum:
    post:
      consumes:
      - application/json
      description: 'Returns paginated referendum or democracy items associated with the specified account.

        This API only supports networks with democracy frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.accountReferendumParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    count:
                      type: integer
                    list:
                      items:
                        $ref: '#/definitions/subscan_internal_model.AccountReferendumJson'
                      type: array
                  type: object
              type: object
      summary: List governance items for an account
      tags:
      - Governance
      x-synonyms:
      - account
      - referendum
      - governance
      - scan
      - wallet
      - address
      - user
      - vote
      - treasury
      - council
  /api/scan/bounties/child:
    post:
      consumes:
      - application/json
      description: 'Returns a paginated child-bounty list, optionally filtered by parent bounty ID.

        This API only supports networks with childbounties frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.childBountiesParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    count:
                      type: integer
                    list:
                      items:
                        $ref: '#/definitions/subscan_internal_model.ChildBountySampleJson'
                      type: array
                  type: object
              type: object
      summary: List child bounties
      tags:
      - Governance
      x-synonyms:
      - child
      - bounty
      - governance
      - scan
      - bounties
      - referendum
      - vote
      - treasury
      - council
  /api/scan/bounties/proposal:
    post:
      consumes:
      - application/json
      description: 'Returns details for one bounty proposal.

        This API only supports networks with bounties frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.bountyParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  $ref: '#/definitions/subscan_internal_model.BountyJson'
              type: object
      summary: Get bounty details
      tags:
      - Governance
      x-synonyms:
      - bounty
      - governance
      - scan
      - bounties
      - proposal
      - referendum
      - vote
      - treasury
      - council
  /api/scan/bounties/proposals:
    post:
      consumes:
      - application/json
      description: 'Returns a paginated bounty list with optional status filtering.

        This API only supports networks with bounties frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.bountiesParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    count:
                      type: integer
                    list:
                      items:
                        $ref: '#/definitions/subscan_internal_model.BountySampleJson'
                      type: array
                  type: object
              type: object
      summary: List bounties
      tags:
      - Governance
      x-synonyms:
      - bounty
      - governance
      - scan
      - bounties
      - proposals
      - referendum
      - vote
      - treasury
      - council
  /api/scan/council/proposal:
    post:
      consumes:
      - application/json
      description: 'Returns details for one council proposal.

        This API only supports networks with council frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.councilProposalParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    info:
                      $ref: '#/definitions/subscan_internal_model.CouncilProposalJson'
                  type: object
              type: object
      summary: Get council proposal details
      tags:
      - Governance
      x-synonyms:
      - council
      - proposal
      - governance
      - scan
      - referendum
      - vote
      - treasury
  /api/scan/council/proposals:
    post:
      consumes:
      - application/json
      description: 'Returns a paginated council proposal list.

        This API only supports networks with council frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.councilProposalsParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    count:
                      type: integer
                    list:
                      items:
                        $ref: '#/definitions/subscan_internal_model.TechcommProposalSample'
                      type: array
                  type: object
              type: object
      summary: List council proposals
      tags:
      - Governance
      x-synonyms:
      - council
      - proposals
      - governance
      - scan
      - referendum
      - vote
      - treasury
  /api/scan/democracy/proposal:
    post:
      consumes:
      - application/json
      description: 'Returns details for one democracy proposal.

        This API only supports networks with democracy frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.democracyParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    info:
                      $ref: '#/definitions/subscan_internal_model.DemocracyJson'
                  type: object
              type: object
      summary: Get democracy proposal details
      tags:
      - Governance
      x-synonyms:
      - democracy
      - governance
      - scan
      - proposal
      - referendum
      - vote
      - treasury
      - council
  /api/scan/democracy/proposals:
    post:
      consumes:
      - application/json
      description: 'Returns a paginated democracy proposal list with optional status and ordering controls.

        This API only supports networks with democracy frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.democraciesParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    count:
                      type: integer
                    list:
                      items:
                        $ref: '#/definitions/subscan_internal_model.DemocracySampleJson'
                      type: array
                  type: object
              type: object
      summary: List democracy proposals
      tags:
      - Governance
      x-synonyms:
      - democracies
      - governance
      - scan
      - democracy
      - proposals
      - referendum
      - vote
      - treasury
      - council
  /api/scan/democracy/referendum:
    post:
      consumes:
      - application/json
      description: 'Returns details for one legacy democracy referendum.

        This API only supports networks with democracy frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.referendumParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    info:
                      $ref: '#/definitions/subscan_internal_model.ReferendumJson'
                  type: object
              type: object
      summary: Get democracy referendum details (legacy)
      tags:
      - Governance
      x-synonyms:
      - referendum
      - legacy
      - governance
      - scan
      - democracy
      - vote
      - treasury
      - council
  /api/scan/democracy/referendums:
    post:
      consumes:
      - application/json
      description: 'Returns a paginated democracy referendum list with optional active/completed status filtering.

        This API only supports networks with democracy frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.referendumsParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    count:
                      type: integer
                    list:
                      items:
                        $ref: '#/definitions/subscan_internal_model.DemocracyReferendumSampleJson'
                      type: array
                  type: object
              type: object
      summary: List democracy referendums
      tags:
      - Governance
      x-synonyms:
      - referendums
      - governance
      - scan
      - democracy
      - referendum
      - vote
      - treasury
      - council
  /api/scan/democracy/seconded:
    post:
      consumes:
      - application/json
      description: 'Returns the accounts that seconded a democracy proposal.

        This API only supports networks with democracy frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.democracySecondedParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    count:
                      type: integer
                    list:
                      items:
                        $ref: '#/definitions/subscan_internal_model.DemocracyProposalSeconded'
                      type: array
                  type: object
              type: object
      summary: List democracy seconders
      tags:
      - Governance
      x-synonyms:
      - democracy
      - seconded
      - governance
      - scan
      - referendum
      - vote
      - treasury
      - council
  /api/scan/democracy/votes:
    post:
      consumes:
      - application/json
      description: 'Returns paginated vote records for a legacy democracy referendum or account.

        This API only supports networks with democracy frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.referendumVotesParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    count:
                      type: integer
                    list:
                      items:
                        $ref: '#/definitions/subscan_internal_model.DemocracyVoteJson'
                      type: array
                  type: object
              type: object
      summary: List democracy referendum votes (legacy)
      tags:
      - Governance
      x-synonyms:
      - referendum
      - votes
      - legacy
      - governance
      - scan
      - democracy
      - vote
      - treasury
      - council
  /api/scan/fellowship/referendum:
    post:
      consumes:
      - application/json
      description: 'Returns details for one fellowship referendum.

        This API only supports networks with FellowshipReferenda frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.fellowshipReferendumParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  $ref: '#/definitions/subscan_internal_model.ReferendumV2Json'
              type: object
      summary: Get fellowship referendum details
      tags:
      - Governance
      x-synonyms:
      - fellowship
      - referenda
      - governance
      - scan
      - referendum
      - vote
      - treasury
      - council
  /api/scan/fellowship/referendums:
    post:
      consumes:
      - application/json
      description: 'Returns a paginated fellowship referenda list with origin, account, and call filters.

        This API only supports networks with FellowshipReferenda frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.fellowshipReferendumsV2Params'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    count:
                      type: integer
                    list:
                      items:
                        $ref: '#/definitions/subscan_internal_model.ReferendumV2SampleJson'
                      type: array
                  type: object
              type: object
      summary: List fellowship referenda
      tags:
      - Governance
      x-synonyms:
      - fellowship
      - referenda
      - governance
      - scan
      - referendums
      - referendum
      - vote
      - treasury
      - council
  /api/scan/fellowship/statistics:
    post:
      consumes:
      - application/json
      description: 'Returns aggregated statistics for fellowship referenda.

        This API only supports networks with FellowshipReferenda frame'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  $ref: '#/definitions/subscan_internal_model.FellowshipReferendumStatisticsJson'
              type: object
      summary: Get fellowship referendum statistics
      tags:
      - Governance
      x-synonyms:
      - fellowship
      - referendum
      - statistics
      - governance
      - scan
      - vote
      - treasury
      - council
  /api/scan/fellowship/tracks:
    post:
      consumes:
      - application/json
      description: 'Returns the available fellowship referendum tracks for the current network.

        This API only supports networks with FellowshipReferenda frame'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  additionalProperties:
                    $ref: '#/definitions/subscan_libs_substrate_storage.ReferendumTracksInfo'
                  type: object
              type: object
      summary: List fellowship referendum tracks
      tags:
      - Governance
      x-synonyms:
      - fellowship
      - referendum
      - tracks
      - governance
      - scan
      - vote
      - treasury
      - council
  /api/scan/fellowship/votes:
    post:
      consumes:
      - application/json
      description: 'Returns paginated vote records for one fellowship referendum.

        This API only supports networks with FellowshipReferenda frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.fellowshipReferendumVotesParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    count:
                      type: integer
                    list:
                      items:
                        $ref: '#/definitions/subscan_internal_model.ConvictionVoteJson'
                      type: array
                  type: object
              type: object
      summary: List fellowship referendum votes
      tags:
      - Governance
      x-synonyms:
      - fellowship
      - referendum
      - votes
      - governance
      - scan
      - vote
      - treasury
      - council
  /api/scan/governance/desc:
    post:
      consumes:
      - application/json
      description: Returns external governance posts and comments for the specified item. This endpoint is powered by Subsquare.
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.governanceDescParam'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  $ref: '#/definitions/subscan_libs_opengovResource.PostData'
              type: object
      summary: Get external discussion for a governance item
      tags:
      - Governance
      x-synonyms:
      - more
      - information
      - about
      - governance
      - scan
      - desc
      - referendum
      - vote
      - treasury
      - council
  /api/scan/preimage/details:
    post:
      consumes:
      - application/json
      description: 'Returns details for one governance preimage by hash.

        This API only supports networks with preimage frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.preimageDetailsParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  $ref: '#/definitions/subscan_internal_model.PreimageJson'
              type: object
      summary: Get governance preimage details
      tags:
      - Governance
      x-synonyms:
      - preimage
      - governance
      - scan
      - referendum
      - vote
      - treasury
      - council
  /api/scan/preimage/list:
    post:
      consumes:
      - application/json
      description: 'Returns a paginated preimage list with optional status and source filters.

        This API only supports networks with preimage frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.preimageListParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    count:
                      type: integer
                    list:
                      items:
                        $ref: '#/definitions/subscan_internal_model.PreimageSampleJson'
                      type: array
                  type: object
              type: object
      summary: List governance preimages
      tags:
      - Governance
      x-synonyms:
      - preimage
      - governance
      - scan
      - referendum
      - vote
      - treasury
      - council
  /api/scan/referenda/delegate:
    post:
      consumes:
      - application/json
      description: 'Returns delegation details for one account in the referenda system.

        This API only supports networks with referenda frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.referendumDelegateDetailsParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  $ref: '#/definitions/subscan_internal_model.ReferendumDelegateDetailsJson'
              type: object
      summary: Get referendum delegator details
      tags:
      - Governance
      x-synonyms:
      - referendum
      - delegator
      - governance
      - scan
      - referenda
      - delegate
      - vote
      - treasury
      - council
  /api/scan/referenda/delegate/votes:
    post:
      consumes:
      - application/json
      description: 'Returns paginated referendum vote records for one delegator or delegate account.

        This API only supports networks with referenda frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.referendumDelegateVotesParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    count:
                      type: integer
                    list:
                      items:
                        $ref: '#/definitions/subscan_internal_model.ConvictionDelegateVoteJson'
                      type: array
                  type: object
              type: object
      summary: List referendum delegator votes
      tags:
      - Governance
      x-synonyms:
      - referendum
      - delegator
      - votes
      - governance
      - scan
      - referenda
      - delegate
      - vote
      - treasury
      - council
  /api/scan/referenda/delegates:
    post:
      consumes:
      - application/json
      description: 'Returns paginated delegation relationships for one account, including active and delegator/delegate filters.

        This API only supports networks with referenda frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.referendumDelegateParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    count:
                      type: integer
                    list:
                      items:
                        $ref: '#/definitions/subscan_internal_model.ReferendumDelegateJson'
                      type: array
                  type: object
              type: object
      summary: List referendum delegation relationships
      tags:
      - Governance
      x-synonyms:
      - referendum
      - delegated
      - delegator
      - governance
      - scan
      - referenda
      - delegates
      - vote
      - treasury
      - council
  /api/scan/referenda/referendum:
    post:
      consumes:
      - application/json
      description: 'Returns details for one OpenGov referendum.

        This API only supports networks with referenda frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.referendumV2Params'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  $ref: '#/definitions/subscan_internal_model.ReferendumV2Json'
              type: object
      summary: Get OpenGov referendum details
      tags:
      - Governance
      x-synonyms:
      - referenda
      - governance
      - scan
      - referendum
      - vote
      - treasury
      - council
  /api/scan/referenda/referendums:
    post:
      consumes:
      - application/json
      description: 'Returns a paginated referenda list with origin, status, account, and call filters.

        This API only supports networks with referenda frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.referendumsV2Params'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    count:
                      type: integer
                    list:
                      items:
                        $ref: '#/definitions/subscan_internal_model.ReferendumV2SampleJson'
                      type: array
                  type: object
              type: object
      summary: List OpenGov referenda
      tags:
      - Governance
      x-synonyms:
      - referenda
      - governance
      - scan
      - referendums
      - referendum
      - vote
      - treasury
      - council
  /api/scan/referenda/statistics:
    post:
      consumes:
      - application/json
      description: 'Returns aggregated referendum statistics for supported democracy or referenda networks.

        This API only supports networks with referenda/democracy frame'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  $ref: '#/definitions/subscan_internal_model.ReferendumStatisticsJson'
              type: object
      summary: Get referendum statistics
      tags:
      - Governance
      x-synonyms:
      - referendum
      - statistics
      - governance
      - scan
      - referenda
      - vote
      - treasury
      - council
  /api/scan/referenda/tracks:
    post:
      consumes:
      - application/json
      description: 'Returns the available referendum tracks for the current OpenGov network.

        This API only supports networks with referenda frame'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  additionalProperties:
                    $ref: '#/definitions/subscan_libs_substrate_storage.ReferendumTracksInfo'
                  type: object
              type: object
      summary: List referendum tracks
      tags:
      - Governance
      x-synonyms:
      - referendum
      - tracks
      - governance
      - scan
      - referenda
      - vote
      - treasury
      - council
  /api/scan/referenda/votes:
    post:
      consumes:
      - application/json
      description: 'Returns paginated vote records for an OpenGov referendum or account.

        This API only supports networks with referenda frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.referendaVotesV2Params'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    count:
                      type: integer
                    list:
                      items:
                        $ref: '#/definitions/subscan_internal_model.ConvictionVoteJson'
                      type: array
                  type: object
              type: object
      summary: List OpenGov referendum votes
      tags:
      - Governance
      x-synonyms:
      - referenda
      - votes
      - governance
      - scan
      - referendum
      - vote
      - treasury
      - council
  /api/scan/techcomm/proposal:
    post:
      consumes:
      - application/json
      description: 'Returns details for one technical-committee proposal.

        This API only supports networks with technicalCommittee frame'
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_server_http.techcommProposalParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            allOf:
            - $ref: '#/definitions/internal_server_http.J'
            - properties:
                data:
                  properties:
                    info:
                      $ref: '#/definitions/subscan_internal_model.TechcommProposalJson'
                  type: object
              type: object
      summary: Get techn

# --- truncated at 32 KB (86 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/polkadot/refs/heads/main/openapi/polkadot-governance-api-openapi.yml