{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/unit-co/main/json-schema/unit-co-create-account-request-schema.json",
  "title": "CreateAccountRequest",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/unit-co-accounts-api-openapi.yml#/components/schemas/CreateAccountRequest",
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "type",
        "attributes",
        "relationships"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "depositAccount",
            "creditAccount"
          ]
        },
        "attributes": {
          "type": "object",
          "properties": {
            "depositProduct": {
              "type": "string"
            },
            "tags": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "idempotencyKey": {
              "type": "string"
            }
          }
        },
        "relationships": {
          "type": "object",
          "properties": {
            "customer": {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "customer"
                      ]
                    },
                    "id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}