<!-- Generated from the canonical 99 Digital API documentation. Do not edit this file. -->

Canonical page: https://docs.99digital.co.il/online-api/webhooks/ticket-resolved

# Ticket Resolved

**Webhook.** Sent to the webhook URL you configure.

Online sends `ticket_resolved` to your webhook when a [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) was closed (the conversation was resolved).

| Subscription | Sent when |
| --- | --- |
| `ticket_resolved` | A ticket was closed (the conversation was resolved). |

The payload is the closed ticket, with its conversation, messages, contact and
assignee. The event is sent only if its inbox is in the webhook's
`inbox_ids`, or `inbox_ids` is empty.

**Settings:**

| Setting | Value |
| --- | --- |
| URL | Your webhook URL — create the webhook with [Add Webhook](https://docs.99digital.co.il/online-api/webhooks/add-webhook) and choose its events in `subscriptions` |
| Method | JSON via POST |

**Example** (`conversation`, `messages`, `contact` and `assignee` are shortened):

```json
{
  "event": "ticket_resolved",
  "ticket": {
    "id": 902,
    "status": "closed",
    "conversation_id": 1501,
    "inbox_id": 31,
    "opened_at": 1794470400,
    "resolved_at": 1794474000,
    "channel": "Channel::Api",
    "priority": null,
    "labels": [
      "vip"
    ],
    "custom_attributes": {},
    "additional_attributes": {},
    "ticket_custom_attributes": {
      "case_type": "delivery"
    },
    "metrics": {
      "duration_seconds": 3600
    }
  },
  "conversation": {
    "id": 1501
  },
  "messages": [
    {
      "id": 40113,
      "content": "Hi, where is my order?"
    }
  ],
  "contact": {
    "id": 801,
    "name": "Dana Cohen"
  },
  "assignee": {
    "id": 51,
    "name": "Jane Agent"
  },
  "allow_unverified_ssl": false
}
```

### Payload explained

| Parameter | Description / Example |
| --- | --- |
| `event` | A ticket was closed (the conversation was resolved). |
| `ticket` | The ticket. See [List Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets). |
| `conversation` | The conversation. |
| `messages` | The messages. |
| `contact` | The contact. |
| `assignee` | The assigned agent, or `null`. |
| `allow_unverified_ssl` | Added by Online to every payload. |

## Webhook payload

Content type: `application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `event` | string | Yes | A ticket was closed (the conversation was resolved). Always `ticket_resolved`. |
| `ticket` | object | No | The ticket. See [List Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets). |
| `ticket.id` | integer | No | The ticket ID. |
| `ticket.status` | string | No | The ticket's status. |
| `ticket.conversation_id` | integer | No | The conversation's ID. |
| `ticket.inbox_id` | integer | No | The inbox ID. |
| `ticket.opened_at` | integer | No | When the ticket opened. |
| `ticket.resolved_at` | integer | No | When the ticket was closed. |
| `ticket.closed_by` | any | No | Who closed the ticket. |
| `ticket.channel` | string | No | The inbox's channel type, for example `Channel::Api`. |
| `ticket.priority` | string \| null | No | The conversation's priority, or `null`. |
| `ticket.labels` | array of string | No | The titles of the conversation's labels. |
| `ticket.team` | any | No | The conversation's team. |
| `ticket.custom_attributes` | object | No | The conversation's custom attributes. |
| `ticket.additional_attributes` | object | No | The conversation's additional attributes. |
| `ticket.ticket_custom_attributes` | object | No | The ticket's own custom attributes — see [Set Ticket Custom Attributes](https://docs.99digital.co.il/online-api/tickets/set-ticket-custom-attributes). |
| `ticket.metrics` | object | No | Measurements of the ticket. |
| `ticket.metrics.duration_seconds` | integer | No | Seconds from opening to closing. |
| `conversation` | object | No | The conversation. |
| `messages` | array of object | No | The messages. |
| `contact` | object | No | The contact. |
| `assignee` | object \| null | No | The assigned agent, or `null`. |
| `allow_unverified_ssl` | boolean | Yes | Added by Online to every payload. |

### Example (generated from the schema)

```json
{
  "event": "ticket_resolved",
  "ticket": {
    "id": 902,
    "status": "closed",
    "conversation_id": 1501,
    "inbox_id": 31,
    "opened_at": 1794470400,
    "resolved_at": 1794474000,
    "channel": "Channel::Api",
    "priority": null,
    "labels": [
      "vip"
    ],
    "custom_attributes": {},
    "additional_attributes": {},
    "ticket_custom_attributes": {
      "case_type": "delivery"
    },
    "metrics": {
      "duration_seconds": 3600
    }
  },
  "conversation": {
    "id": 1501
  },
  "messages": [
    {
      "id": 40113,
      "content": "Hi, where is my order?"
    }
  ],
  "contact": {
    "id": 801,
    "name": "Dana Cohen"
  },
  "assignee": {
    "id": 51,
    "name": "Jane Agent"
  },
  "allow_unverified_ssl": false
}
```

## Responses

### 200 — Answer with any `2xx` status within 5 seconds. Online ignores the body of your answer, and does not send the event again.
