Skip to main content
Sniko supports multiple SMS providers simultaneously through a MultiProviderSmsService. Providers are selected at send-time based on priority, enabled status, and optional country restrictions. Navigate to Admin → SMS Providers (/admin/sms-providers) to manage them.

Provider list

The providers page shows all configured SMS providers ordered by priority (highest first), along with:
  • Provider type (e.g. twilio, vonage)
  • Enabled / active status
  • Priority score
  • Cost per SMS
  • Daily and monthly limits
  • Masked credentials
  • Creation and last-updated timestamps
The page also shows system statistics (total messages, delivery rates, etc.) from MultiProviderSmsService::getStatistics() and a list of available provider types that can be added.

Adding a provider

1

Click Add provider

Opens the provider creation form.
2

Select the provider type

Choose from the available types returned by MultiProviderSmsService::getAvailableProviders() (e.g. twilio, vonage, messagebird). Each type has a set of required credential fields.
3

Fill in the details

FieldRequiredDescription
NameYesInternal label for this provider configuration.
Provider typeYesGateway type (immutable after creation).
CredentialsYesProvider-specific API credentials (see below).
PriorityNoInteger 0–100. Higher priority providers are tried first. Default: 0.
Cost per SMSNoCost in your currency for reporting purposes.
Daily limitNoMaximum messages per day. Leave blank for unlimited.
Monthly limitNoMaximum messages per month. Leave blank for unlimited.
Supported countriesNoArray of ISO 3166-1 alpha-2 country codes. Leave blank to support all countries.
EnabledWhether this provider is available for routing.
4

Save

Required credentials are validated before saving. Missing fields produce per-field validation errors.

Twilio credentials

For provider_type = twilio, the required credentials are:
Credential fieldDescription
account_sidYour Twilio Account SID (starts with AC)
auth_tokenYour Twilio Auth Token
from_numberThe Twilio phone number to send from (E.164 format, e.g. +15551234567)
Credentials are encrypted at rest using Laravel’s encryption facilities and masked in the UI (only required fields are shown decrypted when editing).

Setting the active provider

The active provider is the one currently selected by the routing service as the primary gateway. To promote a provider:
  1. Ensure the provider is enabled (is_enabled = true).
  2. Click Set as active on the provider row.
This calls SmsProvider::setAsActive(), which sets is_active = true on the chosen provider. You cannot set a disabled provider as active.
Multiple providers can be enabled simultaneously. Only one can be active (primary). The MultiProviderSmsService falls back to other enabled providers if the active one fails or hits its rate limits.

Editing a provider

Click Edit on a provider row. You can update the name, credentials, priority, limits, supported countries, and enabled status. The provider type cannot be changed after creation. When editing, credentials are decrypted and pre-filled. If you leave a credential field blank, it retains its previous value.

Deleting a provider

You cannot delete the currently active provider. Set a different provider as active first.
Click Delete on a provider row. The provider record is permanently removed.

Testing a provider

Validate configuration

Click Test on a provider row to call MultiProviderSmsService::testProvider(). This validates that the credentials are correct and the gateway is reachable without sending a real message.

Send a test SMS

To send a real test message:
  1. Click Send test SMS on a provider row.
  2. Enter a destination phone number (E.164 format).
  3. Enter a message body (max 1000 characters).
  4. Click Send.
The response includes whether the send was successful and the gateway-assigned message_id if successful.

Message logs

Click View logs on a provider row to open the logs view (/admin/sms-providers/{provider}/logs). Logs are paginated at 50 per page and filterable by:
FilterDescription
StatusDelivery status of the message
From dateLog entries on or after this date
To dateLog entries on or before this date

Multiple providers for redundancy

To configure regional or redundancy routing:
  1. Add a primary provider with high priority (e.g. priority 100) and no country restrictions.
  2. Add a regional provider with a lower priority (e.g. priority 50) and set supported_countries to the target region’s country codes.
  3. Add a fallback provider with priority 10 and no country restrictions.
The routing service selects the highest-priority enabled provider that matches the destination country. If delivery fails, it moves to the next eligible provider.

Build docs developers (and LLMs) love