Update users

Learn how to update users

Description

The following route can be used to update your users.

Endpoint

PUT https://sentry.aleno.ai/users

Query parameters

No query parameters.

Payload

NameRequiredTypeDescription

users

required

List of UserUpdateData

List that contains data related to users you want to update. Data description can be found bellow

UserUpdateData description

UserUpdateData is an object that describes updates you want to perform.

NameRequiredTypeDescription

id

required

string

Id of the user you want to update

userName

required

string or null

new user name you want to set for this user.

userContext

required

string or null

new context you want to set for this user.

CURL example

curl -X PUT \
  https://sentry.aleno.ai/users \
  -H 'accept: application/json' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "users": [
        {
            "id": "a675415b-62d6-4400-87dc-7f50b24a99cf",
            "userName": "A new name",
            "userContext": "A new context"
        }
    ]
}'

Result

Returns list of User objects corresponding to updated users.

{
  "data": [
    {
      "id": "a675415b-62d6-4400-87dc-7f50b24a99cf",
      "userContext": "A new context",
      "userName": "A new name",
      "accountId": "938862f0-f629-413d-bc88-a7a4fe54e2ad",
      "createdAt": "2024-03-18T14:45:14.747Z",
      "updatedAt": "2024-03-18T14:45:14.747Z"
    }
  ]
}

Last updated