{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/robase-dev/json-schema/robase-dev-send-otpresponse-schema.json",
  "title": "SendOTPResponse",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/robase-dev-openapi.yaml#/components/schemas/SendOTPResponse",
  "type": "object",
  "required": [
    "id",
    "phone_number",
    "country_code",
    "credit_cost",
    "status",
    "code_length",
    "expires_at",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "OTP ID to use with the verify and get endpoints"
    },
    "phone_number": {
      "type": "string",
      "description": "Destination the code was sent to, in E.164 format"
    },
    "country_code": {
      "type": "string",
      "description": "ISO 3166-1 alpha-2 country code derived from the number"
    },
    "credit_cost": {
      "type": "integer",
      "description": "Credits consumed by this send"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending"
      ],
      "description": "Always `pending`. Delivery happens asynchronously"
    },
    "code_length": {
      "type": "integer",
      "description": "Number of digits in the generated code"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "After this instant the code can no longer be verified"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "channel": {
      "type": "string",
      "enum": [
        "sms",
        "whatsapp",
        "both"
      ],
      "description": "Channel(s) this OTP was queued on. `both` means SMS and WhatsApp\nlegs were charged together.\n"
    }
  }
}