# Get Settings

**Endpoint**

`GET/v2/messages/settings`

**Link**

{% embed url="<https://stagep.tst-apidmndelss.com/openapi/v2.html#/operations/Messages_GetSettings>" %}

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `Bearer <JWT>`     | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns the system configuration settings organized into logical groups.

#### **Response Fields**

**1. Common Settings (`common`)**

| Field               | Type      | Description                                                                  | Example                   |
| ------------------- | --------- | ---------------------------------------------------------------------------- | ------------------------- |
| **`enabled`**       | `boolean` | **Overall system status**. `true` = operational, `false` = maintenance mode. | `true`                    |
| **`appHostname`**   | `string`  | **Backend application hostname**.                                            | `"api.paymentsystem.com"` |
| **`frontHostname`** | `string`  | **Frontend application hostname**.                                           | `"app.paymentsystem.com"` |
| **`frontName`**     | `string`  | **Frontend display name**.                                                   | `"Payment Portal"`        |
| **`companyName`**   | `string`  | **Company legal name**.                                                      | `"Acme Payments Inc."`    |
| **`companyPhone`**  | `string`  | **Company support phone number**.                                            | `"+1-800-123-4567"`       |

**2. Email Settings (`email`)**

| Field               | Type      | Description                                                    | Example                       |
| ------------------- | --------- | -------------------------------------------------------------- | ----------------------------- |
| **`enabled`**       | `boolean` | **Email service status**. `true` = active, `false` = disabled. | `true`                        |
| **`emailAccount`**  | `string`  | **SMTP email account**.                                        | `"noreply@paymentsystem.com"` |
| **`emailPassword`** | `string`  | **SMTP account password** (may be masked).                     | `"********"`                  |
| **`smtpHost`**      | `string`  | **SMTP server hostname**.                                      | `"smtp.gmail.com"`            |
| **`smtpPort`**      | `integer` | **SMTP server port**.                                          | `587`                         |

**Example Response:**

json

```
{
  "settings": {
    "common": {
      "enabled": true,
      "appHostname": "api.paymentsystem.com",
      "frontHostname": "app.paymentsystem.com",
      "frontName": "Payment Portal",
      "companyName": "Acme Payments Inc.",
      "companyPhone": "+1-800-123-4567"
    },
    "email": {
      "enabled": true,
      "emailAccount": "noreply@paymentsystem.com",
      "emailPassword": "********",
      "smtpHost": "smtp.gmail.com",
      "smtpPort": 587
    }
  }
}
```

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/messages/settings' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Response in Maintenance Mode**

json

```
{
  "settings": {
    "common": {
      "enabled": false,
      "appHostname": "api.paymentsystem.com",
      "frontHostname": "app.paymentsystem.com",
      "frontName": "Payment Portal",
      "companyName": "Acme Payments Inc.",
      "companyPhone": "+1-800-123-4567"
    },
    "email": {
      "enabled": false,
      "emailAccount": "noreply@paymentsystem.com",
      "emailPassword": "********",
      "smtpHost": "smtp.gmail.com",
      "smtpPort": 587
    }
  }
}
```

***

### **Error Responses**

1. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```

***

### **Notes**

* **Maintenance Mode**: When `common.enabled` is `false`, the system may be in maintenance mode with limited functionality.
* **Email Service**: If `email.enabled` is `false`, email notifications will not be sent.
* **Security**: Passwords are typically masked or returned only in encrypted form.
* **Hostnames**: Used for generating links in emails and notifications.

**Common Use Cases**:

* Displaying company information in UI
* Configuring email client connections
* Checking system status before operations
* Building dynamic URLs for notifications

Real request example

```postman_json
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTM3Mzc3LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.8s2wnR_5KqHI6W6ZT6u00t1fFl7ai37J03GCO1k95Jg

```

Real response example

```postman_json
{
  "settings": {
    "common": {
      "enabled": false,
      "appHostname": "",
      "frontHostname": "",
      "frontName": "",
      "companyName": "",
      "companyPhone": ""
    },
    "email": {
      "enabled": false,
      "emailAccount": "",
      "emailPassword": "",
      "smtpHost": "",
      "smtpPort": 0
    }
  }
}
```

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.delos.financial/messages/get-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
