Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.
POST
/xrpc/com.atproto.repo.deleteRecord
const url = 'https://example.com/xrpc/com.atproto.repo.deleteRecord';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"repo":"example","rkey":"example","collection":"example","swapCommit":"example","swapRecord":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/xrpc/com.atproto.repo.deleteRecord \ --header 'Content-Type: application/json' \ --data '{ "repo": "example", "rkey": "example", "collection": "example", "swapCommit": "example", "swapRecord": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
repo
required
The handle or DID of the repo (aka, current account).
string format: at-identifier
rkey
required
The Record Key.
string format: record-key
collection
required
The NSID of the record collection.
string format: nsid
swapCommit
Compare and swap with the previous commit by CID.
string format: cid
swapRecord
Compare and swap with the previous record by CID.
string format: cid
Example generated
{ "repo": "example", "rkey": "example", "collection": "example", "swapCommit": "example", "swapRecord": "example"}Responses
Section titled “Responses”Success
Media typeapplication/json
object
commit
object
cid
required
string format: cid
rev
required
string format: tid
Example generated
{ "commit": { "cid": "example", "rev": "example" }}Bad Request
Media typeapplication/json
object
error
required
One of:
string
message
required
string
Example
{ "error": "InvalidSwap"}