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

# Mark Message Read

PATCH https://api.customerhub.com/web_api/messages/{id}
Content-Type: application/json

Update a message's read status.

**Authentication:** Required — Bearer token.

**Path parameters:**
- `id` (required) — Message ID

**Request body:**
- `message[read]` (required) — Boolean (true to mark read, false to mark unread)

**Response:** Updated message object.

**Side effects:** Clears the new message count cache.

**Errors:**
- `404` — Message not found

Reference: https://customerhub.com/api/api-reference/messages-inbox/mark-message-read

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `id` (string, required) — Message ID

### Body (application/json)

This endpoint expects an object.

- `message` (MessagesIdPatchRequestBodyContentApplicationJsonSchemaMessage, optional)

## Response

### 200

OK

## Types

### MessagesIdPatchRequestBodyContentApplicationJsonSchemaMessage

- `read` (boolean, optional)

## Examples

**Request**

```json
{
  "message": {
    "read": true
  }
}
```

**Response**

```json
{
  "data": {
    "app_id": "dc49d1a0-3ede-40fb-91c3-7198d7e9ebde",
    "archived": false,
    "body": "Thanks for joining.",
    "cosmic_id": "europa-2fae",
    "cosmic_tier": 1,
    "created_at": "2026-09-16T15:32:13Z",
    "id": "fb94988e-4027-43c8-bb57-57c1612e9a64",
    "read": true,
    "receiver_id": "c7358892-5f29-47db-a705-2c53d10da4bd",
    "receiver_type": "User",
    "sender_id": "3871650b-9df5-4373-ab19-02f41c3c5a7f",
    "sender_type": "Admin",
    "subject": "Welcome!",
    "updated_at": "2026-09-16T15:32:16Z"
  }
}
```

**SDK Code**

```python Messages & Inbox_markMessageRead_example
import requests

url = "https://api.customerhub.com/web_api/messages/id"

payload = { "message": { "read": True } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Messages & Inbox_markMessageRead_example
const url = 'https://api.customerhub.com/web_api/messages/id';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"message":{"read":true}}'
};

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

```go Messages & Inbox_markMessageRead_example
package main

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

func main() {

	url := "https://api.customerhub.com/web_api/messages/id"

	payload := strings.NewReader("{\n  \"message\": {\n    \"read\": true\n  }\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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 Messages & Inbox_markMessageRead_example
require 'uri'
require 'net/http'

url = URI("https://api.customerhub.com/web_api/messages/id")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"message\": {\n    \"read\": true\n  }\n}"

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

```java Messages & Inbox_markMessageRead_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.customerhub.com/web_api/messages/id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"message\": {\n    \"read\": true\n  }\n}")
  .asString();
```

```php Messages & Inbox_markMessageRead_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.customerhub.com/web_api/messages/id', [
  'body' => '{
  "message": {
    "read": true
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Messages & Inbox_markMessageRead_example
using RestSharp;

var client = new RestClient("https://api.customerhub.com/web_api/messages/id");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"message\": {\n    \"read\": true\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Messages & Inbox_markMessageRead_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["message": ["read": true]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.customerhub.com/web_api/messages/id")! 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()
```