---
title: "A device posts when its sources were watching, idempotent on the coverage id"
method: POST
path: "/v1/coverage"
tags: ["coverage"]
---

# A device posts when its sources were watching, idempotent on the coverage id

`POST /v1/coverage`

## Request

- Base URL: `https://api.sixminute.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.sixminute.ai/v1/coverage`
- Auth: HTTP bearer

Carries the device header (X-Six-Minute-Device) with a person's session, or the daemon's own device credential (a device route); the body's `device_id` must be that device, and a row's own `device_id` is that device or null. Each row is answered with one outcome: `applied` (written), `unchanged` (the row did not move, so a replay is not an error) or `refused` with a sentence saying what to fix. The write is monotone and the first value wins: `to_at` and `settled_at` are taken when the row has none yet and kept once stored, whatever a later body carries, and `from_at`, `source` and `device_id` never change after the first post. A row another member posted is refused and left untouched. The author is the caller, from the token; the body cannot name one.

## Request body

- object
  - `device_id` string, required
  - `coverage` object[], required
    - `id` string, required
    - `source` string, required
    - `device_id` string, nullable
    - `from_at` string, date-time, required
    - `to_at` string, date-time, nullable
    - `settled_at` string, date-time, nullable

## Response `200`

One outcome per row of the batch, in the order posted.

- object
  - `results` object[], required
    - `id` string, required
    - `outcome` 'applied' | 'unchanged' | 'refused', required
    - `reason` string

## Other responses

- `400`: The body, query or path did not validate; `errors` lists the fields.
- `401`: No bearer token, or one that does not verify or has expired.
- `403`: The token verified but may not do this: no organisation, not provisioned, wrong role, or a device problem.

---

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