AppView in a box as a Vite plugin thing
hatk.dev
1---
2title: Labels
3description: Label API endpoints.
4---
5
6## `dev.hatk.describeLabels`
7
8List all available label definitions.
9
10- **Type:** Query (GET)
11- **Auth:** None
12- **Parameters:** None
13
14### Example
15
16```bash
17curl "http://127.0.0.1:3000/xrpc/dev.hatk.describeLabels"
18```
19
20### Response
21
22```json
23{
24 "definitions": [
25 {
26 "identifier": "explicit",
27 "severity": "alert",
28 "blurs": "media",
29 "defaultSetting": "warn"
30 }
31 ]
32}
33```
34
35## `dev.hatk.createReport`
36
37Report an account or record for moderation review. Reports appear in the admin interface for review.
38
39- **Type:** Procedure (POST)
40- **Auth:** Required (OAuth)
41
42### Input
43
44| Field | Type | Required | Description |
45| --------- | ------ | -------- | ------------------------------------------ |
46| `subject` | union | Yes | `{ did }` for accounts, `{ uri, cid }` for records |
47| `label` | string | Yes | Label identifier (must match a defined label) |
48| `reason` | string | No | Free-text explanation (max 2000 chars) |
49
50### Example
51
52```bash
53curl -X POST "http://127.0.0.1:3000/xrpc/dev.hatk.createReport" \
54 -H "Authorization: DPoP <token>" \
55 -H "Content-Type: application/json" \
56 -d '{"subject": {"uri": "at://did:plc:abc/app.bsky.feed.post/123", "cid": "bafyrei..."}, "label": "spam"}'
57```
58
59### Response
60
61```json
62{
63 "id": 1,
64 "subject": { "uri": "at://did:plc:abc/app.bsky.feed.post/123", "cid": "bafyrei..." },
65 "label": "spam",
66 "reportedBy": "did:plc:reporter",
67 "createdAt": "2026-03-24T12:00:00.000Z"
68}
69```
70
71---
72
73See [Labels guide](/guides/labels) for how to define labels and hydrate them in responses.