Skip to content

MailerAddProfile

POST mailer/providerProfile

Creates a provider profile: the credentials and the behaviour of one integration inside a brand. An email is always sent through a profile, never through a provider directly.

fromEmail is what the recipient sees, and its domain has to be verified at the provider — an unverified domain is the single most common reason mail silently lands in spam. Check it with MailerVerifyProfileDomain after creating the profile.

Access Control

Allowed role: admin. The profile belongs to the brand of the caller.

Request

POST https://{broker_domain}/mailer/providerProfile
{
  "name": "Postmark transactional",
  "providerId": 1,
  "mode": "COMMON",
  "status": "ENABLED",
  "deliveryUpdateBy": "WEBHOOK",
  "credentials": {
    "serverToken": "xxxxxxxx-xxxx-xxxx"
  },
  "fromEmail": "[email protected]",
  "fromName": "ScaleTrade",
  "kind": "TRANSACTIONAL",
  "maxPerMinute": 300,
  "routingPriority": 100,
  "isDefault": true
}
{
  "command": "MailerAddProfile",
  "extID": "1",
  "data": {
    "name": "Postmark transactional",
    "providerId": 1,
    "mode": "COMMON",
    "status": "ENABLED",
    "deliveryUpdateBy": "WEBHOOK",
    "credentials": {
      "serverToken": "xxxxxxxx-xxxx-xxxx"
    },
    "fromEmail": "[email protected]",
    "fromName": "ScaleTrade",
    "kind": "TRANSACTIONAL",
    "maxPerMinute": 300,
    "routingPriority": 100,
    "isDefault": true
  }
}
const res = await platform.MailerAddProfile({
  name: "Postmark transactional",
  providerId: 1,
  mode: "COMMON",
  status: "ENABLED",
  deliveryUpdateBy: "WEBHOOK",
  credentials: {
    serverToken: "xxxxxxxx-xxxx-xxxx"
  },
  fromEmail: "[email protected]",
  fromName: "ScaleTrade",
  kind: "TRANSACTIONAL",
  maxPerMinute: 300,
  routingPriority: 100,
  isDefault: true
});

Request Data

Field Type Required Description
name string Yes Profile name shown to managers
description string No Free-form note
providerId int Yes Provider from the catalogue
mode enum Yes COMMON — one sender for everyone; INDIVIDUAL — the sender comes from the manager link
status enum Yes ENABLED or DISABLED
credentials object No Provider credentials; fields are described by the adapter, see MailerGetProviderAdapters
fromEmail string No Default sender address; its domain must be verified at the provider
fromName string No Name shown in the From header
replyToEmail string No Default Reply-To address
kind enum No ANY (default), TRANSACTIONAL, or MARKETING — restrict the profile to one class of email
deliveryUpdateBy enum Yes NONE, REQUEST (module polls the provider), or WEBHOOK (provider posts events)
allowedDomains array No Allowed recipient domains, ["gmail.com", ".ru"]. Empty means every domain
blockedDomains array No Blocked recipient domains, ["mailinator.com"]
trackOpens bool No Let the provider count opens (it injects a tracking pixel)
trackClicks bool No Let the provider count clicks (it rewrites links)
maxPerMinute int No Provider rate limit per minute; 0 means unlimited
dailyLimit int No Daily sending cap; 0 means unlimited
routingPriority int No Lower value is tried first: 100 for the primary profile, 200 for a backup
isDefault bool No Default profile of the brand; setting it clears the flag on the others

Behavior

  • kind separates the sending streams: marketing sent from a transactional domain burns the reputation the confirmation codes depend on, so a profile can be restricted to one class of email.
  • maxPerMinute and dailyLimit mirror what the provider itself enforces — the SES sandbox allows 200 emails a day, others cap per second. The queue simply does not take emails of a profile whose limit is spent, and no attempt is wasted on them.
  • trackOpens and trackClicks are provider-side: the provider injects a pixel and rewrites links. Click tracking changes every URL in the email, which some corporate filters dislike.
  • deliveryUpdateBy is validated against both the provider record and the adapter capabilities.

Response Data

{
  "id": 3,
  "brand": "default",
  "providerId": 1,
  "name": "Postmark transactional",
  "mode": "COMMON",
  "deliveryUpdateBy": "WEBHOOK",
  "status": "ENABLED",
  "credentials": { "serverToken": "xxxxxxxx-xxxx-xxxx" },
  "fromEmail": "[email protected]",
  "fromName": "ScaleTrade",
  "replyToEmail": null,
  "kind": "TRANSACTIONAL",
  "allowedDomains": null,
  "blockedDomains": null,
  "trackOpens": false,
  "trackClicks": false,
  "maxPerMinute": 300,
  "dailyLimit": 0,
  "routingPriority": 100,
  "isDefault": true,
  "domainStatus": "UNKNOWN",
  "createdAt": "2026-08-24 13:20:11"
}

Errors

Code Error Description
400 VALIDATION_ERROR Required field missing, or fromEmail is not a valid address
400 UPDATE_MODE_NOT_SUPPORTED Provider or adapter cannot deliver events this way
404 NOT_FOUND Provider not found