I think that you are referring to the Kibana interface where you can define some UI properties on an existing field in Elasticsearch.
The PUT index_name command creates the index in Elasticsearch but not anything related in Kibana.
To do what you want, you probably need to call the Kibana REST API.
Which you can not do from the Kibana Dev Console as it's running against Elasticsearch only.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.