---
title: "Update Basic Details"
method: POST
path: "/api/MobileApp/templates/update_basic_details"
tags: ["MobileApp"]
---

# Update Basic Details

`POST /api/MobileApp/templates/update_basic_details`

## Request

- Base URL: `https://api.leapsurgebi.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.leapsurgebi.com/api/MobileApp/templates/update_basic_details`
- Auth: OAuth 2
  - Password
  - Token URL: `/auth/token`
- TypeScript: <https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/docs/api/MobileApp/templates/update_basic_details/post.ts> (a function with typed inputs; its response is checked against the schema)

**Function**: `update_basic_details`
**Type**: API Endpoint (POST)

**Purpose**:
Updates the basic details of an existing template in the database. Validates the input data to ensure all required fields are present and updates the template's information if it exists.

**URL**:
`POST /templates/update_basic_details`

**Request Body**:
- **template_code** (str, required): The unique code of the template to update.
- **template_name** (str, required): The new name for the template.
- **format** (str, required): The output format of the template.
- **email_subject** (str, required): The subject of the email associated with the template.
- **email_body** (str, required): The body content of the email.
- **email_cc** (List[str], optional): A list of CC email addresses.
- **email_bcc** (List[str], optional): A list of BCC email addresses.
- **status** (bool, required): The active status of the template.
- **storage_type** (int, required): Storage backend — 0 Internal Azure, 1 SharePoint, 2 Amazon S3, 3 Customer Azure.
- **storage_config** (dict, optional): Non-secret per-provider storage settings (incl. credential_profile).
- **file_path** (str, optional): The file path of the template.
- **file_name** (str, optional): The file name of the template.
- **modified_by** (str, required): The user who modified the template.
- **modified_on** (datetime, required): The timestamp of when the template was modified.

**Response**:
- Returns a JSON object containing the updated template details and a success message if the update is successful.
- Returns an error message if the template is not found or any required field is missing.

**Exceptions**:
- Raises `JSONResponse` with a 400 status code if any required field is missing or the template is not found.
- Raises `JSONResponse` with a 500 status code for any internal server errors.

## Request body

- TemplateBasicRequest
  - `template_code` string, required
  - `template_name` string, required
  - `report_type` integer
  - `format` string, required
  - `email_subject` string, required
  - `email_body` string, required
  - `email_cc` string[], nullable
  - `email_bcc` string[], nullable
  - `status` boolean, required
  - `storage_type` integer
  - `storage_config` object, nullable
  - `is_container` boolean, nullable
  - `file_path` string, nullable
  - `file_name` string, nullable
  - `modified_by` string, required
  - `modified_on` string, date-time, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-24** `23b42df3193a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/changes/api/MobileApp/templates/update_basic_details/post.md)

---

[API](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi.md) - [All operations](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/llms.txt) - [OpenAPI document](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/revisions/13653cb8ee76?raw)
