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

5 Kommentare

  • Ahmed Zaid
    User Group Leader Community Moderator

    Hi Brook Davies,

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

    0
  • Brook Davies

    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
    User Group Leader Community Moderator

    Hi Brook Davies,

    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
  • Brook Davies

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

    0
  • Ahmed Zaid
    User Group Leader Community Moderator

    Glad I could help. All the best!

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.

Powered by Zendesk