HTML Allowed in Titles of Entries created through API?




  • Avatar

    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?

  • Avatar
    Steven Yan

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

    @Benni, please see our new API documentation, this should be possible:

    Here's an example:

    curl \
    -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" }'

  • Avatar

    @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 ???

Please sign in to leave a comment.

Powered by Zendesk