social.grain.repo.putRecord

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.

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

Checks

Valid Lint pass
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "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.",
      "errors": [
        {
          "description": "grain does not index the collection.",
          "name": "UnknownCollection"
        },
        {
          "description": "The record does not fit its lexicon.",
          "name": "InvalidRecord"
        },
        {
          "name": "InvalidSwap"
        },
        {
          "description": "The account's PDS granted the session less than the write needs.",
          "name": "ScopeMissingError"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "collection": {
              "description": "A collection grain indexes.",
              "format": "nsid",
              "type": "string"
            },
            "record": {
              "description": "The record. One without a $type is given the collection's.",
              "type": "unknown"
            },
            "rkey": {
              "format": "record-key",
              "maxLength": 512,
              "type": "string"
            },
            "swapCommit": {
              "format": "cid",
              "type": "string"
            },
            "swapRecord": {
              "format": "cid",
              "type": "string"
            }
          },
          "required": [
            "collection",
            "rkey",
            "record"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "ref": "social.grain.repo.defs#written",
          "type": "ref"
        }
      },
      "type": "procedure"
    }
  },
  "id": "social.grain.repo.putRecord",
  "lexicon": 1
}