SmsAddProfile¶
POST sms/providerProfile
Creates a provider profile: the credentials and the behaviour of one integration inside a brand. A message is always sent through a profile, never through a provider directly.
senderId is what the recipient sees as the sender. It is per profile because it is
registered with the operator together with the account — an unregistered sender name is
silently replaced or rejected in many countries.
Access Control¶
Allowed role: admin. The profile belongs to the brand of the caller.
Request¶
POST https://{broker_domain}/sms/providerProfile
{
"name": "Twilio main",
"providerId": 1,
"mode": "COMMON",
"status": "ENABLED",
"deliveryUpdateBy": "WEBHOOK",
"credentials": {
"accountSid": "AC...",
"authToken": "...",
"fromNumber": "+15550001111"
},
"senderId": "ScaleTrade",
"allowedCountries": [
"UA",
"PL"
],
"routingPriority": 100,
"isDefault": true
}
{
"command": "SmsAddProfile",
"extID": "1",
"data": {
"name": "Twilio main",
"providerId": 1,
"mode": "COMMON",
"status": "ENABLED",
"deliveryUpdateBy": "WEBHOOK",
"credentials": {
"accountSid": "AC...",
"authToken": "...",
"fromNumber": "+15550001111"
},
"senderId": "ScaleTrade",
"allowedCountries": [
"UA",
"PL"
],
"routingPriority": 100,
"isDefault": true
}
}
const res = await platform.SmsAddProfile({
name: "Twilio main",
providerId: 1,
mode: "COMMON",
status: "ENABLED",
deliveryUpdateBy: "WEBHOOK",
credentials: {
accountSid: "AC...",
authToken: "...",
fromNumber: "+15550001111"
},
senderId: "ScaleTrade",
allowedCountries: [
"UA",
"PL"
],
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 SmsGetProviderAdapters |
senderId |
string | No | Default sender name or number for messages of this profile |
deliveryUpdateBy |
enum | Yes | NONE, REQUEST (module polls the provider), or WEBHOOK (provider posts delivery reports) |
allowedCountries |
array | No | Allowed destinations as ISO codes or dial codes, ["UA","380"]. Empty means every destination |
blockedCountries |
array | No | Blocked destinations, ["US","CA"]. Checked before allowedCountries |
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¶
deliveryUpdateByis validated twice: againstsupportedUpdateModesof the provider record and against the adapter capabilities. A profile that cannot receive delivery reports leaves every message stuck inSENTuntil it expires.routingPriorityis what makes failover deterministic: candidates are tried from the lowest value up, so a backup provider is only used when the primary one refuses.blockedCountrieswins overallowedCountries— a destination listed in both is blocked.
Response Data¶
{
"id": 3,
"brand": "default",
"providerId": 1,
"name": "Twilio main",
"mode": "COMMON",
"deliveryUpdateBy": "WEBHOOK",
"status": "ENABLED",
"credentials": { "accountSid": "AC...", "fromNumber": "+15550001111" },
"senderId": "ScaleTrade",
"allowedCountries": ["UA", "PL"],
"blockedCountries": null,
"routingPriority": 100,
"isDefault": true,
"createdAt": "2026-08-24 13:20:11"
}
Errors¶
| Code | Error | Description |
|---|---|---|
400 |
VALIDATION_ERROR |
Required field missing or enum value unknown |
400 |
UPDATE_MODE_NOT_SUPPORTED |
Provider or adapter cannot deliver reports this way |
404 |
NOT_FOUND |
Provider not found |