# 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

<MethodTag m="GET" /> <MethodTag m="PATCH" /> `/settings`

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

<ParamTable fields={[
  { name: 'logoUrl',       type: 'string',  required: false, desc: 'HTTPS URL to your company logo (PNG or SVG). Shown in the dashboard and partner-branded emails.' },
  { name: 'emailConfig.host',      type: 'string',  required: false, desc: 'SMTP server hostname.' },
  { name: 'emailConfig.port',      type: 'integer', required: false, desc: 'SMTP port (e.g. 587 for STARTTLS, 465 for implicit TLS).' },
  { name: 'emailConfig.secure',    type: 'boolean', required: false, desc: 'true for implicit TLS; false for STARTTLS.' },
  { name: 'emailConfig.username',  type: 'string',  required: false, desc: 'SMTP authentication username.' },
  { name: 'emailConfig.password',  type: 'string',  required: false, desc: 'SMTP password. Write-only — never returned in GET responses.' },
  { name: 'emailConfig.fromName',  type: 'string',  required: false, desc: 'Display name in the From header.' },
  { name: 'emailConfig.fromEmail', type: 'string',  required: false, desc: 'From address for outbound emails, e.g. noreply@acme.com.' },
]} />

<UITabs items={['GET', 'PATCH']}>
  <Tab>
    ```bash
    curl "https://mystocks.africa/api/v1/partner/settings" \
      -H "Authorization: Bearer pk_live_<key>"
    ```
  </Tab>
  <Tab>
    ```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"
        }
      }'
    ```
  </Tab>
</UITabs>

```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

<MethodTag m="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" }
```
