POST
/
data_import
/
users
Import Users
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
      }
    }
  }
}

Authorizations

apikey
string
header
required

API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).

Body

application/json

Response

200 - application/json

Import User(s)

The response is of type object.