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

# Termination Request Status Change

> Webhook event triggered when the status of one of your termination requests changes

> [!NOTE]
>
> **Webhooks belong to the Carrier & MGA API.** Subscribe in the Turris app under Settings, Developer, Webhook.
> The API lists your webhooks and sends test events; it does not create subscriptions.

## Overview

The `TERMINATION_REQUEST_STATUS_CHANGE` webhook tells you that one of your termination requests moved to a new
status: Turris operations filed it with the state, completed it, the request was cancelled, and so on.

It lets your system react as a termination request moves instead of polling for every change.

**Webhook type:** `TERMINATION_REQUEST_STATUS_CHANGE`

### Triggers

This webhook fires when the status of an existing termination request changes, whoever changed it:

* Turris operations moves it in the Turris admin console, one request at a time or in bulk. Only Turris operations
  marks a termination `completed`.
* someone cancels it: through [Cancel a Termination Request](https://docs.turrisfi.com/api-reference/v2/appointments/cancel-termination-request.md),
  in the Turris app, in bulk, or Turris cancels it because a product was unassigned or because another of your
  requests already covers the same NPN, state and carrier (`canceled`)

It does **not** fire when a request is created. Every request starts as `pending`, and the call that creates it
already returns it. A request created in the Turris app is therefore first announced by its first status change; use
[List Termination Requests](https://docs.turrisfi.com/api-reference/v2/appointments/list-termination-requests.md) to see requests you have not
heard about yet.

A bulk change sends one event per request. Writing the status a request already has sends nothing.

> [!NOTE]
>
> This webhook is sent **immediately**. No debouncing is applied: each status change is a discrete event.

## Payload Example

```json theme={null}
{
  "webhookType": "TERMINATION_REQUEST_STATUS_CHANGE",
  "upstreamEntityId": "507f1f77bcf86cd799439010",
  "payload": {
    "terminationRequestId": "000000000000000000000000",
    "agentId": "000000000000000000000000",
    "downstreamEntityAssociationId": null,
    "stateCode": "CA",
    "productId": "000000000000000000000000",
    "carrier": {
      "name": "Turris Test Carrier",
      "companyCode": "00000"
    },
    "status": "completed",
    "previousStatus": "submitted",
    "statusChangedAt": "2020-01-01T00:00:00.000Z"
  }
}
```

### Payload Fields

| Field | Type | Description |
| - | - | - |
| `terminationRequestId` | string | The request's id, the same `terminationRequestId` [Get a Termination Request](https://docs.turrisfi.com/api-reference/v2/appointments/get-termination-request.md) takes |
| `agentId` | string \| null | The agent the request is for. `null` on an agency request |
| `downstreamEntityAssociationId` | string \| null | The agency association the request is for, as List Termination Requests answers it: your live association with the agency, else the most recent archived one. `null` on an agent request, and on an agency request only when you have no association with that agency at all, live or archived |
| `stateCode` | string | Two-letter US state or territory code (e.g., `CA`) |
| `productId` | string | The product the request was made under |
| `carrier` | object | The carrier: `name`, and `companyCode` (the NAIC code, `null` on older requests that did not record it) |
| `status` | string | The status the request moved to. One of: `pending`, `submitting`, `submitted`, `completed`, `failed`, `submission failed`, `rejected`, `canceled`, `archived` |
| `previousStatus` | string \| null | The status before this change, or `null` when Turris could not determine it |
| `statusChangedAt` | string | ISO 8601 timestamp of when the request entered `status` |

> [!NOTE]
>
> **Deliveries can repeat and can arrive out of order.** A failed delivery is retried and can land after a newer one,
> and in rare cases the same change is delivered twice. Key your processing on `terminationRequestId` and keep the
> event with the latest `statusChangedAt`; ignore an older one. When in doubt,
> [Get a Termination Request](https://docs.turrisfi.com/api-reference/v2/appointments/get-termination-request.md) returns the current status.
>
> **A delivery can also be missed**, for example during an outage on our side, and a missed event is not always
> available to resend. Treat these events as a prompt rather than a ledger: the request's `status` on
> [List Termination Requests](https://docs.turrisfi.com/api-reference/v2/appointments/list-termination-requests.md) is the source of truth, so
> reconcile against it from time to time.
>
> `downstreamEntityAssociationId` is resolved when the event is sent, so two events for one request can carry
> different association ids if the agency was archived and associated again in between.
>
> A request made for one of your child organizations is delivered to the child's webhooks, not the parent's.


## Related topics

- [Get a Termination Request](https://docs.turrisfi.com/api-reference/v2/appointments/get-termination-request.md)
- [Changelog](https://docs.turrisfi.com/changelog.md)
- [Send Test Event](https://docs.turrisfi.com/api-reference/v2/webhooks/test-webhook.md)


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