Send SMS and voice (text-to-speech) messages directly from your Craft CMS control panel or programmatically via service APIs.
-
SMS Messaging
- Send individual SMS via control panel
- Programmatic SMS API with fluent interface
- Bulk SMS to Craft Commerce customers
- Advanced options: delay, flash SMS, performance tracking, custom labels
-
Voice Messaging
- Send individual voice calls via control panel
- Programmatic voice API with fluent interface
- Bulk voice calls to Craft Commerce customers
- Text-to-speech with XML support
-
Craft Commerce Integration (optional)
- Bulk messaging to all customers
- Country-based filtering
- Automatic phone number extraction from customer addresses
- Craft CMS 3.1.5 or later
- An API key from seven.io
- (Optional) Craft Commerce 2.x for bulk messaging features
Install via Composer:
# Navigate to your Craft project root
cd /path/to/your/craft-project
# Install the plugin
composer require seven.io/craft
# Install via Craft CLI
./craft install/plugin seven
Alternatively, install from the Craft Plugin Store.
- Navigate to Settings → seven in your Craft control panel
- Enter your seven.io API key (required)
- Optionally set a default sender ID/from number (max 16 characters)
Access the plugin via the main navigation:
- seven SMS - Send individual or bulk SMS messages
- seven Voice - Send individual or bulk voice calls
For bulk messaging with Craft Commerce, leave the recipient field empty and optionally filter by country.
use Seven\Craft\Plugin;
$instance = Plugin::getInstance();
$sms = $instance->getSms();
$sms->params
->setTo('+4901234567890') // Required: recipient(s), comma-separated
->setText('Your message here') // Required: message text
->setFrom('YourCompany') // Optional: sender ID (max 16 chars)
->setDelay('2024-12-31 23:59') // Optional: scheduled delivery
->setFlash(true) // Optional: flash SMS
->setLabel('campaign-2024') // Optional: custom label
->setPerformanceTracking(true); // Optional: enable tracking
$success = $sms->send(); // Returns true on success, false on failure
use Seven\Craft\Plugin;
$instance = Plugin::getInstance();
$voice = $instance->getVoice();
$voice->params
->setTo('+4901234567890') // Required: recipient(s), comma-separated
->setText('Your message here') // Required: message text (TTS)
->setFrom('YourCompany') // Optional: caller ID
->setXml(false) // Optional: XML mode
->setJson(true); // Optional: JSON response
$success = $voice->send(); // Returns true on success, false on failure
SMS Parameters (via SmsParams
):
setTo(string)
- Recipient phone number(s), comma-separatedsetText(string)
- Message textsetFrom(string)
- Sender ID (alphanumeric, max 16 chars)setDelay(string)
- Scheduled delivery timestampsetFlash(bool)
- Send as flash SMSsetForeignId(string)
- Custom foreign IDsetJson(bool)
- JSON response formatsetLabel(string)
- Custom label for trackingsetPerformanceTracking(bool)
- Enable performance tracking
Voice Parameters (via VoiceParams
):
setTo(string)
- Recipient phone number(s), comma-separatedsetText(string)
- Text-to-speech messagesetFrom(string)
- Caller IDsetXml(bool)
- XML modesetJson(bool)
- JSON response format
The send()
method returns a boolean:
true
- Message sent successfully (API response code 100)false
- Sending failed (logged via Craft's error handler)
Check Craft logs for detailed error messages.
When Craft Commerce is installed, you can send messages to all customers:
- Navigate to seven SMS or seven Voice
- Leave the recipient field empty
- Optionally select countries to filter recipients
- Enter your message and send
The plugin automatically extracts phone numbers from customer billing/shipping addresses.
100
- Success- Other codes indicate errors (see seven.io API documentation for details)
Need help? Contact us:
- Email: support@seven.io
- Website: seven.io/en/company/contact
- Issues: GitHub Issues