Skip to main content
Posts

Add a voter to a post

Adds a voter (upvote) to a post.

POST
/v2/posts/{id}/voters

Voter Identification

To add a vote on behalf of a user, provide one or more identification fields:

  • id - Featurebase user ID
  • userId - External SSO user ID from your system
  • email - User's email address
  • name - Display name (used when creating a new user)
  • profilePicture - Profile picture URL (used when creating a new user)

Resolution priority: id > userId > email > authenticated user

If no fields are provided, the authenticated user's vote is added.

If the user doesn't exist, a new customer will be created with the provided information. An id alone that is not a customer or teammate of your organization (a lead's id included) answers 404 and adds no vote.

Idempotency

If the user has already voted on this post, the request succeeds but no duplicate vote is added.

Response

Returns a confirmation object with:

  • object - Always "voter"
  • added - Always true
  • id - The voter's user ID
  • postId - The post ID the vote was added to

Permissions

Requires member-level access or higher.

Authorizationstringheaderrequired

API key as Bearer token. Use: Authorization: Bearer sk_...

idstringrequired

Post unique identifier

Example: 507f1f77bcf86cd799439011
Featurebase-Versionenum<string>header

API version for this request. Defaults to your organization's configured API version if not specified.

Available options: 2026-09-03.pulsar, 2026-08-19.orbit, 2026-01-01.nova, 2025-12-12.clover
Example: 2026-09-03.pulsar

Body

application/json
emailstring

Voter email (used to find or create user)

Example: john@example.com
idstring

Featurebase user ID to add as voter

Example: 507f1f77bcf86cd799439011
namestring

Voter display name (used when creating new user)

Maximum string length: 255
Example: John Doe
profilePicturestring

Voter profile picture URL

Example: https://example.com/avatar.png
userIdstring

External user ID from your system (matched via SSO)

Maximum string length: 255
Example: usr_12345

Response

application/json

Created

addedenum<boolean>required

Indicates the voter was added

Available options: true
Example: true
idstringrequired

Voter unique identifier

Example: 507f1f77bcf86cd799439011
objectenum<string>required

Object type identifier

Available options: voter
Example: voter
postIdstringrequired

Post ID the voter was added to

Example: 507f1f77bcf86cd799439012