> ## Documentation Index
> Fetch the complete documentation index at: https://docs.photon.codes/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use Stable documentation by default. Honor an explicit Beta request or a URL under /docs/beta/. If the requested version conflicts with the installed CLI package or API origin, clarify the target before writing integration code.
> Pages under /docs/beta/ document Beta; other product pages document Stable. Keep the CLI package, commands, API origin, and credentials within the selected version. State the documentation version in your answer.
> For MCP search, always pass version: Stable or version: Beta. Unfiltered search mixes both versions. For filesystem reads, keep Beta queries under /beta/ and exclude /beta/ from Stable queries; discover paths before reading them.
> The public docs base is https://photon.codes/docs. Convert MCP page paths to public URLs under that base, preserving /beta/ when present. Read https://photon.codes/docs/skill.md for version selection and https://photon.codes/docs/llms.txt for the version indexes.

# Mark a Message as read

> Mark a Message as read: markMessageRead in the TypeScript, Python, Rust and Go clients.

`POST /v1/projects/{id}/messages/{messageId}/read`

Persists a request to mark one incoming Message as read using its receiving account. A 202 means accepted for asynchronous execution, not handled by the provider. Requires Idempotency-Key. The returned action Message tracks its outcome; privacy settings may suppress remote visibility.

**TypeScript**

```typescript TypeScript theme={null}
photon.projects.markMessageRead(input: MarkMessageReadInput, options?: RequestOptions): Promise<MarkMessageReadOutput>
```

**Python**

```python Python theme={null}
photon.projects.mark_message_read(input: MarkMessageReadInput) -> models.MarkMessageReadResponse
```

**Rust**

```rust Rust theme={null}
client.mark_message_read(id: String, message_id: String, idempotency_key: String).await -> Result<ResponseValue<types::MarkMessageReadResponse>, Error<MarkMessageReadError>>
```

**Go**

```go Go theme={null}
client.Projects.MarkMessageRead(ctx context.Context, params *MarkMessageReadParams, opts ...RequestOption) (*MarkMessageReadResponse, error)
```

```typescript TypeScript theme={null}
import { Photon } from "@photon-ai/api";

const photon = new Photon({
  headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.markMessageRead({
  path: {
    id: "id",
    messageId: "messageId",
  },
  headers: {
    "idempotency-key": "idempotency-key",
  },
});
```

```python Python theme={null}
import os

from photon_api import Photon
from photon_api.rpc_generated import MarkMessageReadInput

photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.mark_message_read(
    MarkMessageReadInput.model_validate({
        "path": {
            "id": "id",
            "messageId": "messageId",
        },
        "headers": {
            "idempotency-key": "idempotency-key",
        },
    })
)
```

```rust Rust theme={null}
use photon_ai_api::{Credential, PhotonClientBuilder, SecretString};

let token = std::env::var("PHOTON_API_TOKEN")?;
let client = PhotonClientBuilder::new()
    .credential("accountServiceKey", Credential::Bearer(SecretString::from(token)))
    .build()?;
let result = client
    .mark_message_read(
        "id".to_owned(),
        "messageId".to_owned(),
        "idempotency-key".to_owned(),
    )
    .await
    .map_err(|error| format!("{error:?}"))?
    .into_inner();
```

```go Go theme={null}
import (
	"context"
	"os"

	photonapi "github.com/photon-hq/api/packages/go"
)

ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
result, err := client.Projects.MarkMessageRead(ctx, &photonapi.MarkMessageReadParams{
	ID: "id",
	MessageID: "messageId",
	IdempotencyKey: "idempotency-key",
})
if err != nil {
	return err
}
_ = result
```

```json 202 theme={null}
{
  "content": {
    "type": "message.read"
  },
  "createdAt": "2026-01-01T00:00:00.000Z",
  "id": "pho_msg_00000000000000000000000001",
  "metadata": {},
  "parentMessageId": "pho_msg_00000000000000000000000002",
  "platform": "whatsapp",
  "projectId": "pho_prj_00000000000000000000000001",
  "sentBy": {
    "details": {
      "resourceId": "pho_res_00000000000000000000000001",
      "type": "dedicated"
    },
    "handle": "+14155550123",
    "id": "pho_usr_00000000000000000000000001",
    "kind": "agent",
    "metadata": {},
    "platform": "whatsapp",
    "projectId": "pho_prj_00000000000000000000000001"
  },
  "space": {
    "details": {},
    "id": "pho_spc_00000000000000000000000001",
    "kind": "direct",
    "metadata": {},
    "participantIds": [
      "pho_usr_00000000000000000000000001",
      "pho_usr_00000000000000000000000002"
    ],
    "platform": "whatsapp",
    "projectId": "pho_prj_00000000000000000000000001"
  },
  "status": "dispatched",
  "timestamps": {
    "dispatchedAt": "2026-01-01T00:00:00.000Z"
  },
  "updatedAt": "2026-01-01T00:00:00.000Z"
}
```

## Parameters

**id** `string` *required*

**messageId** `string` *required*

**idempotency-key** `string` *required*

## Returns

**`202`** The read request was persisted for execution. MarkMessageReadResponse

**acceptance** `object` *required*

**addressedTo** `UserSnapshot`

**content** `TelegramMessageContent` *required*

**createdAt** `string (date-time)` *required*

When Photon first persisted this resource.

**failure** `MessageFailure` *required*

**id** `string` *required*

**metadata** `ResourceMetadata` *required*

**parentMessageId** `string`

**platform** `Platform` *required*

**projectId** `string` *required*

**receivedBy** `UserSnapshot`

**sentBy** `UserSnapshot` *required*

**space** `SpaceSnapshot` *required*

**status** `SentMessageStatus` *required*

**timestamp** `object`

**timestamps** `FailedMessageTimestamps` *required*

**updatedAt** `string (date-time)` *required*

When Photon last persisted a change to this resource's public state.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.