PlatformXeDocs
Get API Key

Messaging Processor

Configuration reference for email, SMS, and WhatsApp messaging behaviour.

The messaging processor controls how your organization's email, SMS, and WhatsApp messages are dispatched. Each channel (email, SMS, WhatsApp) has its own sub-configuration within the processor.

Endpoint

GET /api/v1/messaging/processor -- Read current configuration.

PUT /api/v1/messaging/processor -- Update configuration.

Scope: messaging:manage

Configuration schema

{
  "config": {
    "email": {
      "enabled": true,
      "preferredProviders": ["provider-a", "provider-b"],
      "fromName": "Your App",
      "replyTo": "support@yourapp.com"
    },
    "sms": {
      "enabled": true,
      "preferredProviders": ["provider-a"],
      "defaultRegionCode": "NG"
    },
    "whatsapp": {
      "enabled": false
    }
  }
}

Email sub-config

FieldTypeDefaultDescription
enabledbooleantrueWhether email sending is active
preferredProvidersstring[]Platform defaultProvider preference order for failover. PlatformXe selects the first available provider from this list
fromNamestringOrganization nameDefault sender display name when not specified per-request
replyTostringNoneDefault reply-to address when not specified per-request

SMS sub-config

FieldTypeDefaultDescription
enabledbooleantrueWhether SMS sending is active
preferredProvidersstring[]Platform defaultProvider preference order for failover
defaultRegionCodestring"NG"ISO 3166-1 alpha-2 country code for phone number normalization

WhatsApp sub-config

FieldTypeDefaultDescription
enabledbooleanfalseWhether WhatsApp messaging is active

WhatsApp messaging requires additional setup. Contact support to enable WhatsApp for your organization.

How it affects runtime

  • Provider failover: When sending an email, PlatformXe tries providers in the order defined by preferredProviders. If the first provider fails, it falls through to the next. This gives you control over cost and reliability trade-offs.
  • From name defaults: If a send request omits the fromName field, the processor's configured value is used. Per-request values always override the processor default.
  • Region codes: SMS phone numbers without a country prefix are normalized using defaultRegionCode. Set this to the country where most of your recipients are located.

Examples

Set email defaults and enable WhatsApp

curl

curl -X PUT https://api.platformxe.com/api/v1/messaging/processor \
  -H "Content-Type: application/json" \
  -H "x-api-key: pxk_live_your_api_key_here" \
  -d '{
    "config": {
      "email": {
        "fromName": "Acme Notifications",
        "replyTo": "help@acme.com"
      },
      "whatsapp": {
        "enabled": true
      }
    }
  }'

TypeScript SDK

import { PlatformXe } from '@caldera/platformxe-sdk';

const px = new PlatformXe({ apiKey: 'pxk_live_your_api_key_here' });

await px.messaging.updateProcessor({
  config: {
    email: {
      fromName: 'Acme Notifications',
      replyTo: 'help@acme.com',
    },
    whatsapp: { enabled: true },
  },
});

Python SDK

from platformxe import PlatformXe

px = PlatformXe(api_key="pxk_live_your_api_key_here")

px.messaging.update_processor({
    "config": {
        "email": {
            "fromName": "Acme Notifications",
            "replyTo": "help@acme.com"
        },
        "whatsapp": {"enabled": True}
    }
})

Change SMS region code

await px.messaging.updateProcessor({
  config: {
    sms: { defaultRegionCode: 'GH' },
  },
});

Error responses

CodeDescription
FORBIDDENAPI key does not have the messaging:manage scope
BAD_REQUESTInvalid config shape (e.g., unknown provider, invalid region code)
RATE_LIMITEDRate limit exceeded