PLC history of a Bluesky identity
Markdown versionGET/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
| Name | In | Type | Description |
|---|---|---|---|
| q (required) | query | string | A did:plc, a handle or a bsky.app profile link. |
| limit | query | integer (1–100), default 50 | Operations per page, newest first: 1 to 100, 50 by default. |
| page | query | integer (1–), default 1 | The page of operations, from 1. |
| include_raw | query | boolean, default false | Add each operation as the PLC directory published it (`operation`). |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | The tool's answer, with the canonical URL of its page. | ToolPlcHistory |
| 400 | Invalid query parameter (code `bad_request`). | Error |
| 401 | Unknown, expired or revoked token (code `unauthorized`). Without an `Authorization` header, the tool answers anonymously. | Error |
| 404 | Not found. Also returned on a bot's handle subdomain: the API is only served on the main site. | Error |
| 429 | Rate 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 |
| 500 | Unexpected error. | Error |
| 502 | The service the tool asks did not answer (code `upstream_error`). | Error |
Example
curl \
-G \
--data-urlencode "q=did:plc:z72i7hdynmk6r22z27h6tvur" \
-H "Authorization: Bearer $BLUESKY_BOT_TOKEN" \
https://bluesky.bot/api/v1/tools/plc-historySchemas
Error
| Field | Type | Description |
|---|---|---|
| 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.reason | string | With `invalid_handle`, `invalid_listing`, `conflict` and `forbidden`: e.g. `reserved`, `taken`, `too_long`, `no_handle`, `suspended`. |
| error.url | string, uri | With consent_required: open this dashboard page to grant profile editing. |
| error.field | string | With `invalid_listing`: the refused field. |
| error.scope | string | With `insufficient_scope`: the scope the token lacks. |
| error.parameter | string | The invalid query parameter. |
| error.retryAfterSeconds | integer (1–) | With `rate_limited`. |
ToolPlcHistory
| Field | Type | Description |
|---|---|---|
| tool (required) | string = "plc-history" | The tool's slug. |
| url (required) | string | The canonical URL of the tool's page on Bluesky.bot. |
| result (required) | object | The tool's answer. |
| result.did (required) | string | The 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 | null | The identity at a glance; null unless `kind` is `history`. |
| result.truncated (required) | boolean | More 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) | string | The operation's CID. |
| result.operations[].createdAt (required) | string | When 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) | boolean | Overridden 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 | null | Before: the handle, the PDS endpoint or the signing key; null when absent or not applicable. |
| result.operations[].events[].to (required) | string | null | After: 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[].operation | object | The operation as the PLC directory published it, with `include_raw` only. |
| result.page (required) | integer | The page of operations returned. |
| result.pages (required) | integer | How 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) | string | When the server changed. |