social.grain.repo.createRecord

Create a record in the logged-in account's repo, at its PDS, and index it before answering. For the web, by its session cookie, from a page of the site; a service token is refused (the apps write to their own PDS, then call social.grain.sync.indexRecords).

Repository @grain.social did:plc:e7rftrdyz5e2rw4y6ocszew2 namespace authority
Details · procedure
Kindprocedure
Authorityrepo.grain.social
Commit rev3n2mx2lylr6bg
Indexed

Showing version bafyreihn5736yqxf5eyh252pbsru5k7dvnvwtvc4trezyxtaqxxkl4hdci. Show the latest

Procedure

procedure · POST

Input

application/json

collection

requiredstring · nsid

A collection grain indexes.

record

requiredunknown

The record. One without a $type is given the collection's.

rkey

string · record-key
  • maxLength: 512

swapCommit

string · cid

Output

application/json

Errors

UnknownCollection

grain does not index the collection.

InvalidRecord

The record does not fit its lexicon.

InvalidSwap

No description in schema.

ScopeMissingError

The account's PDS granted the session less than the write needs.

Similar lexicons

semantic match

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

  • Write a record in the logged-in account's repo, creating or replacing it, at its PDS, and index it before answering. Called as social.grain.repo.createRecord is.

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

  • Make several writes in the logged-in account's repo at once, as com.atproto.repo.applyWrites makes them at its PDS, and index them before answering. Called as social.grain.repo.createRecord is.

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

  • Delete a record from the logged-in account's repo, at its PDS, and from the index before answering. Called as social.grain.repo.createRecord is.