{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/telnyx/main/json-schema/telnyx-mdr-get-usage-reports-response-schema.json",
  "title": "MdrGetUsageReportsResponse",
  "x-generated": "2026-10-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/telnyx-mdr-usage-reports-api-openapi.yml#/components/schemas/MdrGetUsageReportsResponse",
  "properties": {
    "data": {
      "items": {
        "$ref": "#/$defs/MdrUsageReportResponse"
      },
      "type": "array"
    },
    "meta": {
      "$ref": "#/$defs/reporting_PaginationMeta"
    }
  },
  "type": "object",
  "$defs": {
    "MdrUsageRecord": {
      "properties": {
        "carrier_passthrough_fee": {
          "type": "string"
        },
        "connection": {
          "type": "string"
        },
        "cost": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "delivered": {
          "type": "string"
        },
        "direction": {
          "type": "string"
        },
        "message_type": {
          "type": "string"
        },
        "parts": {
          "type": "string"
        },
        "product": {
          "type": "string"
        },
        "profile_id": {
          "type": "string"
        },
        "received": {
          "type": "string"
        },
        "sent": {
          "type": "string"
        },
        "tags": {
          "type": "string"
        },
        "tn_type": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "MdrUsageReportResponse": {
      "properties": {
        "aggregation_type": {
          "enum": [
            "NO_AGGREGATION",
            "PROFILE",
            "TAGS"
          ],
          "type": "string"
        },
        "connections": {
          "items": {
            "format": "int64",
            "type": "integer"
          },
          "type": "array"
        },
        "created_at": {
          "format": "date-time",
          "type": "string"
        },
        "end_date": {
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "description": "Identifies the resource",
          "format": "uuid",
          "type": "string"
        },
        "profiles": {
          "type": "string"
        },
        "record_type": {
          "type": "string"
        },
        "report_url": {
          "type": "string"
        },
        "result": {
          "items": {
            "$ref": "#/$defs/MdrUsageRecord"
          },
          "type": "array"
        },
        "start_date": {
          "format": "date-time",
          "type": "string"
        },
        "status": {
          "enum": [
            "PENDING",
            "COMPLETE",
            "FAILED",
            "EXPIRED"
          ],
          "type": "string"
        },
        "updated_at": {
          "format": "date-time",
          "type": "string"
        }
      },
      "type": "object"
    },
    "reporting_PaginationMeta": {
      "properties": {
        "page_number": {
          "format": "int32",
          "type": "integer"
        },
        "page_size": {
          "format": "int32",
          "type": "integer"
        },
        "total_pages": {
          "format": "int32",
          "type": "integer"
        },
        "total_results": {
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object"
    }
  }
}