{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/honkio-ca/json-schema/honkio-ca-verification-schema.json",
  "title": "Verification",
  "description": "A phone-number verification (SMS OTP). status is lowercase, unlike message statuses.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/honkio-ca-verify-api-openapi.yml#/components/schemas/Verification",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "id",
    "phone_number",
    "from_number",
    "status",
    "attempts",
    "code_length",
    "app_name",
    "mode",
    "cost_cents",
    "expires_at",
    "verified_at",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "phone_number": {
      "type": "string"
    },
    "from_number": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "verified",
        "expired",
        "max_attempts"
      ]
    },
    "attempts": {
      "type": "integer"
    },
    "code_length": {
      "type": "integer"
    },
    "app_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "mode": {
      "type": "string",
      "enum": [
        "LIVE",
        "TEST"
      ],
      "description": "TEST verifications are simulated: no SMS is sent, nothing is billed, and the code is always 000000 padded to code_length."
    },
    "cost_cents": {
      "type": "integer",
      "description": "Cost in cents CAD. On a TEST verification this is 0: nothing was charged."
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "verified_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}