com.atproto.repo.applyWrites

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

Details · procedure
Kindprocedure
Authorityrepo.atproto.com
Indexed

Procedure

procedure · POST

Input

application/json

repo

requiredstring · at-identifier

The handle or DID of the repo (aka, current account).

swapCommit

string · 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.

validate

boolean

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

requiredarray
itemsunion
One of (closed)

Output

application/json

Errors

InvalidSwap

Indicates that the 'swapCommit' parameter did not match current commit.

#create

object

Operation which creates a new record.

Properties

collection

requiredstring · nsid

rkey

string · record-key

NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility.

  • maxLength: 512

value

requiredunknown

#createResult

object

Properties

cid

requiredstring · cid

uri

requiredstring · at-uri
  • knownValues: valid | unknown

#delete

object

Operation which deletes an existing record.

Properties

collection

requiredstring · nsid

rkey

requiredstring · record-key

#deleteResult

object

Properties

#update

object

Operation which updates an existing record.

Properties

collection

requiredstring · nsid

rkey

requiredstring · record-key

value

requiredunknown

#updateResult

object

Properties

cid

requiredstring · cid

uri

requiredstring · at-uri
  • knownValues: valid | unknown

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.

  • Create a single new repository record. Requires auth, implemented by PDS.

  • Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.

  • Workflow envelope shared between atiproto XRPC endpoints and the agent interpreter. The server emits an outboundWorkflow when it needs the agent to execute repo writes against the user's PDS; the agent runs the actions and calls back with an inboundWorkflow.