POST Add Hierarchy User

URL: /hierarchy/user

Accessible by: EMS, Utility accounts only.

Restrictions: The user must have the security privilege on the My Sets set as well as any other set to which privileges are being added. Privileges may not be elevated above the privileges granted to the API user performing this request.

Adds one or more new users to the hierarchy and optionally assigns privileges to the new users. The privileges being added must be only for the new users being added. If no privileges are provided, the user will be a member of the hierarchy but will not have access to any sets.

When a new user is added, an invitation email is sent to the email provided as the userName property, which must be a valid email address. The user must then click on the invitation link to complete their registration.

See Getting Started with Management Set Hierarchy for additional information.

Request Properties

Property Version Type Required Description
operation 1 String Yes The type of request. Always "add".
users 1 HierarchyUser [] Yes The list of users to add.
privileges 1 HierarchyPrivilege [] No The privileges to assign to the new users.

Response Properties

Property Version Type Description
status 1 Status The api response code.

Example Request:

Request Body

NOTE: Request body is not encoded for example purposes.

HEADERS:
	Content-Type: application/json;charset=UTF-8
	Authorization: Bearer Rc7JE8P7XUgSCPogLOx2VLMfITqQQrjg
	
REQUEST:
	POST https://api.ecobee.com/1/hierarchy/user?format=json
	
POST BODY:
{
	"operation": "add",
	"users": [
		{
			"userName": "new@user1.com",
			"firstName": "User",
			"lastName": "1"
		},
		{
			"userName": "new@user2.com",
			"firstName": "User",
			"lastName": "2"
		}
	],
	"privileges": [
		{
			"setPath": "/MainNode",
			"userName": "new@user1.com",
			"allowView": true
		},
		{
			"setPath": "/OtherNode",
			"userName": "new@user1.com",
			"allowView": true
		}
	]
}
				

Sample API Call

Show code sample in:
curl -s --request POST --data-urlencode @json.txt -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Bearer ACCESS_TOKEN" "https://api.ecobee.com/1/hierarchy/user?format=json"  
				

Example Response:

{
    "status": {
        "code": 0,
        "message": ""
    }
}
    

Back To Top