githubEdit

Polls

/polls

Create a poll

POST https://api.coodo.xyz/polls

Headers

Name
Type
Description

Authorization*

String

Bearer token

Request Body

Name
Type
Description

buttons*

Array

Buttons array

anonymous*

Boolean

Hide users ids on results

multiples*

Boolean

Multiples choices

choices_max*

Integer

How many options users can select

hide_results*

Boolean

Hide results while the poll is in progress

title*

String

Poll title

timestamp_close

Integer

Set an end date

description

String

Poll description

channelID

String

Discord channel ID

image

String

Poll image

guild*

Object

Guild id and name

/polls/:id

Find a poll by ID

GET https://api.coodo.xyz/polls/:id

Path Parameters

Name
Type
Description

id*

String

ID of the poll to find

Headers

Name
Type
Description

Authorization

String

Bearer token

Find poll results by ID

GET https://api.coodo.xyz/polls/:id/results

Path Parameters

Name
Type
Description

id*

String

ID of the poll to find

Headers

Name
Type
Description

Authorization*

String

Bearer token

Update a poll by ID

PUT https://api.coodo.xyz/polls/:id

Path Parameters

Name
Type
Description

id*

String

ID of the poll to update

Headers

Name
Type
Description

Authorization*

String

Bearer token

Request Body

Name
Type
Description

ended

Boolean

Poll state

title

String

Poll title

timestamp_close

Integer

Set an end date

description

String

Poll description

image

String

Poll image

Delete a poll by ID

DELETE https://api.coodo.xyz/polls/:id

Path Parameters

Name
Type
Description

id*

String

ID of the poll to delete

Headers

Name
Type
Description

Authorization*

String

Bearer token

/polls/:id/vote/:choiceId

Vote for a poll using ID

PUT https://api.coodo.xyz/polls/:id/vote/:choiceId

Path Parameters

Name
Type
Description

id*

String

ID of the user to delete

choiceId*

String

ID of the choice to vote

Headers

Name
Type
Description

Authorization*

String

Bearer token

Last updated