Can not create a ticket with comments > html_body. The description field is required???

5 Comments

  • Ahmed Zaid

    Hi Clinton Tu,

    HTML is stripped from comment body. Use `html_body` instead. Refer to documentation here for more.

    0
  • Clinton Tu

    Hi Ahmed,

    There was an error in my  original post... the problem is that without description included I get an error that that field is required.

    0
  • Ahmed Zaid

    Hi Clinton Tu,

    Description gets populated by the first comment body or html_body. Did you make sure to include the comment within the "ticket" envelope?

    Here is my request that gets executed successfully:

    curl https://{subdomain}.zendesk.com/api/v2/tickets.json \
    -X POST \
    -d '{ "ticket": { "subject": "Test Subject", "comment": { "html_body": "<b>test</b>" } } }' \
    -H "Content-Type: application/json" \
    -u {user}/token:{token}

     

    0
  • Clinton Tu

    Your code worked... maybe I was using "body" and no "html_body".... hmmmm. Thanks Ahmed. You da man!!!!

    0
  • Ahmed Zaid

    Glad I could help. All the best!

    0

Please sign in to leave a comment.

Powered by Zendesk