Skip to main content

com.atproto.repo.applyWrites

#main

Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.

Input

  • Encoding: application/json
PropertyTypeKnown ValuesRequiredDescription
repostring (at-identifier)-The handle or DID of the repo (aka, current account).
validateboolean-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.
writesarray of union
#create
#update
#delete
--
swapCommitstring (cid)-If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations.

Output

  • Encoding: application/json
PropertyTypeKnown ValuesRequiredDescription
commitcom.atproto.repo.defs#commitMeta--
resultsarray of union
#createResult
#updateResult
#deleteResult
--

#create

Operation which creates a new record.

PropertyTypeKnown ValuesRequiredDescription
collectionstring (nsid)--
rkeystring--
valueunknown--

#update

Operation which updates an existing record.

PropertyTypeKnown ValuesRequiredDescription
collectionstring (nsid)--
rkeystring--
valueunknown--

#delete

Operation which deletes an existing record.

PropertyTypeKnown ValuesRequiredDescription
collectionstring (nsid)--
rkeystring--

#createResult

PropertyTypeKnown ValuesRequiredDescription
uristring (at-uri)--
cidstring (cid)--
validationStatusstringvalid
unknown
-

#updateResult

PropertyTypeKnown ValuesRequiredDescription
uristring (at-uri)--
cidstring (cid)--
validationStatusstringvalid
unknown
-

#deleteResult