# Update conversation state

> Mark a conversation read or unread, star or unstar it, archive or restore it, pause or resume the AI.

Source: https://docs.mycrmsim.com/docs/conversations/update-conversation-state

```http
PATCH https://backend.mysmsgateway.app/api/v1/ext/conversations/{contact_id}/state
```

- Category: myCRMSIM Conversations / Conversations
- Auth: Bearer access token
- Scope: `conversations.write`

Send any of the four flags; the rest are left as they are. `is_unread: false` marks the conversation read (the unread count drops to 0); `is_unread: true` marks it unread the way the inbox does — one unread, and the chat is marked unread in Messages on the workspace's Advanced-Mode Mac too. Archiving hides the conversation from the inbox's main list (it is still returned with `archived=1`) and never deletes messages. `is_ai_paused` is the same as sending it on *Update contact*: the AI agent stops replying to this contact until it is resumed, and **Contact Updated** automations hear about it. A contact with neither a phone number nor an email has no conversation, so read / star / archive answer **400** for it; the AI flag still works.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `contact_id` | path | number | yes | The contact id. Example: `1234` |
| `is_unread` | body | boolean | no | false = mark read, true = mark unread. Example: `false` |
| `is_starred` | body | boolean | no | Star / unstar. Example: `true` |
| `is_archived` | body | boolean | no | Archive / restore. |
| `is_ai_paused` | body | boolean | no | Pause / resume the AI agent for this contact. |

## Request body

```json
{
  "is_unread": false,
  "is_starred": true
}
```

## Response 200

OK — the state afterwards

```json
{
  "success": true,
  "message": "Conversation updated",
  "data": {
    "contact_id": 1234,
    "workspace_id": 7,
    "thread": "+61412345678",
    "unread_count": 0,
    "is_read": true,
    "is_unread": false,
    "is_starred": true,
    "is_archived": false,
    "last_read_at": "2026-11-04T03:10:00.000Z",
    "archived_at": null,
    "is_ai_paused": false,
    "dnd": {
      "outbound": {
        "all": false,
        "channels": []
      },
      "inbound": {
        "all": false,
        "channels": []
      }
    }
  }
}
```

## Response 400

No flag, a non-boolean, or a contact with no phone or email

```json
{
  "success": false,
  "message": "Send at least one of is_unread, is_starred, is_archived, is_ai_paused."
}
```

## Response 401

Missing or invalid token

```json
{
  "success": false,
  "message": "Invalid or expired access token."
}
```

## Response 403

Missing scope

```json
{
  "success": false,
  "message": "Missing scope(s): conversations.write. This integration was granted: …"
}
```

## Response 404

Contact does not exist or is not owned by the installer (same response for both)

```json
{
  "success": false,
  "message": "Contact not found or not accessible to this token"
}
```
