Skip to main content
PATCH
/
v1
/
tickets
/
{id}
/
unarchive
cURL
curl --request PATCH \
  --url https://platform.thena.ai/v1/tickets/{id}/unarchive \
  --header 'x-api-key: <api-key>'
import requests

url = "https://platform.thena.ai/v1/tickets/{id}/unarchive"

headers = {"x-api-key": "<api-key>"}

response = requests.patch(url, headers=headers)

print(response.text)
const options = {method: 'PATCH', headers: {'x-api-key': '<api-key>'}};

fetch('https://platform.thena.ai/v1/tickets/{id}/unarchive', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.thena.ai/v1/tickets/{id}/unarchive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://platform.thena.ai/v1/tickets/{id}/unarchive"

req, _ := http.NewRequest("PATCH", url, nil)

req.Header.Add("x-api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://platform.thena.ai/v1/tickets/{id}/unarchive")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://platform.thena.ai/v1/tickets/{id}/unarchive")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "status": true,
  "message": "Success",
  "timestamp": "2024-01-01T00:00:00.000Z",
  "data": {
    "id": "<string>",
    "ticketIdentifier": "<string>",
    "title": "<string>",
    "ticketId": 123,
    "description": "<string>",
    "source": "<string>",
    "accountId": "<string>",
    "status": "<string>",
    "statusId": "<string>",
    "priority": "<string>",
    "priorityId": "<string>",
    "storyPoints": 123,
    "account": "<string>",
    "teamId": "<string>",
    "teamName": "<string>",
    "teamIdentifier": "<string>",
    "subTeamId": "<string>",
    "subTeamName": "<string>",
    "subTeamIdentifier": "<string>",
    "isPrivate": true,
    "typeId": "<string>",
    "type": "<string>",
    "assignedAgent": "<string>",
    "assignedAgentId": "<string>",
    "assignedAgentEmail": "<string>",
    "assignedAgentAvatar": "<string>",
    "requestorEmail": "<string>",
    "customerContactId": "<string>",
    "customerContactFirstName": "<string>",
    "customerContactLastName": "<string>",
    "customerContactEmail": "<string>",
    "submitterEmail": "<string>",
    "customFieldValues": [
      "<string>"
    ],
    "deletedAt": "<string>",
    "archivedAt": "<string>",
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "formId": "<string>",
    "aiGeneratedTitle": "<string>",
    "aiGeneratedSummary": "<string>",
    "sentiment": "<string>",
    "sentimentId": "<string>",
    "teamIcon": "<string>",
    "teamColor": "<string>",
    "teamOrganizationId": "<string>",
    "teamParentTeamId": "<string>",
    "teamDescription": "<string>",
    "teamConfigurationId": "<string>",
    "teamTeamOwnerId": "<string>",
    "teamIsActive": true,
    "teamIsPrivate": true,
    "teamCreatedAt": "<string>",
    "teamUpdatedAt": "<string>",
    "teamDeletedAt": "<string>",
    "teamArchivedAt": "<string>",
    "subTeamIcon": "<string>",
    "subTeamColor": "<string>",
    "subTeamOrganizationId": "<string>",
    "subTeamParentTeamId": "<string>",
    "subTeamDescription": "<string>",
    "subTeamConfigurationId": "<string>",
    "subTeamTeamOwnerId": "<string>",
    "subTeamIsActive": true,
    "subTeamIsPrivate": true,
    "subTeamCreatedAt": "<string>",
    "subTeamUpdatedAt": "<string>",
    "subTeamDeletedAt": "<string>",
    "subTeamArchivedAt": "<string>",
    "lastCustomerComment": "<string>",
    "lastVendorComment": "<string>",
    "lastComment": "<string>",
    "isEscalated": true,
    "closedAt": "<string>",
    "closedBy": "<string>",
    "closedById": "<string>",
    "closedByEmail": "<string>"
  }
}
{
"statusCode": 400,
"error": "Bad Request",
"message": "Ticket is not archived!"
}
{
"statusCode": 403,
"error": "Forbidden",
"message": "You are not authorized to unarchive this ticket!"
}
{
"statusCode": 404,
"error": "Not Found",
"message": "Ticket not found!"
}
{
"statusCode": 500,
"error": "Internal Server Error",
"message": "Failed to unarchive ticket, please try again later!"
}

Authorizations

x-api-key
string
header
required

Enter your API key

Path Parameters

id
string
required

Response

Operation successful

status
boolean
default:true
required

The status of the response

message
string
default:Success
required

The message of the response

timestamp
string<date-time>
default:2024-01-01T00:00:00.000Z
required

The timestamp of the response

data
object
required

The response for create/update/delete ticket operations