# API endpoint for voting

**URL:** <https://meta.discourse.org/t/api-endpoint-for-voting/64754>\
**Category:** Development\
**Tags:** polls, rest-api\
**Created:** [June 19, 2017, 3:03pm UTC](https://meta.discourse.org/t/api-endpoint-for-voting/64754 "2017-06-19T15:03:28Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![drzraf](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@drzraf](https://meta.discourse.org/u/drzraf)\
**Post date:** [June 19, 2017, 3:03pm UTC](https://meta.discourse.org/t/api-endpoint-for-voting/64754/1 "2017-06-19T15:03:28Z")

</div>

That would open the vote feature to mobile user, external app’, …

[The API seems to lack a “votes” definition](https://github.com/discourse/discourse_api_docs/tree/master/definitions)  
[The Poll::vote](https://github.com/discourse/discourse/blob/master/plugins/poll/plugin.rb#L35) and [add\_anonymous\_votes function](https://github.com/discourse/discourse/blob/master/plugins/poll/spec/helpers.rb) is already there, but lack a [controller](https://github.com/discourse/discourse/tree/master/app/controllers) but since votes are a plugin, the issue may have to be that [plugins get the ability open API endpoints](https://github.com/angusmcleod/discourse-ratings/issues/9)

---

_[View the full topic](https://meta.discourse.org/t/api-endpoint-for-voting/64754)._
