Modify a User

Update an existing users information by replacing all included fields with the values in the request.

HTTP PATCH

PATCH /api/2013-12-01/Users/[User ID]
You must PATCH at least one of the following to update a user.

Parameter Description
Name First and/or Last name. Maximum of 65 characters.
Username The username the user will use to login.
Password Password for the new user. Must meet your site’s password complexity requirements.
Caller_ID The phone number that should appear on recipient phones when this user makes phone calls or sends voice alerts.
Cell User’s cell phone number.
Desk User’s desk phone number.
Email User’s e-mail address.
Language The language for the user interfaces when the user logs in. Valid values include “en” or “es”.
Agencies[] An array of Agencies this user should have access to.
Agencies[][Operation] The operation to perform on the given Agency ID. Valid values include “add”, “modify”, or “delete”
Agencies[][Agency_ID] Agency ID we want to add, modify, or delete for this user.
Agencies[][Group_ID] Group ID of the Permission group this user should be assigned to in this agency. Required if our Operation is “add” or “modify”.
Example Request

$ curl -XPOST https://[Site Name].readyop.com/api/2013-12-01/Users/[User ID] \
-d "Name=John Doe" \
-d "Agencies[0][Operation]=add" \
-d "Agencies[0][Agency_ID]=1" \
-d "Agencies[0][Group_ID]=2" \
-d "Agencies[1][Operation]=modify" \
-d "Agencies[1][Agency_ID]=21" \
-d "Agencies[1][Group_ID]=4" \
-d "Agencies[3][Operation]=delete" \
-d "Agencies[3][Agency_ID]=5" \
-u "[API Account ID]:[API Token]"

Request Result

{
    "code": 0,
    "status": 200,
    "detail": "Success",
    "timestamp": "2020-01-15T23:28:36+00:00",
    "user": {
        "user": {
            "2FA": "Disabled",
            "Agencies": [
                {
                    "Agency ID": 1,
                    "Group": {
                        "Group ID": 2,
                        "Name": "Agency Administrator"
                    }
                },
                {
                    "Agency ID": 21,
                    "Group": {
                        "Group ID": 4,
                        "Name": "Standard User"
                    }
                }, ...
            ],
            "Caller ID": {
                "Number": 18132897620,
                "Verified": "Y"
            },
            "Cell": null,
            "Desk": 18132897620,
            "Email": "john@readyop.com",
            "Language": 'en',
            "Name": "John Doe",
            "Status": "Active",
            "User ID": 123,
            "Username": "JohnD"
        }
    }
}