---
title: "Check Or Create Database"
method: GET
path: "/api/new_mdm/check_or_create_database"
tags: ["MDM NEW"]
---

# Check Or Create Database

`GET /api/new_mdm/check_or_create_database`

**Function**: `check_or_create_database`
**Type**: API Endpoint (GET)

**Purpose**:  
Checks if a database exists and creates it if it doesn't, along with creating the dependency tables.

**URL**:  
`GET /api/new_mdm/check_or_create_database`

**Request Headers**:
- `Customer-Key` (str, required): A base64-encoded string identifying the customer and database.
- `App-Code` (str, required): A base64-encoded string identifying the application.

**Request Body**: None

**Response**:
A JSON object containing a status message and details of the database creation/check.

**Status Codes**:
- 200: Success
- 404: Database not found
- 500: Failed to create/check database

## Headers

- `Customer-Key` string, required
- `App-Code` 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)
