{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/gnosis-pay/main/json-schema/gnosis-pay-account-schema.json",
  "title": "Account",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gnosis-pay-openapi.json#/components/schemas/Account",
  "type": "object",
  "required": [
    "id",
    "kycProfileId",
    "safeOwnerAddress",
    "safeAddress",
    "chain",
    "chainName",
    "reference",
    "nativeCurrency",
    "additionalCurrencies",
    "createdAt",
    "updatedAt",
    "closedAt",
    "status",
    "provisionedAt"
  ],
  "properties": {
    "id": {
      "$ref": "#/$defs/uuid"
    },
    "kycProfileId": {
      "$ref": "#/$defs/uuid"
    },
    "safeOwnerAddress": {
      "type": "string"
    },
    "safeAddress": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "chain": {
      "$ref": "#/$defs/AccountChain"
    },
    "chainName": {
      "type": "string"
    },
    "reference": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "nativeCurrency": {
      "type": "string",
      "description": "ISO-4217 currency code the account is denominated in. The account daily\nspending limit is set and reported in this currency."
    },
    "additionalCurrencies": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "ISO-4217 currency codes the account supports besides `nativeCurrency`."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "closedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "$ref": "#/$defs/AccountStatus"
    },
    "provisionedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "$defs": {
    "AccountChain": {
      "type": "object",
      "required": [
        "name",
        "id"
      ],
      "properties": {
        "name": {
          "$ref": "#/$defs/AccountChainName"
        },
        "id": {
          "$ref": "#/$defs/AccountChainID"
        }
      }
    },
    "AccountChainID": {
      "type": "string",
      "enum": [
        "42220",
        "100"
      ]
    },
    "AccountChainName": {
      "type": "string",
      "enum": [
        "celo",
        "gnosis"
      ]
    },
    "AccountStatus": {
      "type": "string",
      "enum": [
        "provisioning",
        "active",
        "blocked",
        "closed"
      ]
    },
    "uuid": {
      "type": "string",
      "format": "uuid"
    }
  }
}