Adding tags to tickets without overwriting existing tags

Have more questions? Submit a request

12 Comments

  • Nathan McClain
    Comment actions Permalink

    Good Morning,

    I have been trying to add an “ignore” tag to a set of tickets using the articles PUT request:

    curl https://cdp.zendesk.com/api/v2/tickets/update_many.json?ids=79,80,81 ^
    -d '{"ticket": {"additional_tags":["ignore"]}}' ^
    -H "Comtent-Type: application/json" ^
    -v -u {my_admin_email}:{my_admin_password} -X PUT

    Unfortunately, when I run the request I receive the following error:

    {"error":"ParameterMissing","description":"Parameter Both ticket ids and arguments must be present is required"}* Connection #0 to host cdp.zendesk.com left intact
    curl: (3) [globbing] nested brace in column 18

    Any ideas on what I am doing incorrectly?

    Thanks much,

    0
  • Nathan McClain
    Comment actions Permalink

    Slight update to above - as it seems that closed tickets cannot have a tag added yet I ran this on an open ticket as well and received the same error.

    0
  • Charles Nadeau
    Comment actions Permalink

    Looks like you're using curl in Windows. The Windows command prompt doesn't support single quotes but curl uses them for data payloads in requests. One solution is to move the JSON to a file and import it into the curl statement. See:

    https://support.zendesk.com/hc/en-us/articles/203691436#toc_2

    0
  • Nathan McClain
    Comment actions Permalink

    Thank you very Charles!

    0
  • Jason Littrell
    Comment actions Permalink

    I wanted to hug my monitor when I saw this. Thank you for writing up this article!


    At the risk of sounding ungrateful, is there an equivalent for collaborators in the works?


    Side note: I believe curl on Windows will accept a json payload surrounded by double quotes as long as the quotes within the json are escaped with a backslash, i.e.:


     -d "{ \"ticket\": { \"subject\" ... }}" ^

    Much easier to load a file from the directory, though.

    0
  • Josh Hunsaker
    Comment actions Permalink

    This is fantastic! Does this same functionality exist to add tags to end users?

    0
  • Sergio Anarte
    Comment actions Permalink

    Hi Nathan and the rest,

    We're having the same issue while using the update_many.json end point.

     

    {"error":"ParameterMissing","description":"Parameter Both ticket ids and arguments must be present is required"}

     

    But we have changed the quotes and it didn't work. how did you solve it at the end?

    Thank you all

    0
  • Hector Latorre
    Comment actions Permalink

    Hi Sergio, sorry for the late response but I had the same issue and google directed me to this thread.

    Make sure to pass 'Content-Type': 'application/json' header to your request, that solved our issue.

     

    Cheers.

    0
  • Aleksey Kislov
    Comment actions Permalink

    Does this work with Update Ticket endpoint?

    0
  • JJ
    Comment actions Permalink

    Hello Aleksey,

    Please note this functions only for the Update Many endpoint.

    Have a great day and stay safe!

    0
  • Mary Aydinyan
    Comment actions Permalink

    Hiii, how can we check if the tag exist or not 

     

    0
  • Kharlo
    Comment actions Permalink

    Hello Mary,

    Thanks for reaching out! You can view your tags by navigating to admin > tags. The Tags admin page displays the top 100 most-used tags for the past two months. If the tag you're looking for isn't on the list, you can search for tickets by tag. You can also create a view to see all tickets based on a specific tag.

    There isn't a clear way to list all tags that exists unfortunately

    Kharlo | Customer Advocate
    support@zendesk.com

    0

Please sign in to leave a comment.

Powered by Zendesk