# Partner Settings

> Configure partner branding (logo URL) and SMTP transactional email for partner-branded messages to your sub-account users. Every change logs a settings.updated audit event.

Configure branding (logo URL) and SMTP transactional email. SMTP enables partner-branded emails to
your sub-account users. A `settings.updated` audit event is logged on every `PATCH` with the list of
changed fields.

## Get / update settings

`GET` `PATCH` `/settings`

Fetch or update partner settings. The SMTP password is never returned — only a `hasPassword: true`
boolean confirms it is set.

logoUrl (string, optional): HTTPS URL to your company logo (PNG or SVG). Shown in the dashboard and partner-branded emails.

emailConfig.host (string, optional): SMTP server hostname.

emailConfig.port (integer, optional): SMTP port (e.g. 587 for STARTTLS, 465 for implicit TLS).

emailConfig.secure (boolean, optional): true for implicit TLS; false for STARTTLS.

emailConfig.username (string, optional): SMTP authentication username.

emailConfig.password (string, optional): SMTP password. Write-only — never returned in GET responses.

emailConfig.fromName (string, optional): Display name in the From header.

emailConfig.fromEmail (string, optional): From address for outbound emails, e.g. noreply\@acme.com.

```bash
curl "https://mystocks.africa/api/v1/partner/settings" \
  -H "Authorization: Bearer pk_live_<key>"
```

```bash
curl -X PATCH "https://mystocks.africa/api/v1/partner/settings" \
  -H "Authorization: Bearer pk_live_<key>" \
  -H "Idempotency-Key: settings-update-2026-08-10" \
  -H "Content-Type: application/json" \
  -d '{
    "logoUrl": "https://acme.com/logo.svg",
    "emailConfig": {
      "host": "smtp.acme.com",
      "port": 587,
      "secure": false,
      "username": "noreply@acme.com",
      "password": "s3cr3t",
      "fromName": "Acme Investments",
      "fromEmail": "noreply@acme.com"
    }
  }'
```

```json
{
  "logoUrl": "https://acme.com/logo.svg",
  "emailConfig": { "host": "smtp.acme.com", "port": 587, "secure": false, "username": "noreply@acme.com", "fromName": "Acme Investments", "fromEmail": "noreply@acme.com", "hasPassword": true }
}
```

## Send an SMTP test email

`POST` `/settings` *(SMTP test)*

Send a test email via your configured SMTP server to your registered partner address. Use it to
validate SMTP credentials before enabling partner-branded emails.

```bash
curl -X POST "https://mystocks.africa/api/v1/partner/settings" \
  -H "Authorization: Bearer pk_live_<key>" \
  -H "Idempotency-Key: smtp-test-2026-08-10"
```

```json
{ "message": "Test email sent to dev@acme.com" }
```
