---
title: "Cancel a tracking window"
method: DELETE
path: "/v1/analytics/tracking/{windowId}"
tags: ["Analytics"]
---

# Cancel a tracking window

`DELETE /v1/analytics/tracking/{windowId}`

## Request

- Base URL: `https://zernio.com/api`
- URL: `https://zernio.com/api/v1/analytics/tracking/{windowId}`
- Auth: HTTP bearer

Stops tracking and returns the window with its final status. A window that already completed keeps its
`completed` status and its final read. A cancelled window gets no final read and fires no
`post.tracking_completed` webhook.

## Path parameters

- `windowId` string, required

## Response `200`

The window after cancellation

- TrackingWindowResponse
  - `window` TrackingWindow, required
    - `id` string, required
    - `postId` string, required: The external post being tracked
    - `accountId` string, required
    - `platform` string, required
    - `platformPostId` string, required: The post's id on the platform
    - `startsAt` string, date-time, required
    - `endsAt` string, date-time, required
    - `status` 'open' | 'completing' | 'completed' | 'cancelled', required
    - `finalReadAt` string, date-time, nullable, required: When the closing read ran. Null until then.
    - `completionReason` 'final_read' | 'unreachable' | 'post_deleted' | 'cancelled' | 'null', nullable, required: How the window closed. Null while it is open.
    - `requestedBy` string, required
    - `latest` object, nullable, required: The latest verified numbers we read from the platform. Null when no sample exists yet.
      - `views` integer, required
      - `likes` integer, required
      - `comments` integer, required
      - `shares` integer, required
      - `saves` integer, required
      - `syncedAt` string, date-time, nullable, required

## Other responses

- `401`: Missing or invalid API key. `code` is `missing_credentials` when no Authorization header was sent and `invalid_credentials` when the key is unknown, revoked or expired.
- `402`: Analytics access required. Legacy plans need the Analytics add-on; included by default on usage-based plans.
- `403`: API key scope violation
- `404`: Tracking window not found

## Changes

- **2026-10-28** `8f2c44dd7550`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/zernio/apis/zernio-api/changes/v1/analytics/tracking/:windowId/delete.md)

---

[API](https://skmtc.dev/zernio/apis/zernio-api.md) - [All operations](https://skmtc.dev/zernio/apis/zernio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zernio/apis/zernio-api/revisions/c319eb5d95b6?raw)
