{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/methodfi/main/json-schema/methodfi-create-entity-subscription-request-schema.json",
  "title": "CreateEntitySubscriptionRequest",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/methodfi-entity-subscriptions-api-openapi.yml#/components/schemas/CreateEntitySubscriptionRequest",
  "type": "object",
  "required": [
    "enroll"
  ],
  "properties": {
    "enroll": {
      "type": "string",
      "description": "Subscription name to enroll.",
      "enum": [
        "attribute",
        "connect",
        "credit_score"
      ]
    },
    "payload": {
      "type": [
        "object",
        "null"
      ],
      "description": "Optional payload for the subscription. Required when enroll is attribute.",
      "properties": {
        "attributes": {
          "type": "object",
          "description": "Attributes configuration for the subscription.",
          "properties": {
            "requested_attributes": {
              "type": "array",
              "description": "List of attribute names to request.",
              "items": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}