API to allow setting the source code when creating an article

Answered

4 Comments

  • Ryan McGrew
    Zendesk Product Manager

    Hi @Ioannis,

    Apologies for the delay in my reply. Can you explain a little bit more about what you're trying to achieve? We have an Article API and the article body is an HTML string. Here's some documentation on the Create Article API. This might be a good starting point.

    Thanks!

    0
  • ioannis

    Hi Ryan,

    So, can the "body" parameter be html code?

    I would like to create an article using the API. The source code of the article should be:

    <iframe src="https://docs.google.com/gview?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>

    Can I just say "body" : "<iframe src="https://docs.google.com/gview?ur....." ?

    Thanks
    Ioannis

     

    0
  • Ryan McGrew
    Zendesk Product Manager

    Hi @Ioannis,

    Yes it is. You just need to enable Display Unsafe Content then you can update the article body with that HTML. Here's an example from my test Help Center with the HTML you've created.

    Thanks!

    0
  • ioannis

    That's great!
    Many thanks

    0

Please sign in to leave a comment.

Powered by Zendesk