PLC history of a Bluesky identity

Markdown version

GET/tools/plc-history

The operation log of a did:plc identity from the PLC directory, as a timeline: creation, handle changes, server (PDS) moves, signing and rotation key changes, nullified operations, tombstones. Takes a handle too. One page of operations, newest first; raw operations on request. Costs 2 calls.

Parameters

NameInTypeDescription
q (required)querystringA did:plc, a handle or a bsky.app profile link.
limitqueryinteger (1–100), default 50Operations per page, newest first: 1 to 100, 50 by default.
pagequeryinteger (1–), default 1The page of operations, from 1.
include_rawqueryboolean, default falseAdd each operation as the PLC directory published it (`operation`).

Responses

StatusDescriptionBody
200The tool's answer, with the canonical URL of its page.ToolPlcHistory
400Invalid query parameter (code `bad_request`).Error
401Unknown, expired or revoked token (code `unauthorized`). Without an `Authorization` header, the tool answers anonymously.Error
404Not found. Also returned on a bot's handle subdomain: the API is only served on the main site.Error
429Rate limited: `toolsApi` (60 a minute) and `toolsApiDaily` (2,000 a day) per IP, or 10 times both per account with a creator's token. A tool that fans out costs more than one call.Error
500Unexpected error.Error
502The service the tool asks did not answer (code `upstream_error`).Error

Example

bash
curl \
  -G \
  --data-urlencode "q=did:plc:z72i7hdynmk6r22z27h6tvur" \
  -H "Authorization: Bearer $BLUESKY_BOT_TOKEN" \
  https://bluesky.bot/api/v1/tools/plc-history

Schemas

Error

FieldTypeDescription
error (required)object
error.code (required)string: "bad_request", "invalid_handle", "not_found", "rate_limited", "internal_error", "unauthorized", "forbidden", "conflict", "invalid_grant", "upstream_error", "insufficient_scope", "invalid_listing", "consent_required"
error.message (required)string
error.reasonstringWith `invalid_handle`, `invalid_listing`, `conflict` and `forbidden`: e.g. `reserved`, `taken`, `too_long`, `no_handle`, `suspended`.
error.urlstring, uriWith consent_required: open this dashboard page to grant profile editing.
error.fieldstringWith `invalid_listing`: the refused field.
error.scopestringWith `insufficient_scope`: the scope the token lacks.
error.parameterstringThe invalid query parameter.
error.retryAfterSecondsinteger (1–)With `rate_limited`.

ToolPlcHistory

FieldTypeDescription
tool (required)string = "plc-history"The tool's slug.
url (required)stringThe canonical URL of the tool's page on Bluesky.bot.
result (required)objectThe tool's answer.
result.did (required)stringThe DID whose history this is.
result.kind (required)string: "history", "too_long", "not_plc"`history`; `too_long` when the log is over 1 MB; `not_plc` for a did:web or another method, which has no public log.
result.summary (required)object | nullThe identity at a glance; null unless `kind` is `history`.
result.truncated (required)booleanMore than 1,000 operations: only the latest 1,000 are listed.
result.operations (required)object[]One page of the operations, newest first.
result.operations[].cid (required)stringThe operation's CID.
result.operations[].createdAt (required)stringWhen the PLC directory received it.
result.operations[].type (required)string: "plc_operation", "create", "plc_tombstone"`plc_operation`, the legacy `create`, or `plc_tombstone`.
result.operations[].nullified (required)booleanOverridden later by a higher-priority rotation key (within 72 hours); the directory keeps it.
result.operations[].events (required)object[]What changed compared with the previous valid operation.
result.operations[].events[].kind (required)string: "created", "handle", "pds", "signing_key", "rotation_keys", "services", "other", "tombstone", "no_change"`created`, `handle`, `pds` (moved to another server), `signing_key`, `rotation_keys`, `services` (other services), `other` (other aliases or verification methods), `tombstone` or `no_change`.
result.operations[].events[].from (required)string | nullBefore: the handle, the PDS endpoint or the signing key; null when absent or not applicable.
result.operations[].events[].to (required)string | nullAfter: the handle, the PDS endpoint or the signing key; null when absent or not applicable.
result.operations[].events[].added (required)string[]Rotation keys added.
result.operations[].events[].removed (required)string[]Rotation keys removed.
result.operations[].operationobjectThe operation as the PLC directory published it, with `include_raw` only.
result.page (required)integerThe page of operations returned.
result.pages (required)integerHow many pages of operations there are at this `limit`.
result.notes (required)object[]Notes worth a look: `keys_and_server` when the rotation keys and the server changed within 24 hours (a migration, or a takeover).
result.notes[].kind (required)string: "keys_and_server"The note's kind.
result.notes[].at (required)stringWhen the server changed.