Command
curl -X POST 'http://localhost:9200/my_index/_doc/1?pretty' -H 'Content-Type: application/json' -d '{"name":"John"}'
Examples
Insert user doc
curl -X POST 'http://localhost:9200/users/_doc/1?pretty' -H 'Content-Type: application/json' -d '{"username":"alice"}'