PUT
/
users
/
{uid}
Update
curl --request PUT \
  --url https://{appid}.api-{region}.cometchat.io/v3/users/{uid} \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '{
  "name": "<string>",
  "avatar": "<string>",
  "link": "<string>",
  "role": "<string>",
  "statusMessage": "<string>",
  "metadata": {
    "@private": {
      "email": "user@email.com",
      "contactNumber": "0123456789"
    }
  },
  "tags": [
    "tag1"
  ],
  "unset": [
    "avatar"
  ]
}'
{
  "data": {
    "uid": "superhero6",
    "name": "Barry Allen",
    "link": "http://placehold.it",
    "avatar": "http://placehold.it/120x120&text=image1",
    "metadata": {
      "email": "user@email.com",
      "contactNumber": "0123456789"
    },
    "status": "offline",
    "role": "manager",
    "createdAt": 1638354015,
    "updatedAt": 1638354799,
    "tags": [
      "supergroup"
    ]
  }
}

Authorizations

apikey
string
header
required

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

Path Parameters

uid
string
required

An UID of a user.

Body

application/json

Response

200 - application/json

Updated user

The response is of type object.