Ttl field in elasticsearch

How to change the ttl field of the indices in a cluster using curl command?

Take a look at https://www.elastic.co/guide/en/elasticsearch/reference/2.2/indices-ttl.html

Also TTL is deprecated, you should move away from it.

Using the curl command, can I set it?

Yes you can.

How exactly?

PUT _cluster/settings
{
    "transient" : {
        "indices.ttl.interval" : "WHATEVER"
    }
}