{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Record that the caller accepted the beta terms in force for their account, with the exact wording they were shown. The dashboard calls it from the terms screen after sign-in. Accepting terms already accepted records nothing new. Each acceptance is kept, append-only. Customers and staff; anyone else is refused.",
      "errors": [
        {
          "description": "This endpoint requires an authenticated caller.",
          "name": "AuthRequired"
        },
        {
          "description": "termsVersion, textVersion, text or idempotencyKey is missing or malformed, or the provisioner refused the request as malformed.",
          "name": "InvalidRequest"
        },
        {
          "description": "The caller is neither a customer nor staff, or the provisioner refused them.",
          "name": "Forbidden"
        },
        {
          "description": "The wording or its version is blank.",
          "name": "TermsRequired"
        },
        {
          "description": "termsVersion is not the terms in force: the client is showing old terms, and should read getTerms again.",
          "name": "TermsOutdated"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "NotFound"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "InvalidSlug"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "SlugTaken"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "NotEntitled"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "InstanceLimit"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "NoCapacity"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "OperationInProgress"
        },
        {
          "description": "The provisioner is unreachable, not configured, or answered with an error it does not explain to callers.",
          "name": "Upstream"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "idempotencyKey": {
              "description": "A UUID the client generates once per acceptance and resends on every retry of it.",
              "type": "string"
            },
            "termsVersion": {
              "description": "The terms the caller accepted, as getTerms reported them. Anything but the terms in force is refused (TermsOutdated).",
              "type": "string"
            },
            "text": {
              "description": "The exact wording the caller accepted.",
              "type": "string"
            },
            "textVersion": {
              "description": "The version of the wording the caller was shown, chosen by the client.",
              "type": "string"
            }
          },
          "required": [
            "termsVersion",
            "textVersion",
            "text",
            "idempotencyKey"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "accepted": {
              "description": "Always true: the caller has now accepted termsVersion.",
              "type": "boolean"
            },
            "termsVersion": {
              "description": "The beta terms in force.",
              "type": "string"
            }
          },
          "required": [
            "termsVersion",
            "accepted"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "at.happyproto.actor.acceptTerms",
  "lexicon": 1
}
