{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ringover/json-schema/ringover-ivr-schema.json",
  "title": "ivr",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ringover-ivrs-api-openapi.yml#/components/schemas/ivr",
  "type": "object",
  "properties": {
    "ivr_id": {
      "type": "integer",
      "format": "int64",
      "description": "The identifier of the ivr"
    },
    "name": {
      "type": "string",
      "description": "The name of the ivr"
    },
    "color": {
      "type": "string",
      "enum": [
        "ff6b6b",
        "F06292",
        "BA68C8",
        "9575CD",
        "7986CB",
        "64B5F6",
        "4FC3F7",
        "4DD0E1",
        "4DB6AC",
        "81C784",
        "AED581",
        "DCE775",
        "FFD54F",
        "FFB74D",
        "FF8A65",
        "A1887F",
        "E0E0E0",
        "90A4AE"
      ]
    },
    "numbers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/number"
      },
      "description": "The numbers of the ivr"
    },
    "scenarios": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/scenario",
        "description": "The scenario of the ivr"
      }
    },
    "is_open": {
      "type": "boolean",
      "description": "The ivr is open or not"
    }
  },
  "$defs": {
    "format_number": {
      "type": "object",
      "properties": {
        "raw": {
          "type": "integer",
          "format": "int64"
        },
        "country_code": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "e164": {
          "type": "string"
        },
        "international": {
          "type": "string"
        },
        "international_alt": {
          "type": "string"
        },
        "national": {
          "type": "string"
        },
        "national_alt": {
          "type": "string"
        },
        "rfc3966": {
          "type": "string"
        },
        "is_short_code": {
          "type": "boolean"
        }
      }
    },
    "number": {
      "type": "object",
      "properties": {
        "number": {
          "type": "integer",
          "description": "Phone number in E.164 format without the `+` prefix (e.g., `33612345678`)."
        },
        "label": {
          "type": "string",
          "description": "The label of the number"
        },
        "type": {
          "type": "string",
          "description": "The type of the number"
        },
        "user_id": {
          "type": "integer",
          "format": "int64",
          "description": "The user identifier"
        },
        "ivr_id": {
          "type": "integer",
          "format": "int64",
          "description": "The unique identifier of the IVR. Use `GET /ivrs` to discover available IVR IDs."
        },
        "conference_id": {
          "type": "integer",
          "format": "int64",
          "description": "The conference identifier"
        },
        "is_sms": {
          "type": "boolean"
        },
        "is_sms_write": {
          "type": "boolean"
        },
        "is_callable": {
          "type": "boolean"
        },
        "format": {
          "$ref": "#/$defs/format_number"
        }
      }
    },
    "scenario": {
      "type": "object",
      "properties": {
        "scenario_id": {
          "type": "integer",
          "format": "int64",
          "description": "The scenario identifier"
        },
        "ivr_id": {
          "type": "integer",
          "format": "int64",
          "description": "The unique identifier of the IVR. Use `GET /ivrs` to discover available IVR IDs."
        },
        "name": {
          "type": "string",
          "description": "The name of the scenario"
        },
        "color": {
          "type": "string"
        },
        "scenario_type": {
          "type": "string",
          "enum": [
            "menu",
            "announce",
            "queue",
            "sms",
            "webhook",
            "input"
          ],
          "description": "The type of the scenario"
        },
        "is_default": {
          "type": "boolean"
        }
      }
    }
  }
}