{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Books a group meeting that every member hosts. The guest needs no account. A signed-in guest is linked to the booking by DID.",
      "errors": [
        {
          "name": "GroupNotFound"
        },
        {
          "name": "SlotUnavailable"
        },
        {
          "name": "DurationNotOffered"
        },
        {
          "name": "InvalidAnswer"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "duration": {
              "maximum": 1440,
              "minimum": 1,
              "type": "integer"
            },
            "email": {
              "maxLength": 320,
              "type": "string"
            },
            "guests": {
              "description": "Others to invite, by email.",
              "items": {
                "maxLength": 320,
                "type": "string"
              },
              "maxLength": 10,
              "type": "array"
            },
            "members": {
              "description": "The members, in the group link's order. The first organises the meeting.",
              "items": {
                "format": "did",
                "type": "string"
              },
              "maxLength": 10,
              "minLength": 2,
              "type": "array"
            },
            "name": {
              "maxLength": 256,
              "minLength": 1,
              "type": "string"
            },
            "notes": {
              "maxLength": 10000,
              "type": "string"
            },
            "start": {
              "format": "datetime",
              "type": "string"
            },
            "timeZone": {
              "description": "An IANA timezone name, such as Europe/Lisbon.",
              "maxLength": 64,
              "type": "string"
            }
          },
          "required": [
            "members",
            "start",
            "name",
            "email",
            "timeZone"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "booking": {
              "ref": "ing.opn.booking.defs#bookingView",
              "type": "ref"
            },
            "token": {
              "description": "The booking's manage token, from the email sent to its guest. Not needed by the host.",
              "maxLength": 128,
              "type": "string"
            }
          },
          "required": [
            "booking",
            "token"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "ing.opn.booking.createGroup",
  "lexicon": 1
}
