{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "draftView": {
      "properties": {
        "content": {
          "type": "string"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "tid": {
          "type": "string"
        },
        "updatedAt": {
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "tid",
        "content",
        "createdAt",
        "updatedAt"
      ],
      "type": "object"
    },
    "main": {
      "description": "Create or update a draft document.",
      "errors": [
        {
          "name": "DraftNotFound"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "content": {
              "description": "Markdown content of the draft.",
              "type": "string"
            },
            "tid": {
              "description": "TID of an existing draft to update. Omit to create a new draft.",
              "type": "string"
            }
          },
          "required": [
            "content"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "ref": "#defs/draftView",
          "type": "ref"
        }
      },
      "type": "procedure"
    }
  },
  "id": "at.unthread.document.putDraft",
  "lexicon": 1
}
