---
title: "Add a location to a user’s MLI level"
method: POST
path: "/MliConfiguration/Levels/{levelId}/Users/{userId}/Locations/{locationId}"
tags: ["MliConfiguration"]
---

# Add a location to a user’s MLI level

`POST /MliConfiguration/Levels/{levelId}/Users/{userId}/Locations/{locationId}`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/MliConfiguration/Levels/{levelId}/Users/{userId}/Locations/{locationId}`
- Auth: OAuth 2
  - Authorization code: `https://sb2login.servicechannel.com/oauth/authorize`
  - Token URL: `https://sb2login.servicechannel.com/oauth/token`
- TypeScript: <https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/docs/MliConfiguration/Levels/:levelId/Users/:userId/Locations/:locationId/post.ts> (a function with typed inputs; its response is checked against the schema)

Assigns the specified location to a particular user and user’s MLI level. A location can be removed from a user by sending the [DELETE /MliConfiguration/Levels/{levelId}/Users/{userId}/Locations/{locationId}](/swagger/ui/index?version=3#/MliConfiguration/DELETEv3_MliConfiguration_Levels__levelId__Users__userId__Locations__locationId_) request.

## Path parameters

- `levelId` integer, required
- `userId` integer, required
- `locationId` integer, required

## Response `200`

Returns the created location ID from table dat_Location_Division.

## Other responses

- `400`: The request is not accepted due to bad syntax, missing parameters, insufficient data, etc. <br/> Error codes: 1128 — Err: Approval level doesn’t exist 1130 — Failed to assign the location to the user 1130 — User is not assigned to the level 1130 — Err: Failed to assign locations to the approval level 1130 — Location doesn’t exist for the current subscriber 1150 — User does not exist 1301 — Request parameters are empty
- `401`: The request is not authorized. <br/> Error codes: 504 — API call rejected by security permissions
- `403`: You are not authorized to request this resource, or the resource is unavailable for some reason. <br/> Error codes: 100 — User has no rights to perform this action

---

[API](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3.md) - [All operations](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/llms.txt) - [OpenAPI document](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/revisions/d490d6596809?raw)
