{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Prove the address a contact-email link was sent to, as the account it was sent for. A change waiting for the link becomes the contact email. Opening the same link again answers the same. Customers and staff; anyone else is refused.",
      "errors": [
        {
          "description": "This endpoint requires an authenticated caller.",
          "name": "AuthRequired"
        },
        {
          "description": "The caller is neither a customer nor staff, or the provisioner refused them.",
          "name": "Forbidden"
        },
        {
          "description": "The input is malformed, or the provisioner refused it as malformed.",
          "name": "InvalidRequest"
        },
        {
          "description": "The token is unknown, belongs to another account, or a newer link replaced it.",
          "name": "InvalidLink"
        },
        {
          "description": "The link is more than 24 hours old.",
          "name": "ExpiredLink"
        },
        {
          "description": "Owner email is not switched on yet.",
          "name": "EmailNotConfigured"
        },
        {
          "description": "Passed through from the provisioner. Not expected here; declared because every contact-email refusal is mapped the same way.",
          "name": "InvalidEmail"
        },
        {
          "description": "Passed through from the provisioner. Not expected here; declared because every contact-email refusal is mapped the same way.",
          "name": "TooManyLinks"
        },
        {
          "description": "Passed through from the provisioner. Not expected here; declared because every contact-email refusal is mapped the same way.",
          "name": "EmailFailed"
        },
        {
          "description": "Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.",
          "name": "NotFound"
        },
        {
          "description": "Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.",
          "name": "InvalidSlug"
        },
        {
          "description": "Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.",
          "name": "SlugTaken"
        },
        {
          "description": "Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.",
          "name": "NotEntitled"
        },
        {
          "description": "Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.",
          "name": "InstanceLimit"
        },
        {
          "description": "Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.",
          "name": "NoCapacity"
        },
        {
          "description": "Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.",
          "name": "OperationInProgress"
        },
        {
          "description": "The preferences space or the provisioner could not be reached, 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 action and resends on every retry of it.",
              "type": "string"
            },
            "token": {
              "description": "The token from the link's #t= fragment.",
              "maxLength": 128,
              "type": "string"
            }
          },
          "required": [
            "token",
            "idempotencyKey"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "confirmed": {
              "description": "Always true on success.",
              "type": "boolean"
            }
          },
          "required": [
            "confirmed"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "at.happyproto.actor.confirmContactEmail",
  "lexicon": 1
}
