Forums/Community/Zendesk API


API v2 ticket creation

Drew Benedetti
asked this on May 04, 2012 09:15

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.



User photo
Steven Yan
Product Manager

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

May 04, 2012 09:57
User photo
Steven Yan
Product Manager
Check Answer

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.

May 09, 2012 08:41
User photo
Benino Sager

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.

May 31, 2012 23:42
User photo
Ian Francis

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

June 01, 2012 08:57
User photo
John Rothfels

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?

July 13, 2012 10:50
User photo
Rob Eyre

I'd like this too

August 08, 2012 05:05
User photo
Zane Shannon

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.

September 07, 2012 17:35
User photo

@Zane (and @all) This issue has been resolved in the latest release of the requests.json endpoint. Learn more here:

September 10, 2012 10:09