full diff

social.grain.server.deleteAccount

grain.social +1 −1
From
bafyreibmvjluild5lag3jfoklw7ngh2q2cktsojzcnet7og74ihqemstaq indexed 2026-11-19 01:43 UTC View this version
To
bafyreie7gbuwg5y5kb5jgcxkwrl5qakoahxdj2or2bl2ritv2xpepjxb4u indexed 2026-11-22 01:36 UTC View this version

Compatibility

backward compatible No changes detected.

Changes

11{
22 "$type": "com.atproto.lexicon.schema",
33 "defs": {
44 "main": {
5 "description": "Deletes the asking account's grain data a part at a time, as knotless's dev.knotless.deleteAccountData does. Asked by the web's session cookie, from a page of the site, it deletes the account's records in every social.grain.* collection at its PDS with the session grain keeps for it, up to `limit` records a call, and answers whether it is done; the web asks again until it is, and a run cut short carries on where it stopped. Once nothing is left, grain drops what it indexed from the account, as for one deleted at its PDS, with its preferences, notification state, push tokens, mutes, story views and space invitations, keeping its takedowns, the labels given out and the reports about it; and it ends the account's web session, revoked at its PDS, logging the browser out of it. Asked with a service token, as the apps ask once they have deleted the records at their own PDS, it deletes nothing, and forgets the account only once its PDS lists no social.grain.* collection. The atproto account itself, and other apps' records in it, a Bluesky cross-post among them, are untouched. Only the account itself can ask.",
5 "description": "Deletes the asking account's grain data a part at a time, as knotless's dev.knotless.deleteAccountData does. Asked by the web's session cookie, from a page of the site, it deletes the account's records in every social.grain.* collection at its PDS with the session grain keeps for it, up to `limit` records a call, and answers whether it is done; the web asks again until it is, and a run cut short carries on where it stopped. Once nothing is left, grain drops what it indexed from the account, as for one deleted at its PDS, with its preferences, notification state, push tokens, mutes, story views and space invitations, keeping its takedowns, the labels given out and the reports about it; and it ends the account's web session, revoked at its PDS, logging the browser out of it. Asked with a service token, as the apps ask once they have deleted the records at their own PDS, committing the plans social.grain.server.getAccountDeletionPlan answers until one comes back empty, it deletes nothing, and forgets the account only once its PDS lists no social.grain.* collection. The atproto account itself, and other apps' records in it, a Bluesky cross-post among them, are untouched. Only the account itself can ask.",
66 "errors": [
77 {
88 "description": "No account asks, or the web's session for it has ended.",
99 "name": "AuthenticationRequired"
1010 },
1111 {
1212 "description": "The account asking is not the one named, or the cookie was sent from another site.",
1313 "name": "Forbidden"
1414 },
1515 {
1616 "description": "Asked with a service token while the account's PDS still holds grain records: delete them first.",
1717 "name": "RecordsRemain"
1818 }
1919 ],
2020 "input": {
2121 "encoding": "application/json",
2222 "schema": {
2323 "properties": {
2424 "did": {
2525 "description": "The account whose data goes: the one asking, named again so that no call deletes it by mistake.",
2626 "format": "did",
2727 "type": "string"
2828 },
2929 "limit": {
3030 "default": 400,
3131 "description": "The most records to delete in this call.",
3232 "maximum": 1000,
3333 "minimum": 1,
3434 "type": "integer"
3535 }
3636 },
3737 "required": [
3838 "did"
3939 ],
4040 "type": "object"
4141 }
4242 },
4343 "output": {
4444 "encoding": "application/json",
4545 "schema": {
4646 "properties": {
4747 "deleted": {
4848 "description": "How many records this call deleted.",
4949 "minimum": 0,
5050 "type": "integer"
5151 },
5252 "done": {
5353 "description": "Whether nothing is left: grain has then forgotten the account, and logged it out.",
5454 "type": "boolean"
5555 }
5656 },
5757 "required": [
5858 "deleted",
5959 "done"
6060 ],
6161 "type": "object"
6262 }
6363 },
6464 "type": "procedure"
6565 }
6666 },
6767 "description": "Deletes every grain record from the asking account, then has grain forget it.",
6868 "id": "social.grain.server.deleteAccount",
6969 "lexicon": 1
7070}

Compare other versions