{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Write a label record into the subject's space. Requires label, or takedown for !hide and !takedown. On the host's own queue, a template, a version of one or a like of one is labelled by the host: !hide leaves it out of where people look for things to add, and unsafe, on a version, sends every tab on it back to the last version that isn't.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "group": {
              "description": "The group DID. Every method is served by the group's host and authorized against that group's roles. Or the host's own DID, for its queue of what's shared with everyone: templates, their versions, and likes of them, for the host's moderators alone.",
              "format": "did",
              "type": "string"
            },
            "rule": {
              "format": "at-uri",
              "type": "string"
            },
            "subject": {
              "refs": [
                "com.atproto.admin.defs#repoRef",
                "com.atproto.repo.strongRef"
              ],
              "type": "union"
            },
            "val": {
              "type": "string"
            }
          },
          "required": [
            "group",
            "subject",
            "val"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "description": "The label record a group's label is; nothing for the host's own, which it keeps itself.",
          "properties": {
            "cid": {
              "format": "cid",
              "type": "string"
            },
            "uri": {
              "format": "at-uri",
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "fyi.opensocial.applyLabel",
  "lexicon": 1
}
