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/labelers

Requires 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" }),
});
FieldTypeRequiredDescription
didstringyesThe labeler's atproto DID

Response: 201 Created (empty body)

List labelers

GET /admin/labelers

Requires 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"
  }
]
FieldTypeDescription
didstringThe labeler's DID
statusstringactive or paused
cursornumber|nullLast processed event cursor (null if never synced)
created_atstringISO 8601 creation timestamp
updated_atstringISO 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" }),
  },
);
FieldTypeRequiredDescription
statusstringyesNew 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