com.atproto.repo.applyWrites
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"create": {
"description": "Operation which creates a new record.",
"properties": {
"collection": {
"format": "nsid",
"type": "string"
},
"rkey": {
"description": "NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility.",
"format": "record-key",
"maxLength": 512,
"type": "string"
},
"value": {
"type": "unknown"
}
},
"required": [
"collection",
"value"
],
"type": "object"
},
"createResult": {
"properties": {
"cid": {
"format": "cid",
"type": "string"
},
"uri": {
"format": "at-uri",
"type": "string"
},
"validationStatus": {
"knownValues": [
"valid",
"unknown"
],
"type": "string"
}
},
"required": [
"uri",
"cid"
],
"type": "object"
},
"delete": {
"description": "Operation which deletes an existing record.",
"properties": {
"collection": {
"format": "nsid",
"type": "string"
},
"rkey": {
"format": "record-key",
"type": "string"
}
},
"required": [
"collection",
"rkey"
],
"type": "object"
},
"deleteResult": {
"properties": {},
"required": [],
"type": "object"
},
"main": {
"description": "Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.",
"errors": [
{
"description": "Indicates that the 'swapCommit' parameter did not match current commit.",
"name": "InvalidSwap"
}
],
"input": {
"encoding": "application/json",
"schema": {
"properties": {
"repo": {
"description": "The handle or DID of the repo (aka, current account).",
"format": "at-identifier",
"type": "string"
},
"swapCommit": {
"description": "If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations.",
"format": "cid",
"type": "string"
},
"validate": {
"description": "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.",
"type": "boolean"
},
"writes": {
"items": {
"closed": true,
"refs": [
"#create",
"#update",
"#delete"
],
"type": "union"
},
"type": "array"
}
},
"required": [
"repo",
"writes"
],
"type": "object"
}
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"commit": {
"ref": "com.atproto.repo.defs#commitMeta",
"type": "ref"
},
"results": {
"items": {
"closed": true,
"refs": [
"#createResult",
"#updateResult",
"#deleteResult"
],
"type": "union"
},
"type": "array"
}
},
"required": [],
"type": "object"
}
},
"type": "procedure"
},
"update": {
"description": "Operation which updates an existing record.",
"properties": {
"collection": {
"format": "nsid",
"type": "string"
},
"rkey": {
"format": "record-key",
"type": "string"
},
"value": {
"type": "unknown"
}
},
"required": [
"collection",
"rkey",
"value"
],
"type": "object"
},
"updateResult": {
"properties": {
"cid": {
"format": "cid",
"type": "string"
},
"uri": {
"format": "at-uri",
"type": "string"
},
"validationStatus": {
"knownValues": [
"valid",
"unknown"
],
"type": "string"
}
},
"required": [
"uri",
"cid"
],
"type": "object"
}
},
"id": "com.atproto.repo.applyWrites",
"lexicon": 1
}
Metadata
- DID
-
did:plc:6msi3pj7krzih5qxqtryxlzw - CID
-
bafyreidwfwif7k5uncwqxhpxpxhvdkgedbvp6kqy6r4nozii433lwlajba - Indexed At
- 2026-02-18 18:56 UTC
- AT-URI
-
at://did:plc:6msi3pj7krzih5qxqtryxlzw/com.atproto.lexicon.schema/com.atproto.repo.applyWrites
Referenced Schemas (1)
Similar Lexicons
Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.
-
com.atproto.repo.putRecord procedure
Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.
-
com.atproto.repo.createRecord procedure
Create a single new repository record. Requires auth, implemented by PDS.
-
com.atproto.repo.deleteRecord procedure
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 …