{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/insightsocial-app/json-schema/insightsocial-app-envelope2-schema.json",
  "title": "Envelope2",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/insightsocial-app-openapi.json#/components/schemas/Envelope2",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "const": true
    },
    "platform": {
      "type": "string"
    },
    "endpoint": {
      "type": "string"
    },
    "schema_version": {
      "type": "string",
      "const": "2"
    },
    "data": {},
    "pagination": {
      "$ref": "#/$defs/Pagination"
    },
    "unavailable": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "credits_used": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "credits_remaining": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "request_id": {
      "type": "string"
    },
    "cached": {
      "type": "boolean"
    },
    "idempotent_replay": {
      "type": "boolean"
    },
    "charge_reason": {
      "type": "string"
    },
    "free_call": {
      "type": "boolean"
    }
  },
  "required": [
    "success",
    "platform",
    "endpoint",
    "schema_version",
    "data",
    "unavailable",
    "credits_used",
    "credits_remaining",
    "request_id",
    "cached",
    "idempotent_replay",
    "charge_reason",
    "free_call"
  ],
  "additionalProperties": false,
  "$defs": {
    "Pagination": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "type": [
            "string",
            "null"
          ]
        },
        "has_more": {
          "type": "boolean"
        },
        "page_size": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "stopped_at": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "since",
                "known_id",
                "end"
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "next_cursor",
        "has_more",
        "page_size"
      ],
      "additionalProperties": false
    }
  }
}