Skip to main content
PUT
/
tenant
/
email-settings
curl --request PUT \
  --url https://api.royalti.io/tenant/email-settings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sender": {
    "senderEmail": "hello@mail.yourlabel.com",
    "senderName": "Your Label"
  }
}
'
{
  "status": "success",
  "data": {
    "domain": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "domain": "<string>",
      "senderEmail": "<string>",
      "senderName": "<string>",
      "dnsRecords": {
        "dkim": {
          "host": "<string>",
          "value": "<string>",
          "priority": 123
        },
        "spf": {
          "host": "<string>",
          "value": "<string>",
          "priority": 123
        }
      },
      "dkimVerified": true,
      "spfVerified": true,
      "verifiedAt": "2023-11-07T05:31:56Z",
      "lastCheckedAt": "2023-11-07T05:31:56Z"
    },
    "branding": {
      "fromName": "<string>",
      "replyTo": "<string>",
      "logoUrl": "<string>",
      "primaryColor": "#006666",
      "companyName": "<string>",
      "companyAddress": "<string>",
      "websiteUrl": "<string>",
      "footerText": "<string>",
      "unsubscribeUrl": "<string>"
    },
    "effectiveSender": {
      "email": "noreply@royalti.io",
      "name": "Royalti",
      "isCustomDomain": true
    },
    "fieldRequirements": {
      "alwaysAvailable": [
        "replyTo",
        "companyName",
        "companyAddress",
        "footerText"
      ],
      "requiresVerifiedDomain": [
        "fromName",
        "logoUrl",
        "primaryColor",
        "websiteUrl",
        "unsubscribeUrl"
      ],
      "hasVerifiedDomain": true
    }
  }
}
{
"status": "error",
"message": "<string>",
"code": "<string>",
"details": {}
}
{
"status": "error",
"message": "<string>",
"code": "<string>",
"details": {}
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

PUT /tenant/email-settings Description: Updates sender (requires a verified email domain; senderEmail must use that domain) and/or branding. Branding fields fromName, logoUrl, primaryColor, websiteUrl, and unsubscribeUrl are rejected unless the tenant has a verified email domain; replyTo, companyName, companyAddress, and footerText are always available. Returns the full updated settings (same shape as GET /tenant/email-settings). Authorization:
  • Required role: admin or higher
Method: PUT

Code Examples

const response = await fetch('https://api.royalti.io/tenant/email-settings', {
  method: 'PUT',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "ref": "#/components/schemas/UpdateEmailSettingsRequest"
  })
});

const data = await response.json();
console.log(data);
import requests

response = requests.put(
  'https://api.royalti.io/tenant/email-settings',
  headers={
    'Authorization': f'Bearer {token}'
  },
  json={"ref":"#/components/schemas/UpdateEmailSettingsRequest"}
)

data = response.json()
print(data)
curl -X PUT https://api.royalti.io/tenant/email-settings \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ref":"#/components/schemas/UpdateEmailSettingsRequest"}'

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Body

application/json

Provide sender and/or branding. sender requires a verified email domain; domain-required branding fields are rejected unless the tenant has a verified email domain.

sender
object

Requires the tenant's email domain to be verified.

branding
object

Response

Email settings updated

status
string
Example:

"success"

data
object