<@U04UQ68083H>, is kratos able to store an attribu...
# ory-copilot
c
@chilly-king-10285, is kratos able to store an attribute as list?
b
A message from kapa.ai
Yes, Kratos is able to store attributes as lists. This capability is demonstrated in the identity schema example provided in the knowledge sources. According to the [Kratos documentation on customizing identity schemas](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#multiple-emails-and-password), you can define attributes as arrays in the JSON schema. Here's an example of how you can define a list of email addresses:
Copy code
json {   "properties": {     "traits": {       "type": "object",       "properties": {         "emails": {           "type": "array",           "items": {             "type": "string",             "format": "email",             "<http://ory.sh/kratos|ory.sh/kratos>": {               "credentials": {                 "password": {                   "identifier": true                 },                 // ... other credential types ...               },               "recovery": {                 "via": "email"               },               "verification": {                 "via": "email"               }             }           }         }       }     }   } }
In this example, the
emails
attribute is defined as an array of strings, each representing an email address. This allows Kratos to store multiple email addresses for a single identity. This structure not only allows for storing multiple values but also enables features like using any of these email addresses for authentication, recovery, and verification processes.