cURL
curl --request POST \ --url https://{appid}.api-{region}.cometchat.io/v3/data_import/users \ --header 'Content-Type: application/json' \ --header 'apikey: <api-key>' \ --data '{ "users": { "uid1": { "uid": "uid1", "name": "uid1", "avatar": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png", "createdAt": "1673421419", "metadata": { "key": "value" }, "lastActiveAt": "1673421425" } } }'
{ "data": { "uid1": { "success": true, "data": { "uid": "uid1", "name": "uid1", "avatar": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png", "metadata": { "key": "value" }, "status": "offline", "role": "default", "lastActiveAt": 1673421425, "createdAt": 1673421419 } } } }
The CometChat user import API allows customers to import their users’ data into the CometChat systems.
API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
Import User(s)
The response is of type object.
object