{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ringover/json-schema/ringover-campaign-calllist-list-schema.json",
  "title": "campaign_calllist_list",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ringover-campaigns-api-openapi.yml#/components/schemas/campaign_calllist_list",
  "type": "object",
  "properties": {
    "team_id": {
      "type": "integer",
      "format": "int64"
    },
    "user_id": {
      "type": "integer",
      "format": "int64"
    },
    "limit_offset_setted": {
      "type": "integer",
      "format": "int64"
    },
    "limit_count_setted": {
      "type": "integer",
      "format": "int64"
    },
    "campaign_calllist_list": {
      "type": [
        "array",
        "null"
      ],
      "description": "The list of all campaigns calllist (including archived and stopped)",
      "items": {
        "$ref": "#/$defs/campaign_calllist_light"
      }
    },
    "campaign_calllist_list_count": {
      "type": "integer",
      "format": "int64",
      "description": "The count of all campaigns calllist (including archived and stopped)"
    },
    "total_team_campaigns": {
      "type": "integer",
      "format": "int64",
      "description": "Total of campaigns (not archived) by a given team"
    }
  },
  "$defs": {
    "campaign_call_script": {
      "type": "object",
      "properties": {
        "script_uuid": {
          "type": "string",
          "description": "The identifier of the script",
          "format": "uuid"
        },
        "generic_uuid": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string",
          "description": "The name of the script"
        },
        "data": {
          "type": "string"
        },
        "is_enabled": {
          "type": "boolean",
          "description": "true if the script is enabled"
        }
      }
    },
    "campaign_calllist_basic": {
      "type": "object",
      "properties": {
        "campaign_calllist_uuid": {
          "type": "string",
          "format": "uuid",
          "description": "Unique identifier for the object"
        },
        "team_id": {
          "type": "integer",
          "format": "int64",
          "description": "Team identifier"
        },
        "user_id": {
          "type": "integer",
          "format": "int64",
          "description": "User identifier"
        },
        "name": {
          "type": "string",
          "description": "The name of the campaign CALL List"
        },
        "campaign_tags": {
          "type": "array",
          "description": "tags of the campaign",
          "items": {
            "type": "integer",
            "format": "int64"
          }
        },
        "users_list": {
          "type": "array",
          "description": "The list of users",
          "items": {
            "type": "integer",
            "format": "int64"
          }
        },
        "groups_list": {
          "type": "array",
          "description": "The list of groups",
          "items": {
            "type": "integer",
            "format": "int64"
          }
        },
        "fifo_left_to_call": {
          "type": "integer",
          "format": "int64",
          "description": "The number of numbers left to call"
        },
        "update_date": {
          "type": "string",
          "format": "date-time"
        },
        "creation_date": {
          "type": "string",
          "format": "date-time"
        },
        "deletion_date": {
          "type": "string",
          "format": "date-time"
        },
        "max_retry": {
          "type": "integer",
          "description": "The max retry attempts for numbers in the campaign CALL List"
        },
        "retry_time": {
          "type": "integer",
          "description": "Optional time in seconds to wait before retrying a number",
          "default": 3600
        },
        "ivr_id": {
          "type": "integer",
          "description": "Optional id of the ivr"
        },
        "start_date": {
          "type": "string",
          "format": "date-time",
          "description": "Optional start date of the campaign"
        }
      }
    },
    "campaign_calllist_light": {
      "allOf": [
        {
          "$ref": "#/$defs/campaign_calllist_basic"
        },
        {
          "type": "object",
          "properties": {
            "campaign_count_numbers": {
              "type": "integer",
              "format": "int64"
            },
            "campaign_count_active_numbers": {
              "type": "integer",
              "format": "int64"
            },
            "campaign_count_users": {
              "type": "integer",
              "format": "int64"
            },
            "campaign_count_groups": {
              "type": "integer",
              "format": "int64"
            },
            "is_private": {
              "type": "boolean",
              "description": "true if the campaign call is private"
            },
            "is_running": {
              "type": "boolean",
              "description": "true if the campaign call is currently running"
            },
            "stop_reason": {
              "type": "string",
              "description": "the reason why the campaign call has been stopped"
            },
            "ivr_id": {
              "type": "integer",
              "description": "Optional id of the ivr"
            },
            "script": {
              "description": "Optional script for the campaign",
              "$ref": "#/$defs/campaign_call_script"
            }
          }
        }
      ]
    }
  }
}