{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/honkio-ca/json-schema/honkio-ca-opt-in-confirmation-schema.json",
  "title": "OptInConfirmation",
  "description": "A double opt-in confirmation sent from a toll-free number.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/honkio-ca-compliance-casl-api-openapi.yml#/components/schemas/OptInConfirmation",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "id",
    "status",
    "from",
    "to",
    "brand_name",
    "language",
    "message_id",
    "expires_at",
    "confirmed_at",
    "reply_message_id",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "oic_…"
    },
    "status": {
      "type": "string",
      "enum": [
        "PENDING",
        "CONFIRMED",
        "EXPIRED",
        "DECLINED"
      ],
      "description": "PENDING until the recipient replies YES (CONFIRMED), it lapses after 7 days or is replaced by a newer one (EXPIRED), or the recipient texts STOP (DECLINED)."
    },
    "from": {
      "type": [
        "string",
        "null"
      ],
      "description": "The toll-free number it was sent from."
    },
    "to": {
      "type": "string",
      "description": "The recipient."
    },
    "brand_name": {
      "type": "string"
    },
    "language": {
      "type": "string",
      "enum": [
        "en",
        "fr"
      ]
    },
    "message_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The confirmation text, as a message (GET /v1/messages/{id})."
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "confirmed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "reply_message_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The recipient's YES, as an inbound message."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}