Attaching files to tickets via API

Have more questions? Submit a request

11 Comments

  • Clare Lo
    Comment actions Permalink

    Hello Chris,

    Can we attach other file formats to a ticket? For example, users can attach documents and videos to a ticket. 

    0
  • Phil
    Comment actions Permalink

    This resource is rather sparse! Might as well go straight to https://developer.zendesk.com/rest_api/docs/core/attachments#uploading-files :p

    0
  • Rebecca
    Comment actions Permalink

    Hi Clare- 

    You can use the upload attachment API to upload the same type of files as you can via the agent interface. 

    0
  • Vaishali
    Comment actions Permalink

    I am using attachment API to upload any files to create ticket.When I check ticket and download that attachemnt , it is not download.

    Note : filename like abc.png is in my system .

    const url = "https://fyttest.zendesk.com/api/v2/uploads.json?filename="+filename;

    Request json :

    {
    "attachment": {
    "size": size
    }
    };

     

    Ques : Is there anything missing in Request json fields?

    0
  • Dwight Bussman
    Comment actions Permalink

    Hi Vaishali,

    I'm afraid I'm not understanding your question. It looks like you've already reached out to support@zendesk.com with a very similar question. I'll see that someone reaches out to you on that ticket as we may need to get more clarification/examples to see what's going on here.

    Thanks,

    0
  • Ricardo Marquez
    Comment actions Permalink

    Does this work creating ticket as requester? because i am trying to do it and image is not showing on my support zendesk.

    {
      "ticket": {
        "comment":  { "body": "See screenshot.", "uploads":  ["vz7ll9ud8oofowy"] }
      }
    }

    0
  • Dwight Bussman
    Comment actions Permalink

    Hi Ricardo,

    The syntax you sent there looks correct to me! Is it possible that the upload-token has already been consumed? If it's already been used in a given ticket-comment, it's attached to that ticket and subsequent requests using that same token will not attach it to tickets. In that case, it should be possible to reference the attachment URL from the original comment, but this requires permission to access the original location.

    If you'd like us to look into your case more closely, please feel free to reach out to support@zendesk.com or I'd be happy to take this conversation into a ticket for privacy.

    0
  • Chinmay Narwane
    Comment actions Permalink

    Hi Folks,

    I am trying to post an attachment through API to a newly created ticket. I read all the material on the Support but still could not find how this can be done without an ID. 

    Can anyone please help ? My Use Case is as below.

    Get Comment and Attachment from DW 

    Create a ticket in Zendesk with Attachment

    Thanks in Advance,

    Chinmay

    0
  • Dylan Tragjasi
    Comment actions Permalink

    Hi Chinmay,

    It is currently only possible to include attachments to tickets via the API by first uploading the required attachment using the Uploading files API
    Once uploaded, you can use the resulting token ID to include this in any ticket where required.

    In your particular use case, you'd need to follow these steps for this to work:

    1. Get Comment and Attachment from DW 
    2. Upload attachment using the Upload Files API Endpoint
    3. Create a ticket in Zendesk with newly uploaded file

    It is not currently possible to create a ticket and upload a new file as an attachment in a single request.

    Hope this helps clarify!

    - Dylan

    0
  • Chinmay Narwane
    Comment actions Permalink

    Hi Dylan,

    Thank you for the quick response.

    Could you please share the syntax to upload a file followed by getting the token? I am new to this and I could not find anything where we can directly upload a file without ID and then get the token number ? 

    Thanks in advance.

    Chinmay

    0
  • Dylan Tragjasi
    Comment actions Permalink

    Hey Chinmay,

    I'm going to take this into a ticket and email you directly to help troubleshoot any issues you're currently having uploading files to then use as attachments. 

    Look out for an email from me shortly!

    - Dylan

    0

Please sign in to leave a comment.

Powered by Zendesk