pub.techne.draft.permissioned.deleteRecord
Delete one of your own permissioned records (or a collective's or circle's whose own member space you manage). One key holds one record per space: `space` names which goes; without it, the key's one record, Conflict when there are several. A tombstone stays in listChanges so readers drop their copies. Deleting a missing record is a no-op unless swapCid is given (InvalidSwap), or it names an app's space the caller may not delete in (Forbidden). When the call's token carries space scopes from Techne's ePDS, the delete must name its `space`, and one the scopes do not cover is refused 403 Forbidden. A record written for an app's space is deleted only under `space:` scopes covering it or with no scope claim: anyone else is 403 Forbidden. Draft tier.
Details · procedure
| Kind | procedure |
|---|---|
| Authority | permissioned.draft.techne.pub |
| Commit rev | 3n3iob6o5tw2u |
| Indexed |
Checks
Valid Lint pass{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "Delete one of your own permissioned records (or a collective's or circle's whose own member space you manage). One key holds one record per space: `space` names which goes; without it, the key's one record, Conflict when there are several. A tombstone stays in listChanges so readers drop their copies. Deleting a missing record is a no-op unless swapCid is given (InvalidSwap), or it names an app's space the caller may not delete in (Forbidden). When the call's token carries space scopes from Techne's ePDS, the delete must name its `space`, and one the scopes do not cover is refused 403 Forbidden. A record written for an app's space is deleted only under `space:` scopes covering it or with no scope claim: anyone else is 403 Forbidden. Draft tier.",
"errors": [
{
"description": "HTTP 400. Malformed parameters. Also HTTP 413, 415, 400 or 422 for a request body that is not the method's input (see the description).",
"name": "InvalidRequest"
},
{
"description": "HTTP 403. repo is not the caller's own (or a collective's or circle's the caller may write as, see the description); or the call's `space:` scopes do not cover the delete; or the record was written for an app's space (pub.techne.draft.space.private) under `space:` scopes that do not cover a delete there. Nothing is deleted.",
"name": "Forbidden"
},
{
"description": "HTTP 409. The write, as a circle, would leave it with members and nobody at role >= 30. Make someone else manager first. Nothing is written.",
"name": "LastManager"
},
{
"description": "HTTP 403. The caller's account is being deleted, or is deleted. Nothing is written.",
"name": "AccountDeleting"
},
{
"description": "HTTP 409. swapCid did not match the current version.",
"name": "InvalidSwap"
},
{
"description": "HTTP 409. No space was given and the key holds records for more than one space.",
"name": "Conflict"
},
{
"description": "HTTP 401. No credential, or one that fails verification (for a service-auth JWT: wrong aud or lxm, expired, replayed, or an issuer whose key does not resolve right now; retry later in that case).",
"name": "AuthenticationRequired"
},
{
"description": "HTTP 429. The caller has written faster than its per-DID write limit allows (by default 20 writes a second, a burst of 200; putRecord and deleteRecord each spend one, and putRecords one per call whatever the number of writes it carries; counted per AppView instance). Retry later.",
"name": "RateLimitExceeded"
}
],
"input": {
"encoding": "application/json",
"schema": {
"properties": {
"collection": {
"format": "nsid",
"type": "string"
},
"repo": {
"description": "The caller's own DID.",
"format": "did",
"type": "string"
},
"rkey": {
"format": "record-key",
"maxLength": 512,
"type": "string"
},
"space": {
"description": "The space the record was written for (its putRecord space). One key holds one record per space (the 0016 record address), so this names which one goes. Absent: the record at the key whatever its space, refused as Conflict when the key holds records for more than one space.",
"format": "at-uri",
"type": "string"
},
"swapCid": {
"description": "Delete only if the record's current CID is this one.",
"format": "cid",
"type": "string"
}
},
"required": [
"repo",
"collection",
"rkey"
],
"type": "object"
}
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"rev": {
"description": "The repo revision of the delete. Absent when there was nothing to delete.",
"format": "tid",
"type": "string"
}
},
"type": "object"
}
},
"type": "procedure"
}
},
"description": "Delete a record from the caller's own repo (a takedown, a mistake, or a `share` the owner withdraws, which stops that reader's future reads, with a 'revoke-read' receipt once no share in its source space names it). The caller authenticates with its own credential: a session from any sign-in lane (OAuth included), or an atproto service-auth JWT (iss = the caller, aud = the AppView's service DID, lxm = this method). repo must be the caller, or a collective or circle the platform holds the credential of whose own member space (`space.collective.member/self`) the caller manages (that space's manage leg alone hands over the authority's pen; managing another of its spaces does not); in a circle (a collective whose descriptor names a circle type) a caller holding only that space's write leg (role 20-29) holds the pen for pub.techne.draft.membership writes alone: an add (a new claim at a key that holds none now, not ending, whose addedBy is the caller or absent) or the caller's own claim (its leave, or a re-put keeping its subject and addedBy); anything else as the circle is Forbidden; any other repo is Forbidden; a caller whose account is being deleted, or is deleted, is refused (AccountDeleting). The body is removed; a tombstone receipt stays in listChanges, in the space the record counted in, so readers drop their copies. Deleting a record that does not exist is a no-op unless swapCid is given (then it is InvalidSwap) or the delete names an app's space the caller may not delete in (then it is Forbidden). A request body that is not this method's input is refused as InvalidRequest, with an XRPC error body ({\"error\":\"InvalidRequest\",\"message\":...}): HTTP 413 for a body over 2 MiB (2,097,152 bytes; it is not read past that); 415 for one not sent as application/json; 400 for one that is not JSON; 422 for JSON that is not the input (a field missing or of the wrong type). Such a refused write still spends one of the caller's writes (RateLimitExceeded). When the call's token carries space scopes from Techne's ePDS, the delete must name its `space`, and one the scopes do not cover is refused 403 Forbidden. A record written for an app's space (a pub.techne.draft.space.private space) is deleted only by a caller whose `space:` scopes cover a delete there or whose token carries no scope claim at all (an ePDS grant naming no `space:` scope carries an empty claim and reaches none); any other caller is refused 403 Forbidden and nothing is deleted, even when nothing is at the key. Draft tier.",
"id": "pub.techne.draft.permissioned.deleteRecord",
"lexicon": 1
}