Stuck using v1 API to add a reply to a ticket

Stuck using v1 API to add a reply to a ticket

For our org, sometimes we will put a ticket on hold while we look into a fully reply/resolution to their query.

We will send the requester a brief reply along the lines of "Thanks for the information, we're looking into this and will reply asap".

Sometimes the requester will just send a quick "Thank you".

Now the ticket is still on hold, and it has the red envelope icon showing there is a new reply, however, there is no need for us to respond at this point.

If the requester now sends a follow-up with more details or another question, the status does not change and the red envelope icon stays red - there is no immediately obvious way to see that there has been an additional reply since their "Thank you" message.

As a workaround, we are looking to set up a quick script in a Custom Menu to send an email to our 'noreply' email address:
to: noreply@____.com
subject: "Mark as read"
description: "Marked the latest conversation as read."

This will then change the red envelope back to green, and will be a quick 2-click solution to then see when there are any actual replies to the ticket.

I happened to find this Custom Function from Dinesh a year ago:

This worked in a test, however, I can't map a Custom Function to a Custom Menu - only to Triggers or Schedules.

That seems to indicate that the v1 API to send this reply does work, and for me it's just a case of how to format this in Python to then add it into a Custom Menu.

Within this thread, there's a reply from Ryan with a solution:

Hi there, I'd like to report some good news. I couldn't find any documentation on the v1 API, but Dinesh is correct that it is still active if you know how to use it. It took me a lot of work, but I finally found out how to properly use the V1 API to add conversations. The details are as follows:

  1. The URL is https://{yourdomain}/sdpapi/request/{requestId}?TECHNICIAN_KEY={key}&format=json&OPERATION_NAME=REPLY_REQUEST
  2. You must post the data with the attribute INPUT_DATA =
    {
        operation: {
             details: {
                   to: "example@email.com",
                   cc: "example@email.com",
                   subject: "The email subject",
                   description:  "The body of the email"
              }
         }
I have tried something along these lines in Python, with:
  1. Update = requests.post("""https://URL/sdpapi/request/TICKETID&INPUT_DATA=input_data={"operation":{"details":{"to":"me@domain.com","subject":"Mark as read","description":"Marked the latest conversation as read."}}}&OPERATION_NAME=REPLY_REQUEST&format=json?TECHNICIAN_KEY=TECHKEY)

From this, I get a 404 response, and some garbled response text.

Also, if I just go to the page:

Then I get this error:


Any help would be appreciated.
              New to ADManager Plus?

                New to ADSelfService Plus?