Skip to main content
POST
Assign an app to a user
Only bms can be assigned through the API. The value is case-sensitive. Any other appId fails with 400, and so does a role that does not exist for your organization’s bms app.
The response is 202 with no body, which means KODE accepted the assignment. It is not finished yet. Call Get a user and read assignedInApps[].assignmentStatus until it is SUCCEEDED or FAILED. The values are INITIALIZING, PROCESSING, SUCCEEDED, FAILED, and PENDING. PENDING applies to a guest who has not accepted the invitation. The assignment does not run until the guest accepts.
buildingIds limits the user’s access to those buildings. The IDs must be buildings of your organization. The API does not return them, so assignedInApps shows no building list.
Assigning an app to an active user can send that user an email. Check that the user is the right one before you send the request.

Authorizations

Authorization
string
header
required

Paste an access token from Create an access token. Tokens expire, so request a new one if you receive 401.

Path Parameters

appId
string
required

Identifier of the app. Only bms is supported.

userId
string
required

Identifier of the user.

Body

application/json
role
string
required
Pattern: \S
buildingIds
string[]

Response

KODE accepted the assignment. The response has no body. Read the user to follow the assignment.