pub.techne.draft.identity.manageMethods
The identity PDS's signed hook for the sign-in method rules (the account page and sign-in page call it; the rules live on the platform so every client obeys the same ones). Authenticated only by the epds-signature MAC with the identity hook secret; no session, OAuth or service-JWT caller reaches it, and every answer is signed. The PDS vouches for the signed-in account (`did`, which must be hosted on the calling PDS, else 404 UnknownAccount) and for the step-up it just checked (`stepUp`: which method, when; it counts for 10 minutes). Rules: a recovery method acting with a fresh step-up acts at once; anything else removes a method or deletes the account after a 7-day wait with an email notice, if it has any email method, cancellable by any of the account's methods, a frozen one too (`cancel`); a wait re-checks these rules when it runs out (a method marked for recovery meanwhile is not removed; a first mark is dropped once another method is marked; a wait during which any of the account's methods was frozen, even if a recovery method lifted the freeze early or removed the method, is dropped, not completed, since a frozen method can't sign in to cancel it, and every email method gets a `waitDropped` notice naming the change); a freeze is immediate, from a different method with a fresh step-up, and lasts 7 days or until a recovery method lifts it (`unfreeze`); a recovery method is never frozen, removed or unmarked by an unmarked one; the last way to sign in is never removed; marking a recovery method needs a fresh step-up of one, except the account's first, which needs a fresh step-up of any of its methods (else StepUpRequired) and waits 24 hours with an email notice, if the account has any email method. Notices are email only: the platform sends every one itself, wherever the account is hosted, to each of the account's email methods (never by phone or Nostr); the PDS sends none. Ops: `list` (the account's methods, each email and phone also with its full `value` for the owner's own account page, pending changes (an open `moveMethod` onto the account included), `hasRecovery`, and `person`, the other accounts of its person), `signInMethods` (for a sign-in page that knows only the account, "Sign in as @handle": the methods that can sign in now, each a masked `display` for any page and a masked `displayDevice` for the PDS's chooser of the accounts already signed in on that browser, never its full value; no step-up, recovery marks or pending changes), `sendTo` (the full email or phone of one of them, for the PDS to send a sign-in code to; never shown), `remove`, `cancel`, `freeze` (with `signOut`), `unfreeze`, `mark`, `unmark`, `signOut` (sign out everywhere the platform holds a session; the PDS revokes its own), `delete`, `addExternal` (a passkey or Nostr key the PDS proved; always a fresh step-up of one of the account's methods, StepUpRequired without one, and never a program's, ProgramRefused), `newRecoveryCodes` (returned once; a new set ends the old; always a fresh step-up, and on an account with no recovery method the set is its first mark, which waits 24 hours; a first set is refused, MethodFrozen, while one of the account's methods is frozen), `redeemCode`, `setPrograms` ("Programs can sign in with this key" on or off, `on`, for a Nostr key, the only type that supports it: on and off both need a fresh step-up of one of the account's methods that is not a program, not frozen (a step-up by a key with programs on is ProgramRefused, so that key never switches itself off); on is also refused from the key itself, SameMethod, for a recovery method or one whose first mark is waiting, IsRecovery, and while a method of the account is frozen, MethodFrozen), `addChannel` (a `channel` the PDS just proved for `did`, as identity.finishAddMethod does for a session: `added`, `alreadyYours`, or `boundElsewhere`: when both accounts hold something, with the `other` account and its `method` (the account page offers `moveMethod`), else with a fold `offer` (identity.finishAddMethod#offer), single use, 10 minutes, bound to `did` on this hook and to no session; MethodFrozen when the channel is frozen on any account, MethodFrozen when `did` itself has a frozen method and the channel would be new to it (no method is added past a freeze; `addExternal` likewise), and, on the fold path only (one of the two accounts holds nothing, so an `offer` would be made), ProtectedAccount when either account has a recovery mark, a freeze, a pending change, or a passkey, Nostr key or recovery codes; when both hold something the answer names `other` and `method` and moveMethod's own refusals apply), `fold` (take that offer: `token`; needs a fresh step-up of `did`; ProtectedAccount (a live freeze included) and NotEmpty, checked again; `folded` with the kept `did` and the `emptied` one, which is deleted (on the identity PDS too, by `dueDeletes`)), `moveMethod` (link two accounts: move an email or phone method of account `from` onto `did` and make the two accounts one person, every DID of each linked to every other in `alsoKnownAs`; needs a fresh step-up of `did` and one of `from` (`fromStepUp`, else FromStepUpRequired); refused, nothing scheduled, when a method of either person is frozen (Frozen), either has a pending change (PendingChange), the person would hold more than 4 accounts (TooMany), the two are already one person or the same account (Same), or no key can write `alsoKnownAs` for one of their DIDs (NoKey); a method marked for recovery on `from` moves only with a `fromStepUp` of a recovery method of `from` (RecoveryProtected); it is never done inside the call: the answer is `pending` (the change, a pending change of `from`, as a defs#pendingChange as `did`'s `list` shows it) with `due`, its `dueAt`: now for a move such a step-up proved, else 7 days on, a wait `from` is told about by email (a recovery-proven move is told only when it completes), which any method of either account can `cancel`, and which a freeze of either person's methods drops (`waitDropped` to `from`); the platform completes it once due: a move whose key check or `alsoKnownAs` writes fail is tried again after a backoff (2^tries minutes, at most an hour), one refused for good (no key we can ask holds it, or the identity PDS refuses the account) is dropped with a `moveDropped` email to both accounts, one still failing 24 hours past `due` is dropped with `moveTimedOut`, one whose accounts changed meanwhile (the method gone, or marked for recovery since unless a recovery method proved the move; a refusal above other than a freeze; or a recovery-proven requester no longer a recovery method) is dropped with `moveCancelled` to both, and a completed one sends every account of the person a `linked` email), `unlink` (account `other` leaves `did`'s person at once; the removal of the `alsoKnownAs` entries between it and the rest is queued, tried again after a failure, and given up after about a day, or at once when refused for good, with an `akaLeft` email to both accounts of the entry; needs a fresh step-up of `did`; when `other` would be left with no way to sign in, `method`, one of `did`'s email or phone methods, is required (else NeedsMethod) and moves to `other`, which needs a step-up of a recovery method of `did` or of that method itself (NeedsRecoveryMethod), a recovery method's step-up for a method marked for recovery (RecoveryProtected), a method that is not frozen (MethodFrozen) and not `did`'s last way to sign in (LastMethod); NotLinked when `other` is not in `did`'s person; an email handed to `other` is released from `did`'s identity-PDS account, tried again after a failure and given up after about a day with an `emailLeft` email to `did`; both accounts get an `unlinked` email), `link` (retired, answers 400 InvalidRequest: a link is `moveMethod` now), `importBackupEmails` (once per account, recorded: a second call answers `alreadyImported` even after every mark is taken off; the move of the PDS's verified backup emails, `backupEmails`, each with when the PDS verified it: one verified before 2026-11-13T00:00:00Z becomes an email method marked for recovery at once, without step-up or wait, and one verified at or after it is skipped, `afterCutoff`, since only the holder could have added one before these rules; only an account with no recovery method takes one, all of its addresses in one call (each address once, else 400 InvalidRequest), else `hasRecovery`, nothing changes and the import is spent; a call that marks none of them spends it too; MethodFrozen while one of the account's methods is frozen, not spent; `indexOff` while the identity index is off), `notices` and `noticesSent` (no `did`; unused, kept for older clients: `notices` always answers an empty list and `noticesSent` `count: 0`, since the platform sends every notice itself), for a login service that just checked a signature by a Nostr key and knows no account yet (no `did`) `findKey` (`external`, type `nostr` and the 64-character lowercase hex key: `none` when no account the calling PDS hosts has it, else `done` with the account's `did`, the key's `method`, whether that method is `frozen` now, and whether `programs` may sign in with it), and for scheduled account deletions that came due (no `did`; only the accounts the calling PDS hosts) `dueDeletes` (up to 100 accounts the platform has deleted on its side, which the PDS deletes too; one taken and not confirmed is offered again after 5 minutes, without limit) and `dueDeletesDone` (`dids` the PDS deleted), and for a consent screen after sign-in `operator` (`operator`: whether `did` is one of the platform's operators, so the PDS offers the moderate scope, `include:pub.techne.draft.authModerate`, to operators only and drops it from everyone else's grant). Programs: a key with programs on can't be marked (ProgramsOn), and a program never touches account security: when the PDS says a program made the request (`program`), or the step-up names a key with programs on, every op but `list`, `signInMethods` and `sendTo` is 403 ProgramRefused (`operator` included: a program never moderates), `setPrograms` included: such a key's programs are turned off by a step-up of another of the account's methods.
Details · procedure
| Kind | procedure |
|---|---|
| Authority | identity.draft.techne.pub |
| Commit rev | 3n3iob5mtgw2u |
| Indexed |
Checks
Validunlimited-stringdefs.external.properties.typeNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.importedEmail.properties.emailNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.importedEmail.properties.statusNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.input.schema.properties.opNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.output.schema.properties.codes.itemsNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.output.schema.properties.methodNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.output.schema.properties.statusNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.notice.properties.eventNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.noticeTo.properties.typeNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.noticeTo.properties.valueNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.provedMethod.properties.typeNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.signInMethod.properties.idNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.signInMethod.properties.typeNo maxLength, maxGraphemes or format limits this string.
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"backupEmail": {
"description": "One backup email importBackupEmails moves, with when the PDS verified it.",
"properties": {
"email": {
"maxLength": 320,
"type": "string"
},
"verifiedAt": {
"description": "When the PDS verified the address. Only one verified before 2026-11-13T00:00:00Z is imported.",
"format": "datetime",
"type": "string"
}
},
"required": [
"email",
"verifiedAt"
],
"type": "object"
},
"dueDelete": {
"description": "An account whose scheduled deletion ran on the platform: the PDS deletes its PDS account, then confirms (`dueDeletesDone`). An account already gone from the PDS counts as deleted.",
"properties": {
"deletedAt": {
"description": "When the platform deleted its side.",
"format": "datetime",
"type": "string"
},
"did": {
"format": "did",
"type": "string"
}
},
"required": [
"did",
"deletedAt"
],
"type": "object"
},
"external": {
"properties": {
"label": {
"maxLength": 128,
"type": "string"
},
"ref": {
"description": "The passkey credential id, or the Nostr key (hex).",
"maxLength": 512,
"type": "string"
},
"type": {
"knownValues": [
"passkey",
"nostr"
],
"type": "string"
}
},
"required": [
"type",
"ref"
],
"type": "object"
},
"importedEmail": {
"description": "One address importBackupEmails was sent, with what happened to it.",
"properties": {
"email": {
"type": "string"
},
"status": {
"description": "`marked`: an email method of the account now, marked for recovery. `boundElsewhere`: on another account, left there. `released`: the account removed it; only adding it again binds it back. `invalid`: not an email address. `afterCutoff`: verified at or after 2026-11-13T00:00:00Z, not imported (add it and mark it under the rules).",
"knownValues": [
"marked",
"boundElsewhere",
"released",
"invalid",
"afterCutoff"
],
"type": "string"
}
},
"required": [
"email",
"status"
],
"type": "object"
},
"main": {
"description": "The identity PDS's signed hook for the sign-in method rules (the account page and sign-in page call it; the rules live on the platform so every client obeys the same ones). Authenticated only by the epds-signature MAC with the identity hook secret; no session, OAuth or service-JWT caller reaches it, and every answer is signed. The PDS vouches for the signed-in account (`did`, which must be hosted on the calling PDS, else 404 UnknownAccount) and for the step-up it just checked (`stepUp`: which method, when; it counts for 10 minutes). Rules: a recovery method acting with a fresh step-up acts at once; anything else removes a method or deletes the account after a 7-day wait with an email notice, if it has any email method, cancellable by any of the account's methods, a frozen one too (`cancel`); a wait re-checks these rules when it runs out (a method marked for recovery meanwhile is not removed; a first mark is dropped once another method is marked; a wait during which any of the account's methods was frozen, even if a recovery method lifted the freeze early or removed the method, is dropped, not completed, since a frozen method can't sign in to cancel it, and every email method gets a `waitDropped` notice naming the change); a freeze is immediate, from a different method with a fresh step-up, and lasts 7 days or until a recovery method lifts it (`unfreeze`); a recovery method is never frozen, removed or unmarked by an unmarked one; the last way to sign in is never removed; marking a recovery method needs a fresh step-up of one, except the account's first, which needs a fresh step-up of any of its methods (else StepUpRequired) and waits 24 hours with an email notice, if the account has any email method. Notices are email only: the platform sends every one itself, wherever the account is hosted, to each of the account's email methods (never by phone or Nostr); the PDS sends none. Ops: `list` (the account's methods, each email and phone also with its full `value` for the owner's own account page, pending changes (an open `moveMethod` onto the account included), `hasRecovery`, and `person`, the other accounts of its person), `signInMethods` (for a sign-in page that knows only the account, \"Sign in as @handle\": the methods that can sign in now, each a masked `display` for any page and a masked `displayDevice` for the PDS's chooser of the accounts already signed in on that browser, never its full value; no step-up, recovery marks or pending changes), `sendTo` (the full email or phone of one of them, for the PDS to send a sign-in code to; never shown), `remove`, `cancel`, `freeze` (with `signOut`), `unfreeze`, `mark`, `unmark`, `signOut` (sign out everywhere the platform holds a session; the PDS revokes its own), `delete`, `addExternal` (a passkey or Nostr key the PDS proved; always a fresh step-up of one of the account's methods, StepUpRequired without one, and never a program's, ProgramRefused), `newRecoveryCodes` (returned once; a new set ends the old; always a fresh step-up, and on an account with no recovery method the set is its first mark, which waits 24 hours; a first set is refused, MethodFrozen, while one of the account's methods is frozen), `redeemCode`, `setPrograms` (\"Programs can sign in with this key\" on or off, `on`, for a Nostr key, the only type that supports it: on and off both need a fresh step-up of one of the account's methods that is not a program, not frozen (a step-up by a key with programs on is ProgramRefused, so that key never switches itself off); on is also refused from the key itself, SameMethod, for a recovery method or one whose first mark is waiting, IsRecovery, and while a method of the account is frozen, MethodFrozen), `addChannel` (a `channel` the PDS just proved for `did`, as identity.finishAddMethod does for a session: `added`, `alreadyYours`, or `boundElsewhere`: when both accounts hold something, with the `other` account and its `method` (the account page offers `moveMethod`), else with a fold `offer` (identity.finishAddMethod#offer), single use, 10 minutes, bound to `did` on this hook and to no session; MethodFrozen when the channel is frozen on any account, MethodFrozen when `did` itself has a frozen method and the channel would be new to it (no method is added past a freeze; `addExternal` likewise), and, on the fold path only (one of the two accounts holds nothing, so an `offer` would be made), ProtectedAccount when either account has a recovery mark, a freeze, a pending change, or a passkey, Nostr key or recovery codes; when both hold something the answer names `other` and `method` and moveMethod's own refusals apply), `fold` (take that offer: `token`; needs a fresh step-up of `did`; ProtectedAccount (a live freeze included) and NotEmpty, checked again; `folded` with the kept `did` and the `emptied` one, which is deleted (on the identity PDS too, by `dueDeletes`)), `moveMethod` (link two accounts: move an email or phone method of account `from` onto `did` and make the two accounts one person, every DID of each linked to every other in `alsoKnownAs`; needs a fresh step-up of `did` and one of `from` (`fromStepUp`, else FromStepUpRequired); refused, nothing scheduled, when a method of either person is frozen (Frozen), either has a pending change (PendingChange), the person would hold more than 4 accounts (TooMany), the two are already one person or the same account (Same), or no key can write `alsoKnownAs` for one of their DIDs (NoKey); a method marked for recovery on `from` moves only with a `fromStepUp` of a recovery method of `from` (RecoveryProtected); it is never done inside the call: the answer is `pending` (the change, a pending change of `from`, as a defs#pendingChange as `did`'s `list` shows it) with `due`, its `dueAt`: now for a move such a step-up proved, else 7 days on, a wait `from` is told about by email (a recovery-proven move is told only when it completes), which any method of either account can `cancel`, and which a freeze of either person's methods drops (`waitDropped` to `from`); the platform completes it once due: a move whose key check or `alsoKnownAs` writes fail is tried again after a backoff (2^tries minutes, at most an hour), one refused for good (no key we can ask holds it, or the identity PDS refuses the account) is dropped with a `moveDropped` email to both accounts, one still failing 24 hours past `due` is dropped with `moveTimedOut`, one whose accounts changed meanwhile (the method gone, or marked for recovery since unless a recovery method proved the move; a refusal above other than a freeze; or a recovery-proven requester no longer a recovery method) is dropped with `moveCancelled` to both, and a completed one sends every account of the person a `linked` email), `unlink` (account `other` leaves `did`'s person at once; the removal of the `alsoKnownAs` entries between it and the rest is queued, tried again after a failure, and given up after about a day, or at once when refused for good, with an `akaLeft` email to both accounts of the entry; needs a fresh step-up of `did`; when `other` would be left with no way to sign in, `method`, one of `did`'s email or phone methods, is required (else NeedsMethod) and moves to `other`, which needs a step-up of a recovery method of `did` or of that method itself (NeedsRecoveryMethod), a recovery method's step-up for a method marked for recovery (RecoveryProtected), a method that is not frozen (MethodFrozen) and not `did`'s last way to sign in (LastMethod); NotLinked when `other` is not in `did`'s person; an email handed to `other` is released from `did`'s identity-PDS account, tried again after a failure and given up after about a day with an `emailLeft` email to `did`; both accounts get an `unlinked` email), `link` (retired, answers 400 InvalidRequest: a link is `moveMethod` now), `importBackupEmails` (once per account, recorded: a second call answers `alreadyImported` even after every mark is taken off; the move of the PDS's verified backup emails, `backupEmails`, each with when the PDS verified it: one verified before 2026-11-13T00:00:00Z becomes an email method marked for recovery at once, without step-up or wait, and one verified at or after it is skipped, `afterCutoff`, since only the holder could have added one before these rules; only an account with no recovery method takes one, all of its addresses in one call (each address once, else 400 InvalidRequest), else `hasRecovery`, nothing changes and the import is spent; a call that marks none of them spends it too; MethodFrozen while one of the account's methods is frozen, not spent; `indexOff` while the identity index is off), `notices` and `noticesSent` (no `did`; unused, kept for older clients: `notices` always answers an empty list and `noticesSent` `count: 0`, since the platform sends every notice itself), for a login service that just checked a signature by a Nostr key and knows no account yet (no `did`) `findKey` (`external`, type `nostr` and the 64-character lowercase hex key: `none` when no account the calling PDS hosts has it, else `done` with the account's `did`, the key's `method`, whether that method is `frozen` now, and whether `programs` may sign in with it), and for scheduled account deletions that came due (no `did`; only the accounts the calling PDS hosts) `dueDeletes` (up to 100 accounts the platform has deleted on its side, which the PDS deletes too; one taken and not confirmed is offered again after 5 minutes, without limit) and `dueDeletesDone` (`dids` the PDS deleted), and for a consent screen after sign-in `operator` (`operator`: whether `did` is one of the platform's operators, so the PDS offers the moderate scope, `include:pub.techne.draft.authModerate`, to operators only and drops it from everyone else's grant). Programs: a key with programs on can't be marked (ProgramsOn), and a program never touches account security: when the PDS says a program made the request (`program`), or the step-up names a key with programs on, every op but `list`, `signInMethods` and `sendTo` is 403 ProgramRefused (`operator` included: a program never moderates), `setPrograms` included: such a key's programs are turned off by a step-up of another of the account's methods.",
"errors": [
{
"name": "BadSignature"
},
{
"name": "InvalidRequest"
},
{
"name": "UnknownAccount"
},
{
"name": "RateLimitExceeded"
},
{
"description": "Try again (`redeemCode` and `newRecoveryCodes` also while the platform's identity keys are not loaded).",
"name": "Unavailable"
},
{
"description": "No such method or pending change on the account (moveMethod: `from` has no such method).",
"name": "NotFound"
},
{
"description": "The step-up names a method that is not the account's.",
"name": "NotYourMethod"
},
{
"description": "It would leave no way to sign in (unlink: the method handed to `other` is `did`'s only one).",
"name": "LastMethod"
},
{
"description": "Only a recovery method can do this to a recovery method (moveMethod: of `from`; unlink: of `did`).",
"name": "RecoveryProtected"
},
{
"description": "Needs a fresh step-up of a recovery method (unlink: or of the method handed to `other` itself).",
"name": "NeedsRecoveryMethod"
},
{
"description": "Needs a fresh step-up (an account's first recovery mark, `newRecoveryCodes`, `fold`, `moveMethod` and `unlink` included).",
"name": "StepUpRequired"
},
{
"description": "A method cannot freeze itself.",
"name": "SameMethod"
},
{
"description": "The acting method is frozen (for `sendTo`: the method named is; for `addChannel`: the channel is, on whichever account, or the channel would be new to `did` while one of its methods is frozen; for `addExternal`, a first `newRecoveryCodes` set and `importBackupEmails`: one of `did`'s methods is frozen, and the message says so; for `unlink`: the method handed to `other` is).",
"name": "MethodFrozen"
},
{
"description": "fold: the offer is unknown, used, expired, for the other action, or not made to `did` on this hook.",
"name": "InvalidToken"
},
{
"description": "addChannel / fold: one of the two accounts has a recovery mark, a live freeze, a pending change, or a passkey, Nostr key or recovery codes; it is never folded, and addChannel answers this before any `boundElsewhere`, so nothing about the other account is sent (HTTP 409).",
"name": "ProtectedAccount"
},
{
"description": "fold: the account to fold gained a record or is 7 days old or more; link it with `moveMethod` instead (HTTP 409).",
"name": "NotEmpty"
},
{
"description": "A program asked (`program`, or a step-up by a key with programs on): account security needs a person on a method no program holds.",
"name": "ProgramRefused"
},
{
"description": "mark: the key has programs on; turn that off first (HTTP 409).",
"name": "ProgramsOn"
},
{
"description": "setPrograms on: the method is a recovery method, or its first mark is waiting (HTTP 409).",
"name": "IsRecovery"
},
{
"description": "moveMethod: `fromStepUp` is missing, malformed, not fresh, or names none of `from`'s methods (HTTP 403).",
"name": "FromStepUpRequired"
},
{
"description": "moveMethod: a method of an account of either person is frozen; nothing is scheduled (HTTP 409).",
"name": "Frozen"
},
{
"description": "moveMethod: an account of either person has a pending change, a move included; nothing is scheduled (HTTP 409).",
"name": "PendingChange"
},
{
"description": "moveMethod: the person would hold more than 4 accounts (HTTP 409).",
"name": "TooMany"
},
{
"description": "moveMethod: the two accounts are already one person, or the same account (HTTP 409).",
"name": "Same"
},
{
"description": "moveMethod: no key this platform or the identity PDS holds can write `alsoKnownAs` for an account of either person; nothing is scheduled (HTTP 409).",
"name": "NoKey"
},
{
"description": "unlink: `other` would be left with no way to sign in; name one of `did`'s email or phone methods to hand it (`method`) (HTTP 409).",
"name": "NeedsMethod"
},
{
"description": "unlink: `other` is not in `did`'s person, or is `did` (HTTP 404).",
"name": "NotLinked"
}
],
"input": {
"encoding": "application/json",
"schema": {
"properties": {
"backupEmails": {
"description": "importBackupEmails: the account's verified backup email addresses, all of them, each with when the PDS verified it.",
"items": {
"ref": "#backupEmail",
"type": "ref"
},
"maxLength": 10,
"type": "array"
},
"channel": {
"description": "addChannel: the email or phone the PDS just proved (a code it sent and checked).",
"ref": "pub.techne.draft.identity.defs#channel",
"type": "ref"
},
"code": {
"description": "A recovery code, for `redeemCode`.",
"maxLength": 64,
"type": "string"
},
"did": {
"description": "The signed-in account. Required for every op but `notices`, `noticesSent`, `dueDeletes` and `dueDeletesDone`.",
"format": "did",
"type": "string"
},
"dids": {
"description": "dueDeletesDone: the accounts whose PDS account was deleted.",
"items": {
"format": "did",
"type": "string"
},
"maxLength": 100,
"type": "array"
},
"emails": {
"description": "Retired, not read: a bare list has no verification dates, so the cutoff can't hold. importBackupEmails without `backupEmails` is 400 InvalidRequest.",
"items": {
"maxLength": 320,
"type": "string"
},
"maxLength": 10,
"type": "array"
},
"external": {
"ref": "#external",
"type": "ref"
},
"from": {
"description": "moveMethod: the account the method leaves.",
"format": "did",
"type": "string"
},
"fromStepUp": {
"description": "moveMethod: what the PDS's step-up of `from` proved (fresh, one of `from`'s methods).",
"ref": "#stepUp",
"type": "ref"
},
"ids": {
"description": "Unused, kept for older clients: notice ids for `noticesSent`, which confirms none.",
"items": {
"type": "integer"
},
"maxLength": 100,
"type": "array"
},
"method": {
"description": "The method acted on (its `id` in `list` or `signInMethods`). moveMethod: the method of `from` that moves onto `did`. unlink: the method of `did` handed to `other` when `other` would have none left.",
"maxLength": 64,
"type": "string"
},
"on": {
"description": "setPrograms: on or off.",
"type": "boolean"
},
"op": {
"description": "The op. `link` is retired: it answers 400 InvalidRequest; `moveMethod` links two accounts now.",
"knownValues": [
"list",
"signInMethods",
"sendTo",
"remove",
"cancel",
"freeze",
"unfreeze",
"mark",
"unmark",
"signOut",
"delete",
"addExternal",
"newRecoveryCodes",
"redeemCode",
"setPrograms",
"importBackupEmails",
"findKey",
"notices",
"noticesSent",
"dueDeletes",
"dueDeletesDone",
"addChannel",
"fold",
"link",
"moveMethod",
"unlink",
"operator"
],
"type": "string"
},
"other": {
"description": "unlink: the account that leaves `did`'s person.",
"format": "did",
"type": "string"
},
"pending": {
"description": "The pending change `cancel` cancels.",
"maxLength": 64,
"type": "string"
},
"primary": {
"description": "Retired, not read: it was the retired `link` op's primary account. Linked accounts have no primary.",
"format": "did",
"type": "string"
},
"program": {
"description": "A program made this request: a session or token the PDS's programmatic sign-in opened. Account security is refused (ProgramRefused).",
"type": "boolean"
},
"signOut": {
"description": "With `freeze`: also sign out everywhere.",
"type": "boolean"
},
"stepUp": {
"ref": "#stepUp",
"type": "ref"
},
"token": {
"description": "fold: the offer's token from addChannel. (link, retired, took one too.)",
"maxLength": 128,
"type": "string"
},
"v": {
"const": 1,
"type": "integer"
}
},
"required": [
"v",
"op"
],
"type": "object"
}
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"codes": {
"description": "newRecoveryCodes: the codes, shown once.",
"items": {
"type": "string"
},
"type": "array"
},
"count": {
"description": "dueDeletesDone: how many were confirmed. noticesSent (unused, kept for older clients): always 0.",
"type": "integer"
},
"did": {
"description": "fold: the kept account. findKey: the account the key signs in to.",
"format": "did",
"type": "string"
},
"due": {
"description": "moveMethod `pending`: when the move is due (now for one a recovery method of `from` proved, else 7 days on). The platform completes it then or after a failed try, unless it is cancelled or dropped.",
"format": "datetime",
"type": "string"
},
"dueDeletes": {
"description": "dueDeletes: accounts to delete on the PDS, oldest first.",
"items": {
"ref": "#dueDelete",
"type": "ref"
},
"type": "array"
},
"emptied": {
"description": "fold: the account folded in and deleted.",
"format": "did",
"type": "string"
},
"frozen": {
"description": "findKey: the key's method is frozen now and can't sign in.",
"type": "boolean"
},
"hasRecovery": {
"type": "boolean"
},
"imported": {
"description": "importBackupEmails: each address sent, with what happened to it.",
"items": {
"ref": "#importedEmail",
"type": "ref"
},
"type": "array"
},
"link": {
"description": "Retired: the retired `link` op's answer.",
"ref": "pub.techne.draft.identity.defs#linkView",
"type": "ref"
},
"method": {
"description": "addExternal's new method id, the recovery-code set redeemCode used, or addChannel's method id when `added` or `alreadyYours` (empty while the identity index is off); findKey's method id of the key. addChannel `boundElsewhere` when both accounts hold something: the other account's method id, for `moveMethod` (identity.finishAddMethod's session answer leaves it out).",
"type": "string"
},
"methods": {
"description": "list: the account's methods (`value` on emails and phones; see defs#methodView).",
"items": {
"ref": "pub.techne.draft.identity.defs#methodView",
"type": "ref"
},
"type": "array"
},
"notices": {
"description": "Unused, kept for older clients: always empty. The platform emails every notice itself.",
"items": {
"ref": "#notice",
"type": "ref"
},
"type": "array"
},
"offer": {
"description": "addChannel `boundElsewhere`: what `did` can do, with `fold` or `link`.",
"ref": "pub.techne.draft.identity.finishAddMethod#offer",
"type": "ref"
},
"operator": {
"description": "operator: whether `did` is one of the platform's operators.",
"type": "boolean"
},
"other": {
"description": "addChannel `boundElsewhere` when both accounts hold something: the account the channel signs in to (for `moveMethod`'s `from`).",
"format": "did",
"type": "string"
},
"otherPerson": {
"description": "addChannel `boundElsewhere` (either form): the other accounts of the person of the account the channel signs in to, now (`did`, `handle` when known), that account itself left out; empty when it is alone.",
"items": {
"ref": "pub.techne.draft.identity.defs#personMember",
"type": "ref"
},
"type": "array"
},
"pending": {
"description": "The change that waits. moveMethod's `pending` answer carries the change here, as `did`'s `list` shows it (`other` and `method`: the account the method comes from and that method), with `due`; `list` answers every pending change of the account as an array.",
"ref": "pub.techne.draft.identity.defs#pendingChange",
"type": "ref"
},
"person": {
"description": "list: the other accounts of `did`'s person (empty when it is alone). moveMethod no longer answers `done`, which carried the person's accounts here.",
"items": {
"ref": "pub.techne.draft.identity.defs#personMember",
"type": "ref"
},
"type": "array"
},
"programs": {
"description": "findKey: \"Programs can sign in with this key\" is on.",
"type": "boolean"
},
"signInMethods": {
"description": "signInMethods: the account's methods that can sign in now (not frozen), oldest first.",
"items": {
"ref": "#signInMethod",
"type": "ref"
},
"type": "array"
},
"status": {
"description": "`done`: it happened now. `pending`: it waits (`pending`). `deleted` / `deleting` (`delete` done now): the account is gone / its local half is gone and a sweep finishes the rest (deleteAccount's `deleted` / `pending`; a deletion that could not start answers 503 Unavailable, try again). `bound`: addExternal's key is on another account. `invalid`: redeemCode's code is wrong, used, or the set is not a recovery method or is frozen. `hasRecovery`: importBackupEmails found a recovery method on the account; nothing changed. `indexOff`: importBackupEmails can't mark anything while the identity index is off; nothing changed. `alreadyImported`: importBackupEmails ran for this account before; nothing changed. `added` / `alreadyYours` / `boundElsewhere` / `unavailable`: addChannel, as identity.finishAddMethod. `folded`: fold done. `linked`: retired (the retired `link` op's answer). moveMethod answers `pending` only, with `pending` (the change, a defs#pendingChange) and `due`. `none`: findKey's key is no method of an account the calling PDS hosts.",
"knownValues": [
"done",
"pending",
"deleted",
"deleting",
"bound",
"invalid",
"hasRecovery",
"indexOff",
"alreadyImported",
"added",
"alreadyYours",
"boundElsewhere",
"unavailable",
"folded",
"linked",
"none"
],
"type": "string"
},
"to": {
"description": "sendTo: where the code goes, in full.",
"ref": "#noticeTo",
"type": "ref"
},
"v": {
"const": 1,
"type": "integer"
}
},
"required": [
"v"
],
"type": "object"
}
},
"type": "procedure"
},
"notice": {
"description": "Unused, kept for older clients: `notices` always answers an empty list. The platform emails every notice itself, to the account's email methods only.",
"properties": {
"createdAt": {
"format": "datetime",
"type": "string"
},
"did": {
"format": "did",
"type": "string"
},
"event": {
"description": "What the notice is about: a change that started to wait (`removeMethod`, `deleteAccount`, `markRecovery`, `moveMethod`), a `freeze`, `waitDropped`: the change in `pending` was not completed because one of the account's methods was frozen during its wait, `programsOn`: programs can now sign in with one of the account's Nostr keys (`setPrograms` on; no `pending`), `linked` / `unlinked`: a link (moveMethod completed) or an unlink changed the account's person, `moveDropped` / `moveTimedOut` / `moveCancelled`: a move was dropped because a key can't be used or the identity PDS refused it for good, because it still could not be written 24 hours past due, or because something changed on one of its accounts, or `akaLeft` / `emailLeft`: an `alsoKnownAs` entry or an identity-PDS account email the platform owed removing was given up and is left.",
"knownValues": [
"removeMethod",
"deleteAccount",
"markRecovery",
"freeze",
"waitDropped",
"programsOn",
"moveMethod",
"linked",
"unlinked",
"moveDropped",
"moveTimedOut",
"moveCancelled",
"akaLeft",
"emailLeft"
],
"type": "string"
},
"id": {
"type": "integer"
},
"pending": {
"ref": "pub.techne.draft.identity.defs#pendingChange",
"type": "ref"
},
"to": {
"ref": "#noticeTo",
"type": "ref"
}
},
"required": [
"id",
"did",
"event",
"to",
"createdAt"
],
"type": "object"
},
"noticeTo": {
"description": "An email or phone number in full: `sendTo`'s `to`. Also the shape of #notice's `to`, which is unused and kept for older clients (notices go to email methods only).",
"properties": {
"type": {
"knownValues": [
"email",
"phone",
"nostr"
],
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"type",
"value"
],
"type": "object"
},
"provedMethod": {
"properties": {
"type": {
"knownValues": [
"email",
"phone",
"passkey",
"nostr",
"recoveryCodes"
],
"type": "string"
},
"value": {
"description": "The email or E.164 phone, the passkey credential id, or the Nostr key (hex). None for recoveryCodes.",
"maxLength": 512,
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
"signInMethod": {
"description": "One way to sign in, as a page may show it before anyone has signed in: masked, never its full value (though an address whose local part is one character is fully implied).",
"properties": {
"display": {
"description": "For any page, one reached by typing a handle included: an email keeps its first character and, at a common email provider, its domain (`a•••@gmail.com`), at any other domain only the domain's last part (`a•••@•••.dev`; `a•••@•••` for a domain with no dot); a phone its last two digits (`•••• 97`); a passkey or Nostr key its label.",
"maxLength": 320,
"type": "string"
},
"displayDevice": {
"description": "Only for the PDS's chooser of the accounts already signed in on that browser, never for a page reached by typing a handle: an email keeps its first character and its whole domain (`a•••@example.dev`), a phone its last four digits (`••• ••• 4242`); a passkey or Nostr key its label, as `display`. Present exactly when `display` is. Absent from a platform older than this field: use `display`.",
"maxLength": 320,
"type": "string"
},
"id": {
"description": "The method id (for `sendTo`, and the PDS's own passkey or Nostr challenge).",
"type": "string"
},
"type": {
"knownValues": [
"email",
"phone",
"passkey",
"nostr"
],
"type": "string"
}
},
"required": [
"id",
"type",
"display"
],
"type": "object"
},
"stepUp": {
"description": "What the PDS's step-up proved.",
"properties": {
"method": {
"ref": "#provedMethod",
"type": "ref"
},
"provedAt": {
"format": "datetime",
"type": "string"
}
},
"required": [
"method",
"provedAt"
],
"type": "object"
}
},
"id": "pub.techne.draft.identity.manageMethods",
"lexicon": 1
}