com.atproto.repo.applyWrites
POST/xrpc/com.atproto.repo.applyWrites
This endpoint is part of the atproto PDS repository management APIs. Requests usually require authentication (unlike the com.atproto.sync.*
endpoints), and are made directly to the user's own PDS instance.
To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.
Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.
Request
- application/json
Body
required
Array [
- com.atproto.repo.applyWrites.create
- com.atproto.repo.applyWrites.update
- com.atproto.repo.applyWrites.delete
]
The handle or DID of the repo (aka, current account).
Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons.
writes
object[]
required
oneOf
Possible values: <= 15 characters
If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations.
Responses
- 200
- 400
- 401
OK
- application/json
- Schema
- Example (from schema)
Schema
Array [
- com.atproto.repo.applyWrites.createResult
- com.atproto.repo.applyWrites.updateResult
- com.atproto.repo.applyWrites.deleteResult
]
commit
object
results
object[]
oneOf
Possible values: [valid
, unknown
]
Possible values: [valid
, unknown
]
{
"commit": {
"cid": "string",
"rev": "string"
},
"results": [
{},
{},
{}
]
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [InvalidRequest
, ExpiredToken
, InvalidToken
, InvalidSwap
]
{
"error": "InvalidRequest",
"message": "string"
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
{
"message": "string"
}