Creating poll via API raw parameter markdown

(David Brookes) #1

I’m creating a post via POST request with the API which contains a raw parameter with markdown for a poll:

[poll name=color]\n- Green\n- Blue\n- Red\n[/poll]

However the newlines don’t work so the poll isn’t rendered into markdown correctly, output in the post:

[poll name=color]\
\n- Green\n- Blue\n- Red\n


I found Posting a poll via the API is not working which seems to suggest that it’s possible, just not sure how with a POST request? I’ve tried passing a skip_validations false but it doesn’t make a difference.


you would need to create a POST request against the /posts endpoint.

I just did one into a new topic using the following as the raw post details and worked fine:

[poll type=regular public=true]
* blue
* green
* yellow

Translated out to be the following

title:Test Poll
raw:[poll type=regular public=true]↵* blue↵* green↵* yellow↵[/poll]