3

API v2 ticket creation

When creating a ticket, it looks like the 'description' field is added as the body of the first comment to the ticket.

If I view the ticket on the Zendesk site, that comment is listed with the requester of the ticket as its author, as set when creating the ticket. However, when I pull the ticket's audits from the API, there's no 'author_id' field on the comment event, only on the audit as a whole. The user I authenticated as for the API is rightfully credited as the audit author for creation, but that leaves me unable to tell who wrote the comment!

Thanks for releasing this new API. I love the improved paging.

9 comments

  • 0

    Hey Drew, I'm going to escalate this as a ticket, I'd like to look into your specific ticket.  

  • 0

    For the interest of everyone else who may read this, this would have been handled using X-On-Behalf-Of in our API v1, where the authenticating user can impersonate a user to update the ticket as that user.  We will be adding a similar mechanism in v2.

    In general, the ticket comment author is never different than the creator of the audit.

  • 0

    Did this get fixed?

    I can't figure out how to add a comment to a ticket using the v2 api without the author being set to the admin account I'm logged in with.

  • 0

    I'm stuck on this one too, I can't pass the author_id through when the comment is created, it ignores it and defaults to the authenticated api user, plus audit trails (i.e. comment trails) are read-only so you can't go back and update it after  creation... Any news on the fix for this?... X-on-behalf-of used to work a treat

  • 0

    Our team would like to see this functionality as well; it's actually quite critical for what we want to do. Is there a timeline for introducing this to v2?

  • 0

    I'd like this too

  • 0

    When will this be addressed? We're going to have to switch away from Zendesk if posting comments for our users over the API isn't supported almost immediately.

  • 0

    @Zane (and @all) This issue has been resolved in the latest release of the requests.json endpoint. Learn more here: https://support.zendesk.com/forums/20635666-api-updates/entries/21964887

  • 0

    Can you tell me what it is that I am doing wrong? I have spent a while researching an playing around with these triggers this morning and I have hit a brick wall.

Please sign in to leave a comment.