> For the complete documentation index, see [llms.txt](https://docs.delos.financial/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.delos.financial/messages/update-settings.md).

# Update Settings

Updates system configuration settings including common application parameters and email service configuration. This endpoint allows administrators to modify operational settings.

**Endpoint**

`POST/v2/messages/settings`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Messages_UpdateSettings>" %}

### **Request**

#### **Headers**

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

#### **Request Body (JSON)**

All fields are optional - only include the settings you want to update.

| Field               | Type      | Description                          | Required | Example                       |
| ------------------- | --------- | ------------------------------------ | -------- | ----------------------------- |
| **`settings`**      | `object`  | Configuration settings object.       | Yes      | -                             |
| → **`common`**      | `object`  | Common application settings.         | No       | -                             |
| → → `enabled`       | `boolean` | System status. `true` = operational. | No       | `true`                        |
| → → `appHostname`   | `string`  | Backend API hostname.                | No       | `"api.paymentsystem.com"`     |
| → → `frontHostname` | `string`  | Frontend application hostname.       | No       | `"app.paymentsystem.com"`     |
| → → `frontName`     | `string`  | Frontend display name.               | No       | `"Payment Portal"`            |
| → → `companyName`   | `string`  | Company legal name.                  | No       | `"Acme Payments Inc."`        |
| → → `companyPhone`  | `string`  | Company support phone.               | No       | `"+1-800-123-4567"`           |
| → **`email`**       | `object`  | Email service settings.              | No       | -                             |
| → → `enabled`       | `boolean` | Email service status.                | No       | `true`                        |
| → → `emailAccount`  | `string`  | SMTP email account.                  | No       | `"noreply@paymentsystem.com"` |
| → → `emailPassword` | `string`  | SMTP account password.               | No       | `"securepassword123"`         |
| → → `smtpHost`      | `string`  | SMTP server hostname.                | No       | `"smtp.gmail.com"`            |
| → → `smtpPort`      | `integer` | SMTP server port.                    | No       | `587`                         |

**Example Request Body (Partial Update):**

json

```
{
  "settings": {
    "common": {
      "companyName": "New Company Name Inc.",
      "companyPhone": "+1-888-999-0000"
    },
    "email": {
      "smtpHost": "smtp.mailprovider.com",
      "smtpPort": 465
    }
  }
}
```

**Example Request Body (Full Update):**

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": "securepassword123",
      "smtpHost": "smtp.gmail.com",
      "smtpPort": 587
    }
  }
}
```

***

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

Returns the updated system configuration settings.

#### **Response Fields**

Same structure as the request body, showing all current settings after update.

**Example Response:**

json

```
{
  "settings": {
    "common": {
      "enabled": true,
      "appHostname": "api.paymentsystem.com",
      "frontHostname": "app.paymentsystem.com",
      "frontName": "Payment Portal",
      "companyName": "New Company Name Inc.",
      "companyPhone": "+1-888-999-0000"
    },
    "email": {
      "enabled": true,
      "emailAccount": "noreply@paymentsystem.com",
      "emailPassword": "********",
      "smtpHost": "smtp.mailprovider.com",
      "smtpPort": 465
    }
  }
}
```

***

### **Examples**

#### **Request (Enable Maintenance Mode)**

bash

```
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/messages/settings' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Content-Type: application/json' \
  -d '{
    "settings": {
      "common": {
        "enabled": false
      }
    }
  }'
```

#### **Request (Update Email Settings)**

bash

```
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/messages/settings' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Content-Type: application/json' \
  -d '{
    "settings": {
      "email": {
        "smtpHost": "smtp.office365.com",
        "smtpPort": 587,
        "emailAccount": "notifications@company.com"
      }
    }
  }'
```

***

### **Error Responses**

1. **Invalid SMTP Configuration**:

   json

   ```
   { "error": "SMTP connection failed: Authentication required" }
   ```
2. **Invalid Hostname**:

   json

   ```
   { "error": "Invalid hostname format" }
   ```
3. **Unauthorized**:

   json

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

***

### **Notes**

* **Partial Updates**: Only included fields are modified; omitted fields remain unchanged.
* **Password Masking**: Response may mask passwords for security (`********`).
* **Validation**: Settings are validated before application (e.g., SMTP connection test).
* **Immediate Effect**: Changes typically take effect immediately.

**Best Practices**:

* Test email settings before updating in production
* Use maintenance mode for system updates
* Keep hostnames consistent with SSL certificates


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.delos.financial/messages/update-settings.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
