com.atproto.repo.applyWrites

Domain Index: atproto.com

Crawl History

#main - procedure

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

Query Parameters

No fields defined

Request Body

Content Type: application/json

Data Fields

Name Type Details
repo string (required)

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

Syntax Format: at-identifier

swapCommit string

If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations.

Syntax Format: cid

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 array (required)

UNHANDLED IN ARRAYS: union

Response Body

Content Type: application/json

Data Fields

Name Type Details
commit ref

Reference: com.atproto.repo.defs#commitMeta

results array

UNHANDLED IN ARRAYS: union

Errors

Name Description
InvalidSwap Indicates that the 'swapCommit' parameter did not match current commit.
#createResult - object

Data Fields

Name Type Details
cid string (required)

Syntax Format: cid

uri string (required)

Syntax Format: at-uri

validationStatus string

Known Values: valid, unknown,

#delete - object

Operation which deletes an existing record.

Data Fields

Name Type Details
collection string (required)

Syntax Format: nsid

rkey string (required)
#deleteResult - object

Data Fields

No fields defined

#create - object

Operation which creates a new record.

Data Fields

Name Type Details
collection string (required)

Syntax Format: nsid

rkey string

Length in bytes (when UTF-8 encoded): 512 max

value unknown (required) Field can contain arbitrary JSON/CBOR object data
#update - object

Operation which updates an existing record.

Data Fields

Name Type Details
collection string (required)

Syntax Format: nsid

rkey string (required)
value unknown (required) Field can contain arbitrary JSON/CBOR object data
#updateResult - object

Data Fields

Name Type Details
cid string (required)

Syntax Format: cid

uri string (required)

Syntax Format: at-uri

validationStatus string

Known Values: valid, unknown,