{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/blog2social-com/json-schema/blog2social-com-insights-v2-response-schema.json",
  "title": "InsightsV2Response",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/blog2social-com-openapi.yml#/components/schemas/InsightsV2Response",
  "type": "object",
  "properties": {
    "network_auth_id": {
      "type": "integer",
      "description": "Blog2Social ID of the connected network authorization"
    },
    "network_id": {
      "type": "integer",
      "description": "ID of the network"
    },
    "network_name": {
      "type": "string",
      "description": "Name of the network"
    },
    "network_post_id": {
      "type": "string",
      "description": "Post ID assigned by the network"
    },
    "credit_cost": {
      "type": "integer",
      "description": "Credits charged for this request"
    },
    "credit_open": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string",
          "enum": [
            "no limit"
          ]
        }
      ],
      "description": "Remaining credits, or no limit when usage-limit mode is disabled"
    },
    "measured_at": {
      "type": "integer",
      "description": "Unix timestamp in UTC at which the metrics were measured"
    },
    "metrics": {
      "type": "array",
      "description": "Available metrics for the post. Unsupported metrics are returned with value 0.",
      "items": {
        "$ref": "#/$defs/InsightsV2Metric"
      }
    }
  },
  "required": [
    "network_auth_id",
    "network_id",
    "network_name",
    "network_post_id",
    "credit_cost",
    "credit_open",
    "measured_at"
  ],
  "additionalProperties": false,
  "$defs": {
    "InsightsV2Metric": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Canonical metric name"
        },
        "value": {
          "oneOf": [
            {
              "type": "number"
            },
            {
              "type": "string"
            }
          ],
          "description": "Metric value, or a string when the network does not provide a numeric value"
        },
        "unit": {
          "type": "string",
          "description": "Unit of the metric"
        },
        "category": {
          "type": [
            "string",
            "null"
          ],
          "description": "Metric category"
        }
      },
      "required": [
        "name",
        "value",
        "unit",
        "category"
      ],
      "additionalProperties": false
    }
  }
}