Views:
Replaces all the directory users belonging to the domain with the new records you provide.
Note
Note
When making this API request, be aware that all the existing directory users of this domain will be deleted, and the new directory users will be added for the domain.

HTTP Request

PUT https://<serviceURL>/api/v1/domains/<domain>/users

Request Parameters

Parameter
Required
Description
domain
Yes
Domain whose directory users you want to replace.

HTTP Request Example

PUT https://<serviceURL>/api/v1/domains/sample1.com/users HTTP/1.1
Authorization: Basic c2FtcGxlOmZqZmo0OTBpNGpnaDAzM2dsajQzYXB3ZW1hMzEwdjEwamIxZ2lrM2oz
 
[
    {
        "emailLocalPart":"user1",
        "displayName":"tom"
    },
    {
        "emailLocalPart":"user2"
    }
]

HTTP Request Body

The request body is an array of directory users with detailed information about each one.
Name
Type
Length
Pattern
Required
Description
emailLocalPart
String
255 characters
^[-a-zA-Z0-9!#$%&\"'+/=?^_`{|}~][-a-zA-Z0-9!#$%&\"'+/=?^_`{|}~.]{0,254}$
Yes
Local part of an email address.
displayName
String
255 characters
N/A
No
Display name of an email address.
Note
Note
Make sure the request body contains content other than []; otherwise, the request will be considered as invalid, and an error message will be returned.

Response

On success, the service sends back an HTTP 204 response with no output; otherwise, the response body contains error details. For more information about errors, see API response codes.
Status Code
Description
204
Successful.
No content will be returned in the response body.

Response Example

HTTP/1.1 204