Build a custom feedback board on the REST API
Which key goes where, how to read requests and cast votes, and how to cache and retry safely.
Free for one project and 100 votes. Paid plans start with a 14 day trial, no card.
API key from server, embed key from page
Both travel in the X-API-Key header. The one you pick depends on where your code runs.
The embed key is public by design. The API key is a secret.
The API key opens every route, including the two revenue routes that show what each voter pays. It needs Free or Pro, not Lite. Keep it on a server. Anything shipped in a page or an app can be read out of it.
The embed key begins vf_pk_, works on any plan and opens every route except the two revenue ones. Use it in a web page or an app. Both live under Share & Embed, and the API key is shown in full once, when you press Create Key.
The base URL is https://app.votefirst.app/api/v3, and your project slug is the name in your board's address.
Read the board
Reads are anonymous. List the requests with a status, a search word, a sort order and a page size.
Reading needs only the key, and every list can be filtered.
Every response has the same three keys: data, meta and error.
A value that does not apply is null, never missing, so one decoder serves every route. A list fills meta with page, per_page, total, total_pages and has_more. A failure fills error with a code you can branch on, a message written for a person and the field at fault.
The list route takes sort, board, column, scope, tag, status, q, page and per_page. A request's status is one of open, planned, in_progress, done, denied or archived, and a client should tolerate a new member being added later instead of failing to decode it. Timestamps are RFC 3339 in UTC.
curl "https://app.votefirst.app/api/v3/projects/your-project-slug/features?per_page=5" \
-H "X-API-Key: $VOTEFIRST_KEY"const base = 'https://app.votefirst.app/api/v3/projects/your-project-slug';
const headers = { 'X-API-Key': process.env.VOTEFIRST_KEY };
const { data, meta, error } = await fetch(base + '/features?per_page=5', { headers })
.then((r) => r.json());
if (error) throw new Error(error.code + ': ' + error.message);
console.log(meta.total, 'requests;', data.length, 'on this page');Mint a voter
Call the identity route once and keep the anon_token it returns. Send it as X-VF-Anon on every later write.
A write has to belong to somebody, so mint a voter first.
Calling it on every start is fine. A token you present is renewed, not replaced.
The first call answers 201 with a voter_id, a generated display name and the anon_token. Presenting a token you already hold answers 200 and renews it, so a client that asks on every launch keeps its voter's history.
If you already sign your users in, send that signed token as X-VF-Token instead and the vote belongs to the real person. It must carry an expiry claim, and it outranks the anonymous token when both are sent.
const write = {
'X-API-Key': process.env.VOTEFIRST_KEY,
'Content-Type': 'application/json',
};
const id = await fetch(base + '/identity', { method: 'POST', headers: write })
.then((r) => r.json());
const anon = id.data.anon_token;
await fetch(base + '/features/123/vote', {
method: 'POST',
headers: { ...write, 'X-VF-Anon': anon, 'Idempotency-Key': 'vote-123-' + id.data.voter_id },
});Vote and suggest
POST to a request's vote route to vote and DELETE the same route to withdraw it. POST to the features route to suggest.
Vote, withdraw and suggest are one request each.
A heading is up to 254 characters and a description up to 2,000, as plain text.
Withdrawing a vote you never cast answers not_found with a 409, because the thing missing is the vote and not the address. A suggestion lands in the roadmap's review queue, or in the first column of a custom board when you name one with board.
Comments work the same way. You can list a request's comments, post one, like a comment and delete your own. The API sends what a board shows publicly and nothing else, apart from the revenue routes.
Fast and safe
Every read carries an ETag. Send it back as If-None-Match and an unchanged resource answers 304 with no body.
Cache reads, retry writes with a key, and watch the headers.
Reads also carry Cache-Control: private, max-age=60.
Every write accepts an Idempotency-Key of your choosing, up to 200 characters. Replaying a write under the same key returns the original response, marked Idempotent-Replay: true, and creates nothing new. Records are kept for 24 hours, and a write still in flight under that key answers 409 with a Retry-After. A retry after a dropped connection cannot count a vote twice.
Per API key you get 1,200 reads and 300 writes a minute. Over either, the request answers 429 and names the wait in Retry-After. A body over one megabyte is refused with 413. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, so you can slow down before you are stopped. The embed key has its own, larger budgets: 3,000 reads and 600 writes a minute.
Every response also carries X-Request-Id, and it echoes one you send, which lets you point at the exact request that failed. X-API-Version is 3.
When not to
The embed script draws a roadmap, a board, a changelog and a vote button in a few lines, and it does more for less work.
If you only need a board on a page, skip the API.
Build on the API only when the interface must be your own.
The API makes you handle the empty state, the loading state, sign in, errors and every pixel. That is the point when the board has to feel like your product, and it is a cost when it does not.
A common split works well: use the embed script for the public roadmap and changelog, and use the API for the one screen where your design needs full control.
What you get from the API
Your own interface
Draw the board exactly as your product draws everything else.
Safe retries
An idempotency key means a dropped connection never doubles a vote.
Numbers you can plan on
Fixed budgets in every response header, and a code you can branch on for every error.
From key to first vote in four steps
Four requests, all of them in curl.
Make a key
Press Create Key under Share & Embed and store it in an environment variable.
Read a list
Call the features route with your slug and check data and meta.
Mint a voter
Post to the identity route and store the anon_token it returns.
Cast a vote
Post to a request's vote route with the token and an Idempotency-Key.
What each error means and what to do
Every failure carries a stable code, a message written for a person and, for a validation failure, the field it was about. Branch on the code and show the message.
The table gives the status of each of the eighteen codes and the move that fits it.
| Code | Status | What to do |
|---|---|---|
| missing_key | 401 | Send the key in the X-API-Key header |
| invalid_key | 401 | Copy the current key, since a regenerated one ends the old copy |
| key_wrong_project | 403 | Use the key of the project named in the path |
| origin_not_allowed | 403 | Add the site to the allowed origins of the embed key |
| identity_required | 401 | Mint a voter before the write |
| identity_invalid | 401 | Mint a new voter |
| not_allowed | 403 | Read the board's settings, such as a column that takes no votes |
| voter_banned | 403 | Hide comments and suggestions for this voter, who can still read, vote and like |
| board_full | 403 | The owner needs a paid plan before the board takes new votes and requests |
| board_offline | 403 | The owner needs to pick a plan before anything is served |
| not_found | 404 | Show an empty state, since a private project answers this way too |
| already_exists | 409 | Treat the write as done, as with a second vote |
| idempotency_in_progress | 409 | Wait a second and send the same request again |
| idempotency_mismatch | 409 | Use a new key for a new request |
| too_large | 413 | Send a body under one megabyte |
| validation_failed | 422 | Show the message beside the field named in error.field |
| rate_limited | 429 | Wait the seconds in Retry-After |
| internal | 500 | Retry the request, which the API marks as safe to repeat |
What to know before you build it
- The API key needs Pro, Lifetime or the Free plan. A key made on Lite is refused with not_allowed.
- A status can gain new members later, so decode it leniently.
- Idempotency records last 24 hours, and a request body is capped at one megabyte.
- There are no outgoing webhooks, so poll the list route and use the ETag to keep it cheap.
What developers ask about the REST API
Which plan includes the API?
Pro, Lifetime and Free, which holds everything in Pro for one project and 100 votes. Lite has no API access.
Can it be called from a browser or an app?
Yes, with the embed key, which is public by design. Never ship the API key.
How does a vote come from a real signed in user?
Send your signed token as X-VF-Token. It needs an expiry claim and outranks the anonymous token.
What are the rate limits?
Per API key, 1,200 reads and 300 writes a minute. Over a limit the request answers 429 with a Retry-After.
How is a write retried safely?
Send an Idempotency-Key. A replay returns the original response and creates nothing new, for 24 hours.
Is there an OpenAPI file?
Yes. The description at /api/v3/openapi.json is what the reference and a client generator both read.
Does the API send revenue figures?
Two routes do, and only the API key opens them. The embed key is refused.
What does it cost?
Free holds one project and 100 votes. Past that, the REST API needs Pro at $39/mo, which opens with a 14 day trial and no card. Lite at $9/mo has no API.
More ways to add a board
Related pages for building on the board.
The feedback board API
Single sign on
Add voting to a React app
Add a feedback board to a Ghost site
A board for a Squarespace site
A widget in Next.js
Tools with a REST API
Tools with single sign on
Show 31 more
App Store reviews are not a feedback channel
Import feature requests from a spreadsheet or CSV
Use tags to sort feature requests
The API reference
The headless client
The REST API docs
Feedback tool footprint statistics, 40 numbers
OpenAPI file statistics, 40 numbers
Marketing page file statistics, 40 numbers
Vote and survey component file statistics, 40 numbers
Database schema file statistics, 40 numbers
Webhook handler file statistics, 40 numbers
Sign in code file statistics, 40 numbers
Framework config file statistics, 40 numbers
CI workflow file statistics, 40 numbers
Error page file statistics, 40 numbers
Onboarding screen file statistics, 40 numbers
Settings screen file statistics, 40 numbers
Search box file statistics, 40 numbers
Empty state file statistics, 40 numbers
Toast file statistics, 40 numbers
Dashboard file statistics, 40 numbers
Notification file statistics, 40 numbers
Billing file statistics, 40 numbers
Analytics file statistics, 40 numbers
Checkout file statistics, 40 numbers
Invite file statistics, 40 numbers
Comment file statistics, 40 numbers
Pagination file statistics, 40 numbers
Rating file statistics, 40 numbers
FAQ file statistics, 40 numbers
Build it your way
Start free: one project, 100 votes. When a custom board on the REST API outgrows it, Pro is $39/mo after a 14 day trial with no card. Lite at $9/mo has no API.