fdback.iofdback.io

Set vote

Set the current user's vote on a feedback post. Send value: 1 to upvote or value: -1 to downvote when downvotes are enabled for the workspace. Calling this repeatedly with the same value is idempotent.

PUT
/posts/{id}/vote

Authorization

bearerAuth
AuthorizationBearer <token>

API key with sk_live_ or sk_test_ prefix. Create keys in your workspace settings.

In: header

Path Parameters

id*string

Post ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/posts/string/vote" \  -H "Content-Type: application/json" \  -d '{    "value": 1  }'
{
  "data": {
    "voted": true,
    "voteValue": -1,
    "votesCount": 0
  },
  "test": true
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "Missing required field: title",
    "status": 400
  }
}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid API key.",
    "status": 401
  }
}
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Too many requests. Please try again later.",
    "status": 429
  }
}