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

# Chat Resolved

> Fires when a chat is resolved (by anyone)

ubscribe to receive a notification when a chat is resolved - by an agent, by the bot, or via the [Resolve Chat](/api-reference/chats/resolve-chat) endpoint. To distinguish who resolved it, use the *Chat Resolved by Bot* / *Chat Resolved by Agent* variants instead.

**Event name:** `chatResolved`\\

**Required token scopes:**

* `Create scenarios`
* `Manage scenarios on behalf of user`

see [Authentication](/api-reference/authentication)

## Subscribe

Send the body below to [Import Subscription](/api-reference/subscribe-to-events/import-subscription-subscribe-to-an-event). You only need to change:

* **`url`** *(required)* - Located under `data.actions[0].params.url`. Replace `{{yourWebhookURL}}` with the destination URL that should receive the events.
* **`asStatus`** - Keep `"active"` to enable the subscription immediately, or `"inactive"` to save it as an inactive revision.

```json Import body [expandable]  theme={null}
{
  "data": {
    "version": "v1",
    "name": "(SUB) Chat Resolved",
    "description": "Sends a webhook when a chat is resolved.",
    "triggerEvents": [
      "domain.chat.resolved"
    ],
    "loaders": {},
    "conditions": [],
    "actions": [
      {
        "name": "request",
        "params": {
          "url": "{{yourWebhookURL}}",
          "method": "post",
          "json": true,
          "data": {
            "eventName": "chatResolved",
            "eventData": {
              "chat": {
                "##provide": {
                  "provider": "chat",
                  "key": "chat"
                }
              }
            }
          }
        },
        "confidentialData": false
      }
    ],
    "options": {
      "unorderedActions": false
    }
  },
  "asStatus": "active"
}
```

<Note>
  A `201` response returns your new subscription - save its `_id` to manage it later. You can also add an optional `authorUid` root field (a Texter user UID) to attribute the subscription to a specific user.
</Note>

## Payload

When the event fires, your URL receives an HTTP `POST` with `eventName: "chatResolved"` and the following `eventData`:

<ResponseField name="chat" type="Chat">
  The resolved chat (`status: 3`, with `resolvedUpdateTime`). See the [Chat object](/api-reference/objects/chat) for all fields.
</ResponseField>

```json Example payload  theme={null}
{
  "eventName": "chatResolved",
  "eventData": {
    "chat": {
      "_id": "69062b15262e17ab3033f886",
      "title": "Josh Dun",
      "status": 3,
      "resolvedUpdateTime": 1761664598,
      "agent": {
        "uid": "rShazWqr8iTDocIqkOp4GY0c0j32",
        "displayName": "גיל"
      },
      "...": "..."
    }
  }
}
```

## Manage this subscription

| Action             | Endpoint                                                                              |
| ------------------ | ------------------------------------------------------------------------------------- |
| List subscriptions | [List All Subscriptions](/api-reference/subscribe-to-events/list-all-subscriptions)   |
| Pause              | [Inactivate Subscription](/api-reference/subscribe-to-events/inactivate-subscription) |
| Resume             | [Activate Subscription](/api-reference/subscribe-to-events/activate-subscription)     |
| Delete             | [Delete Subscription](/api-reference/subscribe-to-events/delete-subscription)         |
| Debug executions   | [List Scenario Runs](/api-reference/scenarios-advanced/list-scenario-runs)            |
