> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.houseofapps.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.houseofapps.ai/_mcp/server.

# Update a ticket

PATCH https://api-dev.houseofapps.ai/v1/integrations/tickets/{ticket_ref}
Content-Type: application/json

Updates the fields you send on one ticket.

Reference: https://docs.houseofapps.ai/api-reference/overview/support/tickets/external-update-ticket-v-1-integrations-tickets-ticket-ref-patch

## Request

### Path parameters

- `ticket_ref` (string, required)

### Headers

- `licenseKey` (string, required)
- `appSecret` (string, required)

### Body (application/json)

This endpoint expects an UpdateTmTicketRequest.

- `title` (string, optional, nullable)
- `description` (string, optional, nullable)
- `stage_id` (string, optional, nullable)
- `priority` (enum, optional, nullable) — Ticket priority values.
  - Allowed values: `low`, `medium`, `high`, `urgent`
- `assignee_ids` (list of string, optional, nullable)
- `contact_id` (string, optional, nullable)
- `label_ids` (list of string, optional, nullable)
- `followers` (list of TmFollowerChange, optional, nullable) — Add / remove individual followers; the last action per user wins.
- `due_date` (date, optional, nullable)
- `gps` (map from string to any, optional, nullable)
- `custom_fields` (list of map from string to any, optional, nullable)
- `form_instances` (map from string to any, optional, nullable)

## Response

### 200

OK

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable success message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `data` (SuccessResponseData, optional, nullable) — Payload for this endpoint

## Errors

### 422 Unprocessable Entity Error

Unprocessable Entity

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

## Types

### TmFollowerChange

Add (``put``) or remove (``delete``) one follower, like Zendesk ``followers`` items.

- `user_id` (string, required)
- `action` (enum, optional) — Zendesk-style ``followers`` item action: add or remove one follower.
  - Allowed values: `put`, `delete`

### SuccessResponseData

Payload for this endpoint

- map from string to any
- list of any
- string
- double
- boolean

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "status": "success",
  "message": "Ticket updated successfully",
  "statusCode": 200,
  "code": "2000",
  "data": {
    "ticket_ref": "TCK-1001",
    "title": "Billing question"
  }
}
```

**SDK Code**

```python OK
import requests

url = "https://api-dev.houseofapps.ai/v1/integrations/tickets/ticket_ref"

payload = {}
headers = {
    "appSecret": "appSecret",
    "licenseKey": "licenseKey",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript OK
const url = 'https://api-dev.houseofapps.ai/v1/integrations/tickets/ticket_ref';
const options = {
  method: 'PATCH',
  headers: {
    appSecret: 'appSecret',
    licenseKey: 'licenseKey',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go OK
package main

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

func main() {

	url := "https://api-dev.houseofapps.ai/v1/integrations/tickets/ticket_ref"

	payload := strings.NewReader("{}")

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

	req.Header.Add("appSecret", "appSecret")
	req.Header.Add("licenseKey", "licenseKey")
	req.Header.Add("Content-Type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby OK
require 'uri'
require 'net/http'

url = URI("https://api-dev.houseofapps.ai/v1/integrations/tickets/ticket_ref")

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

request = Net::HTTP::Patch.new(url)
request["appSecret"] = 'appSecret'
request["licenseKey"] = 'licenseKey'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java OK
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api-dev.houseofapps.ai/v1/integrations/tickets/ticket_ref")
  .header("appSecret", "appSecret")
  .header("licenseKey", "licenseKey")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php OK
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api-dev.houseofapps.ai/v1/integrations/tickets/ticket_ref', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
    'appSecret' => 'appSecret',
    'licenseKey' => 'licenseKey',
  ],
]);

echo $response->getBody();
```

```csharp OK
using RestSharp;

var client = new RestClient("https://api-dev.houseofapps.ai/v1/integrations/tickets/ticket_ref");
var request = new RestRequest(Method.PATCH);
request.AddHeader("appSecret", "appSecret");
request.AddHeader("licenseKey", "licenseKey");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift OK
import Foundation

let headers = [
  "appSecret": "appSecret",
  "licenseKey": "licenseKey",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-dev.houseofapps.ai/v1/integrations/tickets/ticket_ref")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```