Skip to content

Service entries

Manage the service entries published in the instance’s DID document. Each entry declares an atproto service type (e.g. AtprotoLabeler, BskyFeedGenerator). Its access mode decides which XRPC methods a caller using service auth addressed to that entry may call. All endpoints require the settings:manage permission.

const TOKEN = "hv_..."; // your API key
const headers = { Authorization: `Bearer ${TOKEN}` };
GET /admin/service-entries
interface ServiceEntry {
id: number;
fragment_id: string;
service_type: string;
access_mode: "all" | "specific";
created_at: string;
updated_at: string;
}
const response = await fetch("http://127.0.0.1:3000/admin/service-entries", {
headers,
});
const data: ServiceEntry[] = await response.json();

Response: 200 OK

[
{
"id": 1,
"fragment_id": "#happyview",
"service_type": "AtprotoLabeler",
"access_mode": "all",
"created_at": "2026-05-09T12:00:00.000000+00:00",
"updated_at": "2026-05-09T12:00:00.000000+00:00"
}
]
POST /admin/service-entries
const response = await fetch("http://127.0.0.1:3000/admin/service-entries", {
method: "POST",
headers: {
...headers,
"Content-Type": "application/json",
},
body: JSON.stringify({
fragment_id: "#feed",
service_type: "BskyFeedGenerator",
}),
});
const data: ServiceEntry = await response.json();
FieldTypeRequiredDescription
fragment_idstringyesDID document fragment (e.g. #feed, #happyview). Must be unique
service_typestringyesatproto service type (e.g. BskyFeedGenerator)

The entry is created with access_mode set to all. The endpoint URL is derived from PUBLIC_URL. A duplicate fragment_id returns 409 Conflict.

Response: 201 Created, with the created entry

{
"id": 2,
"fragment_id": "#feed",
"service_type": "BskyFeedGenerator",
"access_mode": "all",
"created_at": "2026-05-09T12:00:00.000000+00:00",
"updated_at": "2026-05-09T12:00:00.000000+00:00"
}
PUT /admin/service-entries/{id}
await fetch("http://127.0.0.1:3000/admin/service-entries/1", {
method: "PUT",
headers: {
...headers,
"Content-Type": "application/json",
},
body: JSON.stringify({
service_type: "AtprotoLabeler",
access_mode: "specific",
}),
});
FieldTypeRequiredDescription
fragment_idstringnoUpdated DID document fragment
service_typestringnoUpdated service type
access_modestringnoall, or specific (only the XRPCs bound to this entry). Any other value is 400 Bad Request

All fields are optional. Only provided fields are updated. Returns 404 Not Found if the entry doesn’t exist.

Response: 204 No Content

DELETE /admin/service-entries/{id}
await fetch("http://127.0.0.1:3000/admin/service-entries/1", {
method: "DELETE",
headers,
});

Returns 404 Not Found if the entry doesn’t exist.

Response: 204 No Content

GET /admin/service-entries/{id}/xrpcs

Returns the lexicon IDs (NSIDs) bound to this service entry.

const response = await fetch("http://127.0.0.1:3000/admin/service-entries/1/xrpcs", {
headers,
});
const data: string[] = await response.json();

Response: 200 OK

["app.bsky.feed.getFeedSkeleton", "app.bsky.feed.describeFeedGenerator"]
POST /admin/service-entries/{id}/xrpcs
await fetch("http://127.0.0.1:3000/admin/service-entries/1/xrpcs", {
method: "POST",
headers: {
...headers,
"Content-Type": "application/json",
},
body: JSON.stringify({
lexicon_ids: ["app.bsky.feed.getFeedSkeleton"],
}),
});
FieldTypeRequiredDescription
lexicon_idsstring[]yesLexicon NSIDs to bind to this entry

Response: 204 No Content

DELETE /admin/service-entries/{id}/xrpcs
await fetch("http://127.0.0.1:3000/admin/service-entries/1/xrpcs", {
method: "DELETE",
headers: {
...headers,
"Content-Type": "application/json",
},
body: JSON.stringify({
lexicon_ids: ["app.bsky.feed.getFeedSkeleton"],
}),
});
FieldTypeRequiredDescription
lexicon_idsstring[]yesLexicon NSIDs to unbind from this entry

Response: 204 No Content

GET /admin/lexicons/{id}/services

Returns service entries that grant access to the specified lexicon.

const response = await fetch("http://127.0.0.1:3000/admin/lexicons/app.bsky.feed.getFeedSkeleton/services", {
headers,
});
const data: ServiceEntry[] = await response.json();

Response: 200 OK with an array of ServiceEntry objects.

These endpoints publish your service entries to the PLC directory so they appear in the DID document. The sync method depends on the service identity mode.

POST /admin/service-entries/sync-plc

Signs and submits a PLC update operation using the stored rotation key. Only available when the identity mode is did_plc.

await fetch("http://127.0.0.1:3000/admin/service-entries/sync-plc", {
method: "POST",
headers,
});

The operation keeps the DID’s existing rotation keys, handles and services, and adds the instance’s verification methods. Each service entry is written with PUBLIC_URL as its endpoint, and a service pointing at PUBLIC_URL that no longer has an entry is removed.

Returns 400 Bad Request if no identity is configured, the identity mode is not did_plc, or no DID is registered yet. Returns 500 Internal Server Error if TOKEN_ENCRYPTION_KEY is not set.

Response: 204 No Content

POST /admin/service-entries/sync-plc/request

Requests a PLC operation signature token via the attached account’s PDS. This sends an email confirmation code to the account holder. Only available when the identity mode is attach_account.

await fetch("http://127.0.0.1:3000/admin/service-entries/sync-plc/request", {
method: "POST",
headers,
});

Returns 400 Bad Request if the identity mode is not attach_account, no identity is configured, or no attached account is set. Returns 401 Unauthorized when the attached account’s PDS session has expired; re-authenticate on the Service Identity page.

Response: 204 No Content

POST /admin/service-entries/sync-plc/submit

Builds the same changes as a direct sync, has the attached account’s PDS sign them with the email confirmation code, and submits the signed operation through that PDS.

await fetch("http://127.0.0.1:3000/admin/service-entries/sync-plc/submit", {
method: "POST",
headers: {
...headers,
"Content-Type": "application/json",
},
body: JSON.stringify({
token: "123456"
}),
});
FieldTypeRequiredDescription
tokenstringyesEmail confirmation code from the PDS

Returns 400 Bad Request if the identity mode is not attach_account, no identity is configured, or no attached account is set. Returns 401 Unauthorized when the attached account’s PDS session has expired; re-authenticate on the Service Identity page.

Response: 204 No Content