Admin API
Labelers
Manage external labeler subscriptions. See the Labelers guide for background.
const TOKEN = "hv_..."; // your API key
const headers = { Authorization: `Bearer ${TOKEN}` };Add a labeler
POST /admin/labelersRequires labelers:create permission.
const response = await fetch("http://127.0.0.1:3000/admin/labelers", {
method: "POST",
headers: {
...headers,
"Content-Type": "application/json",
},
body: JSON.stringify({ did: "did:plc:ar7c4by46qjdydhdevvrndac" }),
});| Field | Type | Required | Description |
|---|---|---|---|
did | string | yes | The labeler's atproto DID |
Response: 201 Created (empty body)
List labelers
GET /admin/labelersRequires labelers:read permission.
interface Labeler {
did: string;
status: string;
cursor: number | null;
created_at: string;
updated_at: string;
}
const response = await fetch("http://127.0.0.1:3000/admin/labelers", {
headers,
});
const data: Labeler[] = await response.json();Response: 200 OK
[
{
"did": "did:plc:ar7c4by46qjdydhdevvrndac",
"status": "active",
"cursor": 1234,
"created_at": "2026-03-15T00:00:00Z",
"updated_at": "2026-03-15T00:00:00Z"
}
]| Field | Type | Description |
|---|---|---|
did | string | The labeler's DID |
status | string | active or paused |
cursor | number|null | Last processed event cursor (null if never synced) |
created_at | string | ISO 8601 creation timestamp |
updated_at | string | ISO 8601 last-updated timestamp |
Update a labeler
PATCH /admin/labelers/{did}Requires labelers:create permission.
const response = await fetch(
"http://127.0.0.1:3000/admin/labelers/did:plc:ar7c4by46qjdydhdevvrndac",
{
method: "PATCH",
headers: {
...headers,
"Content-Type": "application/json",
},
body: JSON.stringify({ status: "paused" }),
},
);| Field | Type | Required | Description |
|---|---|---|---|
status | string | yes | New status: active or paused |
Response: 200 OK
Delete a labeler
DELETE /admin/labelers/{did}Requires labelers:delete permission. Removes the subscription and all labels emitted by this labeler.
const response = await fetch(
"http://127.0.0.1:3000/admin/labelers/did:plc:ar7c4by46qjdydhdevvrndac",
{
method: "DELETE",
headers,
},
);Response: 204 No Content