{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ringover/json-schema/ringover-team-schema.json",
  "title": "team",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ringover-teams-api-openapi.yml#/components/schemas/team",
  "type": "object",
  "properties": {
    "team_id": {
      "type": "integer",
      "format": "int64",
      "description": "Unique identifier for the object"
    },
    "name": {
      "type": "string",
      "description": "The name of your team"
    },
    "total_numbers_count": {
      "type": "integer",
      "format": "int64",
      "description": "The size of numbers array"
    },
    "numbers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/number"
      }
    },
    "total_users_count": {
      "type": "integer",
      "format": "int64",
      "description": "The size of users array"
    },
    "users": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/user_full"
      }
    },
    "total_ivrs_count": {
      "type": "integer",
      "format": "int64",
      "description": "The size of ivrs array"
    },
    "ivrs": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ivr"
      }
    },
    "total_conferences_count": {
      "type": "integer",
      "format": "int64",
      "description": "The size of conferences array"
    },
    "conferences": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/conference"
      }
    },
    "total_tags_count": {
      "type": "integer",
      "format": "int64",
      "description": "The size of tags array"
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/tag"
      }
    },
    "total_groups_count": {
      "type": "integer",
      "format": "int64",
      "description": "The size of groups array"
    },
    "groups": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/group_light"
      }
    }
  },
  "$defs": {
    "conference": {
      "type": "object",
      "properties": {
        "conference_id": {
          "type": "integer",
          "format": "int64",
          "description": "The conference identifier"
        },
        "name": {
          "type": "string",
          "description": "The name of the conference"
        },
        "numbers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/number"
          },
          "description": "The numbers of the conference"
        }
      }
    },
    "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"
        }
      }
    },
    "group_light": {
      "type": "object",
      "properties": {
        "group_id": {
          "type": "integer",
          "format": "int64",
          "description": "The identifier of the group"
        },
        "name": {
          "type": "string",
          "description": "The name of the group"
        },
        "total_users_count": {
          "type": "integer",
          "format": "int64",
          "description": "The number of users in the group"
        },
        "color": {
          "type": "string"
        },
        "is_jumper": {
          "type": "boolean",
          "description": "Allow users to jump into"
        }
      }
    },
    "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"
        }
      }
    },
    "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"
        }
      }
    },
    "tag": {
      "type": "object",
      "properties": {
        "tag_id": {
          "type": "integer",
          "format": "int64",
          "description": "The identifier of the tag"
        },
        "name": {
          "type": "string",
          "description": "The name of the tag"
        },
        "color": {
          "type": "string",
          "enum": [
            "ff6b6b",
            "F06292",
            "BA68C8",
            "9575CD",
            "7986CB",
            "64B5F6",
            "4FC3F7",
            "4DD0E1",
            "4DB6AC",
            "81C784",
            "AED581",
            "DCE775",
            "FFD54F",
            "FFB74D",
            "FF8A65",
            "A1887F",
            "E0E0E0",
            "90A4AE"
          ]
        },
        "description": {
          "type": "string",
          "description": "The description of the tag"
        },
        "creation_date": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "user_full": {
      "allOf": [
        {
          "$ref": "#/$defs/user_light"
        },
        {
          "type": "object",
          "properties": {
            "numbers": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/number"
              },
              "description": "The numbers of the user"
            },
            "plan": {
              "type": "object",
              "description": "The licence plan assigned to the user",
              "properties": {
                "id": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The plan identifier"
                },
                "name": {
                  "type": "string",
                  "description": "The commercial name of the plan"
                },
                "type": {
                  "type": "string",
                  "description": "The category of the plan"
                }
              }
            },
            "plantype": {
              "type": "string",
              "description": "The category of the plan, mirrors `plan.type`"
            }
          }
        }
      ]
    },
    "user_light": {
      "type": "object",
      "properties": {
        "user_id": {
          "type": "integer",
          "format": "int64",
          "description": "The user identifier"
        },
        "team_id": {
          "type": "integer",
          "format": "int64",
          "description": "The team identifier of the user"
        },
        "initial": {
          "type": "string",
          "description": "The initials of the user"
        },
        "color": {
          "type": "string"
        },
        "firstname": {
          "type": "string",
          "description": "The firstname of the user"
        },
        "lastname": {
          "type": "string",
          "description": "The lastname of the user"
        },
        "company": {
          "type": "string",
          "description": "The company of the user"
        },
        "email": {
          "type": "string",
          "description": "The email of the user"
        },
        "picture": {
          "type": "string",
          "description": "The picture of the user"
        },
        "concat_name": {
          "type": "string"
        }
      }
    }
  }
}