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

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [June 19, 2017, 3:09pm UTC](https://meta.discourse.org/t/api-endpoint-for-voting/64754/2 "2017-06-19T15:09:07Z")

</div>

Everything in Discourse has API support:

Vote:

```
curl 'https://meta.discourse.org/voting/vote' -X POST --data 'topic_id=51247'

```

Unvote:

```
curl 'https://meta.discourse.org/voting/unvote' -X POST --data 'topic_id=51247'

```

---

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