---
title: "POST /managed-blocking/violations/batch"
method: POST
path: "/managed-blocking/violations/batch"
tags: ["managed-blocking"]
---

# POST /managed-blocking/violations/batch

`POST /managed-blocking/violations/batch`

## Request

- Base URL: `https://api.focusbear.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.focusbear.io/managed-blocking/violations/batch`
- Auth: HTTP bearer

## Request body

- MinimalOfflineViolationsDto
  - `events` MinimalOfflineViolationDto[], required
    - `kind` 'website' | 'app': `app`: an attempt to open a blocked app. `domain` then carries the app identifier (bundle id, package name or .exe name) and `resource_hash` is sha256("app:" + lowercased identifier). Omitted means `website`, so older clients keep working.
    - `app_platform` 'macos' | 'windows' | 'android' | 'ios': Optional app details for `kind: 'app'`, shown in school history ("Tried to open Steam").
    - `reason` 'ip_address_url': Why the device blocked it, when that is not a category. `ip_address_url`: the policy's `block_ip_address_urls` option blocked a website opened by IP address; only valid for a website whose `domain` is a blockable IP with no `category_ids`, and recorded as that decision. Omitted records the generic `device_reported_block`.
    - `event_id` string, uuid, required
    - `device_id` string, uuid, required
    - `policy_id` string, uuid, required
    - `policy_revision` number, required
    - `domain` string, required
    - `resource_hash` string, required
    - `url` string
    - `category_ids` string[], required
    - `observed_at` string, required
    - `app_name` string

## Response `201`

---

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