Ir al contenido principal

SDKs and tools

There are two ways to integrate Vocdoni: the REST API documented here, and the lower-level TypeScript SDK. Pick the one that matches how much control you need.

There are two ways to integrate with Vocdoni: the documented REST API, and a lower-level TypeScript SDK for the voter's browser. Choose based on how much control you need - and combine them where it makes sense.

When to use the REST API

The SaaS REST API is the quickest path for most teams. It manages organizations, members, censuses, processes, and results, handles the protocol cryptography internally, and works from any language with an HTTP client. Use it when you want managed elections without operating protocol internals - it's what every page in this documentation targets, and it covers the entire server-side lifecycle from provisioning a tenant to reading a tally.

When to use the SDK

Casting a ballot is voter-facing cryptography: encoding the ballot, authenticating to the Credential Service Provider (CSP), and signing the vote transaction. That part runs client-side, in the voter's browser, via the TypeScript SDK. The SDK talks only to this REST API - it never reaches the chain directly - and is the other half of the casting flow described in Casting votes.

Reach for it when you build a custom voting client, or need fine-grained control over the authentication, ballot encoding, and vote-submission steps. The current SDK ships as small, tree-shakeable packages - @vocdoni/api-client (typed HTTP client) and @vocdoni/api-voting (CSP auth, ballot encoding, vote signing) - replacing the older monolithic @vocdoni/sdk.

One SDK for the whole integrator API

Beyond client-side casting, the TypeScript SDK is growing to cover all the API relevant to integrators - organization provisioning, members and groups, censuses, processes, results and quota - so you can drive the entire integration from typed TypeScript instead of raw HTTP. @vocdoni/api-client already wraps these endpoints; higher-level helpers are landing incrementally.

AI agent skills

If you build with an AI coding agent, Vocdoni publishes Agent Skills - focused guides the agent loads on demand so it writes correct Vocdoni code without guessing the API shapes. The ones most relevant here:

  • integrator-sdk - the SaaS-first flow: API client, CSP auth, vote relay, job polling and React providers. Currently in the integrator SDK repo, soon in the marketplace.
  • vocdoni-ballot-protocol - how a ballot encodes and how the results matrix aggregates per voting type.

They are packaged as a Claude Code plugin marketplace, and installable via npx for any client that reads a skills directory (Cursor, Cline, Zed and similar):

# Claude Code: add the marketplace, then install integrator-sdk once it lands
claude plugin marketplace add vocdoni/skills
claude plugin install integrator-sdk@vocdoni

# Any skills-directory client
npx @vocdoni/skills install

References and repositories