Example of custom attribute during customer creation

There is a little inconsistency in the API, for example, when tracking an event, you put the custom event attributes in a 'data' parameter. But when creating a customer, they go at the same level as the email and created_at.

This is counter-intuitive, so an example of using custom attributes at customer creation would be helpful.