com.atproto.repo.createRecord

Domain Index: atproto.com

Crawl History

#main - procedure

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

Query Parameters

No fields defined

Request Body

Content Type: application/json

Data Fields

Name Type Details
collection string (required)

The NSID of the record collection.

Syntax Format: nsid

record unknown (required)

The record itself. Must contain a $type field.

Field can contain arbitrary JSON/CBOR object data
repo string (required)

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

Syntax Format: at-identifier

rkey string

The Record Key.

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

swapCommit string

Compare and swap with the previous commit by CID.

Syntax Format: cid

validate boolean

Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons.

Response Body

Content Type: application/json

Data Fields

Name Type Details
cid string (required)

Syntax Format: cid

commit ref

Reference: com.atproto.repo.defs#commitMeta

uri string (required)

Syntax Format: at-uri

validationStatus string

Known Values: valid, unknown,

Errors

Name Description
InvalidSwap Indicates that 'swapCommit' didn't match current repo commit.