1. Create API key item type
POST https://www.arcgis.com/sharing/rest/content/users/{{username}}/addItem
https://developers.arcgis.com/rest/users-groups-and-items/add-item.htm
Request Body
[{"name"=>"f", "value"=>"json", "datatype"=>"string"}, {"name"=>"token", "value"=>"{{access_token}}", "datatype"=>"string"}, {"name"=>"type", "value"=>"API Key", "datatype"=>"string"}, {"name"=>"title", "value"=>"API Key - {{currentdate}}", "datatype"=>"string"}, {"name"=>"snippet", "value"=>"Item created programmatically through REST using a Postman Collection", "datatype"=>"string"}]
RESPONSES
status: OK
{"success":true,"id":"e1890ba78dff482dac645146388db596","folder":""}