---
title: "Update User Menu Details"
method: POST
path: "/api/MobileApp/update_user_menu_details"
tags: ["MobileApp"]
---

# Update User Menu Details

`POST /api/MobileApp/update_user_menu_details`

**Function**: `update_user_menu_details`
**Type**: API Endpoint (post)

**Purpose**:
Updates the menu access details for a specified user based on the provided `Customer_Key` and `User_Code`. 
If the user belongs to a group, it ensures their menu access aligns with the group's access.

**Headers**:
- `Customer_Key` (str, required): The customer key used for authentication.
- `User_Code` (str, required): The user code identifying the user to update.

**Request Body**:
A JSON object containing the update instructions, including menu details:
```json
{
    "menu_details": [
        {
        "menu_id": "string",
        "access": 0
        }
    ],
    "username": "string"
}
```

**Response**:
A JSON response indicating the status of the update operation:
- `status`: The outcome of the update operation (e.g., "success", "failed", "no_changes").
- `message`: A detailed message regarding the operation result.

**Exceptions**:
- Raises `HTTPException` with a 500 status code for any internal server errors.
- Returns a JSON response with a "failed" status if the customer key is invalid or no menu details are provided.

## Headers

- `Customer-Key` string, required
- `User-Code` string, required

## Request body

- MenuDetails
  - `menu_details` MenuUpdate[], required
    - `menu_id` string, required
    - `access` integer, required
  - `username` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi.md) · [All operations](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/leapsurgebi/leapsurgeapi/revisions/5a6b1464bfeb/schema)
