Skip to content

Vote on updates

Records an up or downvote for an update. This endpoint powers the reactions on the embeddable release notes widget: you generally don’t need to call it directly, but it’s documented here for completeness and for custom widget integrations.

POST /api/projects/{project_id}/updates/{update_id}/vote

None. This endpoint is public so the widget can record votes from a visitor’s browser without exposing an API token.

ParameterTypeDescription
project_idstringThe project the update belongs to.
update_idstringThe update being voted on.

Send a JSON body identifying the voter and the reaction.

FieldTypeRequiredDescription
tracking_target_idstringYesIdentifier for the voter (e.g. a per-visitor ID your widget generates), used to attribute the vote.
reactionstringYesThe vote to record. One of upvote or downvote.

A voter (identified by tracking_target_id) has at most one active reaction per update:

  • Sending a new reaction records it.
  • Sending the same reaction again clears it (a toggle). The response then reports reaction: null.
  • Sending the opposite reaction switches the vote to the new value.
Terminal window
curl -X POST \
https://updatify.io/api/projects/PROJECT_ID/updates/UPDATE_ID/vote \
-H "Content-Type: application/json" \
-d '{"tracking_target_id": "visitor-12345", "reaction": "upvote"}'

200 OK on success. reaction echoes the recorded vote, or is null when the vote was toggled off:

{
"success": true,
"update_id": "b3f1c2d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"reaction": "upvote"
}

The API responds with 422 Unprocessable Entity if the request can’t be processed.

If tracking_target_id is missing or blank:

{
"success": false,
"errors": { "tracking_target_id": ["can't be blank"] }
}

If reaction is missing or not a supported value:

{
"success": false,
"errors": { "reaction": ["must be one of: upvote, downvote"] }
}

If the update can’t be found for the given project:

{
"success": false,
"errors": "Update not found"
}

If voting is disabled for the project (see voting_enabled):

{
"success": false,
"errors": "Voting is disabled for this project"
}