Forums/Community/Zendesk API

Answered

HTML Allowed in Titles of Entries created through API?

Jason Heidecker
asked this on August 06, 2010 10:52

Trying to create entries in a forum through the API.  Doesn't seem to allow HTML in the 'body' of the entry.  Can someone confirm this is not possible?

 

Comments

User photo
Benni
hasoffers

Post HTML via the API to create a forum entry doesn't work when trying to post code. I've wrapped the HTML code with <pre><code> </code></pre> and Zendesk still renders the HTML. It doesn't work like regular formatting and I'm trying to figure it out. Any thoughts?

November 27, 2011 10:46
User photo
Steven Yan
Product Manager
Check Answer

@Jason, HTML is not allowed in the title of an entry.

@Benni, please see our new API documentation, this should be possible: http://developer.zendesk.com.

Here's an example:

curl https://yoursubdomain.zendesk.com/api/v2/topics.json \
-H "Content-Type: application/json" -v -u email:password -X POST \
-d '{"topic": {"forum_id": 79161, "title": "My Topic", "body":"<code>This is some code</code>", "topic_type": "articles", "access": "logged in users" }'
April 26, 2012 14:15
User photo
krishna
groupon

@Steven,  Just couple of questions:

(a) How a topic and a ticket differ?

(b) Can we use the same logic in ticket body to allow HTML tags ???

March 16, 2014 10:57