Poll REST API
Use Poll data and actions in your application through a secure HTTPS API.
Base URL
Send production requests to the following base URL. The API uses JSON for request and response bodies.
https://api.poll.funPublic feed and bet endpoints do not need a token. Account data and all write actions need an access token with the correct scope.
Authentication
Create a Personal Access Token in Poll settings. Send the token as a Bearer token.
curl https://api.poll.fun/api/user \
-H "Authorization: Bearer polld_xxxxx"Give each token only the scopes that the integration needs. See the authentication guide for scope and security details.
Choose an integration
TypeScript API client
Use typed methods in a Node.js, web, or server application.
Poll CLI
Use Poll from a terminal or a shell script.
Poll MCP server
Give an MCP client access to Poll tools with limited scopes.
Offers API
Post and take fixed-odds offers between friends. Poll signs the transactions.
Embed a Poll
Show a live Poll card on your site with one iframe. No token needed.
Errors
Check the HTTP status before you use a response. API errors include a short error message. The TypeScript client converts failed responses into PollApiError values with a status code and the original response.
import { PollApiError } from "@solworks/poll-api-client";
try {
await client.getAccount();
} catch (error) {
if (error instanceof PollApiError) {
console.error(error.statusCode, error.errorMessage);
}
}