{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Create a share link for an owned private site. The returned token is the access credential and is shown exactly once; only its hash is stored. A share can never outlive its site, so its expiry is clamped to the site's expiry.",
      "errors": [
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "InvalidRequest"
        },
        {
          "name": "NotFound"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "audienceDid": {
              "description": "Restrict this link to a single account. The recipient must be signed in as this DID; the link alone grants nothing. Omit for a bearer link that anyone holding the URL can open, including people without an atproto account.",
              "format": "did",
              "type": "string"
            },
            "expiryMinutes": {
              "description": "Minutes until this link expires. Omit for the configured default; 0 for no expiry of its own.",
              "minimum": 0,
              "type": "integer"
            },
            "label": {
              "description": "Optional human label for this link.",
              "maxLength": 128,
              "type": "string"
            },
            "siteId": {
              "format": "record-key",
              "type": "string"
            }
          },
          "required": [
            "siteId"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "audienceDid": {
              "description": "Set when this link is restricted to a single account.",
              "format": "did",
              "type": "string"
            },
            "createdAt": {
              "format": "datetime",
              "type": "string"
            },
            "directUrl": {
              "description": "The same credential on the site's own origin. Equivalent to `url`; useful when a link should not route through wisp.place.",
              "format": "uri",
              "type": "string"
            },
            "expiresAt": {
              "format": "datetime",
              "type": "string"
            },
            "shareId": {
              "type": "string"
            },
            "siteId": {
              "format": "record-key",
              "type": "string"
            },
            "url": {
              "description": "Short, human-friendly share link (wisp.place/p/<token>). Contains the credential and is returned exactly once.",
              "type": "string"
            }
          },
          "required": [
            "shareId",
            "siteId",
            "url",
            "createdAt"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "place.wisp.v2.privateSite.createShare",
  "lexicon": 1
}
