{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudinary/json-schema/cloudinary-custom-policies-response-schema.json",
  "title": "CustomPoliciesResponse",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudinary-permissions-openapi.yml#/components/schemas/CustomPoliciesResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CustomPolicyResponseData"
      },
      "description": "An array of custom policies."
    },
    "next_cursor": {
      "type": "string",
      "description": "When a request has more results to return, the next_cursor value is returned as part of the response. You can then specify this value as the cursor parameter of a following request."
    }
  },
  "$defs": {
    "CustomPolicyResponseData": {
      "type": "object",
      "required": [
        "id",
        "enabled",
        "policy_statement",
        "created_at",
        "updated_at",
        "scope_type",
        "name"
      ],
      "properties": {
        "id": {
          "description": "The unique identifier of the policy.",
          "type": "string"
        },
        "policy_statement": {
          "description": "A Cedar policy that permits or forbids a certain action on a certain element to a principal (user, group, or API key).",
          "type": "string"
        },
        "description": {
          "description": "A short description of the policy.",
          "type": [
            "string",
            "null"
          ]
        },
        "scope_type": {
          "$ref": "#/$defs/ScopeTypeEnum"
        },
        "scope_id": {
          "description": "Returned only if the scope type is product environment. Can be \"all\" to represent all product environments or an ID of a specific product environment.",
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "description": "The name of the policy",
          "type": "string"
        },
        "enabled": {
          "description": "Whether the policy is enabled or not",
          "type": "boolean"
        },
        "created_at": {
          "description": "Creation time of the policy in epoch time.",
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "description": "Last update time of the policy in epoch time.",
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "ScopeTypeEnum": {
      "type": "string",
      "description": "Specifies where the role/policy is applied, either at the account level or within product environments.",
      "enum": [
        "account",
        "prodenv"
      ]
    }
  }
}