Config

Update application configuration

Updates the application configuration. Requires admin privileges.

patch/config

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/config
  • Auth: one of:
    • HTTP bearer
    • API key in header X-Api-Key

Request body

smtpHoststring nullable

Hostname or IP address of the SMTP server

smtpPortnumber nullable

Port number of the SMTP server

smtpNamestring nullable

Client hostname used in the EHLO command for SMTP

smtpSecureboolean

Whether to use a secure connection for SMTP

smtpTlsRejectUnauthorizedboolean

Whether to reject unauthorized or self-signed TLS certificates for SMTP connections

smtpUserstring nullable

Username for authenticating with the SMTP server

smtpPasswordstring nullable

Password for authenticating with the SMTP server

smtpFromstring nullable

Default "from" used for outgoing SMTP emails

Example request

{
  "smtpHost": "smtp.example.com",
  "smtpPort": 587,
  "smtpName": "localhost",
  "smtpTlsRejectUnauthorized": true,
  "smtpUser": "no-reply@example.com",
  "smtpPassword": "SecurePassword123!",
  "smtpFrom": "no-reply@example.com"
}

Response

Configuration updated successfully

Example response

{
  "item": {
    "id": "1",
    "smtpHost": "smtp.example.com",
    "smtpPort": 587,
    "smtpName": "localhost",
    "smtpTlsRejectUnauthorized": true,
    "smtpUser": "no-reply@example.com",
    "smtpPassword": "SecurePassword123!",
    "smtpFrom": "no-reply@example.com",
    "createdAt": "2024-01-01T00:00:00.000Z",
    "updatedAt": "2024-01-01T00:00:00.000Z"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.