# 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:** 6

<div class="post-metadata">

**Author:** ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)\
**Post date:** [June 19, 2017, 4:21pm UTC](https://meta.discourse.org/t/api-endpoint-for-voting/64754/6 "2017-06-19T16:21:30Z")

</div>

> [@drzraf](#):
>
> but lack a controller

The controller is inside of plugin.rb here:

> <https://github.com/discourse/discourse/blob/main/plugins/poll/plugin.rb#L181>

And the routes for it are here:

> <https://github.com/discourse/discourse/blob/main/plugins/poll/plugin.rb#L272>

> [@drzraf](#):
>
> Will that call require user’s token if anonymous voting is not allowed?

If anonymous voting is not allowed it should require a users token.

> [@Falco](#):
>
> Vote is a plugin, docs are only for core.

I’m thinking about adding the api endpoints for plugins as well to the api docs. I can just create a tag in the docs for each plugin that is added.

> [@drzraf](#):
>
> I couldn’t find it inside [http://docs.discourse.org/](http://docs.discourse.org/)

I’ll work on adding the poll endpoints to the docs. In the meantime though you can just open up the chrome inspector and go the networks xhr tab and view the requests as you make them.

---

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