Add attachments when create tickets anonymously through API? | Community
Skip to main content

Add attachments when create tickets anonymously through API?

  • June 25, 2019
  • 8 replies
  • 0 views

Hi all, we allow anonymous users to create tickets through email. They can also add attachments. We'd like to do the same through API.

However, I don't see any documentation for this? You can add attachments (required authorization) then link them to the ticket later. Can I add the attachments at the same time of creating the ticket? Could someone please help?

8 replies

ZZ55
  • June 26, 2019

This is not something that I have done, but the article for attaching files via the API is here.

So this is a two stage process. First create the attachment by uploading a file. Then create the ticket with a comment that includes a the reference to the uploaded attachment.


  • Author
  • June 26, 2019

Yes, I am aware of the Attachment API, but it's only for agents and requires authentication. My question is how do anonymous users create attachment for their anonymous tickets?


Dan28
  • June 28, 2019

Hi Hung, 

End users are able to upload files which you can append to a comment with the API.  The Upload Files endpoint is allowed for end users only, where agents are the only ones that can use the Show Attachment endpoint.

The example does show the use of authentication, but you might be able to try to adjust the example without it and follow the logic show in the Requests API for anonymous users.


  • Author
  • July 2, 2019

It works. https://developer.zendesk.com/rest_api/docs/support/attachments#upload-files. Someone should probably update this documentation to explain that it allows anonymous upload of attachments for anonymous tickets. I would have thought it required authentication since the documentation only says "Allowed for End users". The ticket/request API clearly says that it allows anonymous users as well


  • October 28, 2019

Hi Hung Ho,

 

Can you please share with me about how did you attach the attachment while creating a Ticket?

383464955754

 

Thanks!


ZZ55
  • October 29, 2019

Jay

Our Moderator Thomas gives a detailed example here. Hope that helps.


  • October 30, 2019

Hi 13001560

 

This is for registered People.

 

I want to create new tickets by an anonymous(non-registered) user through API.

Here they are asking for email ID and Password which is for registered people.

Let me know if you have anything related to this?

 

Thank you,

Jay


  • November 12, 2019

Hi Jay,

You can do that by using the Requests API endpoint, which is open to anonymous users. Requests are an end-user's perspective on Tickets, with only limited data available. Here's a link to the relevant API docs: https://developer.zendesk.com/rest_api/docs/support/requests#create-request