Tunisia SMS Best Practices, Compliance, and Features
Tunisia SMS Market Overview
Locale name: | Tunisia |
---|---|
ISO code: | TN |
Region | Middle East & Africa |
Mobile country code (MCC) | 605 |
Dialing Code | +216 |
Market Conditions: Tunisia has a robust mobile telecommunications market with high SMS usage rates. The country's major mobile operators include Ooredoo Tunisia, Orange Tunisia, and Tunisie Telecom. While OTT messaging apps like WhatsApp and Facebook Messenger are popular, SMS remains a critical communication channel, especially for business communications and authentication purposes. Android devices dominate the mobile market share in Tunisia, though iOS devices maintain a significant presence among urban users.
Key SMS Features and Capabilities in Tunisia
Tunisia offers standard SMS capabilities with support for alphanumeric sender IDs and international long codes, though some features like two-way SMS and number portability are not currently available.
Two-way SMS Support
Two-way SMS is not supported in Tunisia. Messages can only be sent one-way from businesses to consumers, limiting interactive messaging capabilities.
Concatenated Messages (Segmented SMS)
Support: Concatenated messaging is not supported in Tunisia.
Message length rules: Messages must be kept within standard SMS length limits.
Encoding considerations: Both GSM-7 and UCS-2 encoding are supported, with GSM-7 allowing up to 160 characters and UCS-2 allowing up to 70 characters per message.
MMS Support
MMS messages are automatically converted to SMS with an embedded URL link. This means that any multimedia content must be hosted separately and accessed via the provided link. For optimal delivery, ensure that multimedia content is mobile-optimized and hosted on reliable, fast-loading servers.
Recipient Phone Number Compatibility
Number Portability
Number portability is not available in Tunisia. Mobile numbers remain tied to their original carrier, which simplifies message routing but limits consumer flexibility.
Sending SMS to Landlines
Sending SMS to landline numbers is not possible in Tunisia. Attempts to send messages to landline numbers will result in a failed delivery and may trigger a 400 response error (error code 21614) from messaging APIs. These messages will not appear in logs and accounts will not be charged for failed attempts.
Compliance and Regulatory Guidelines for SMS in Tunisia
Tunisia's telecommunications sector is regulated by the Instance Nationale des Télécommunications (INT). While specific SMS marketing regulations are still evolving, businesses must adhere to general telecommunications laws and international best practices for messaging.
Consent and Opt-In
Explicit Consent Requirements:
- Obtain clear, documented opt-in consent before sending marketing messages
- Maintain detailed records of when and how consent was obtained
- Include clear terms of service and privacy policy references
- Specify the types of messages users will receive and approximate frequency
HELP/STOP and Other Commands
While Tunisia doesn't mandate specific opt-out keywords, implementing standard opt-out mechanisms is strongly recommended:
- Support both Arabic and French keywords for STOP (توقف/ARRÊT)
- Include HELP (مساعدة/AIDE) functionality
- Process opt-out requests within 24 hours
- Send confirmation messages in the user's preferred language
Do Not Call / Do Not Disturb Registries
Tunisia currently does not maintain an official Do Not Call registry. However, businesses should:
- Maintain their own suppression lists
- Honor opt-out requests immediately
- Implement internal do-not-contact databases
- Regularly clean contact lists to remove unengaged users
Time Zone Sensitivity
Tunisia observes UTC+1 time zone. Best practices include:
- Sending messages between 9:00 AM and 8:00 PM local time
- Avoiding messages during prayer times
- Respecting religious holidays, particularly during Ramadan
- Limiting non-essential messages during weekends (Friday-Saturday)
Phone Numbers Options and SMS Sender Types for Tunisia
Alphanumeric Sender ID
Operator network capability: Fully supported
Registration requirements: Pre-registration required for domestic use, not required for international
Sender ID preservation: Yes, sender IDs are preserved as registered
Provisioning time: Approximately 18 days for domestic registration
Long Codes
Domestic vs. International:
- Domestic long codes not supported
- International long codes fully supported
- International sender IDs are overwritten with generic alphanumeric IDs
Sender ID preservation: No preservation for international long codes
Provisioning time: Immediate for international long codes
Use cases: Ideal for transactional messages and two-factor authentication
Short Codes
Support: Not currently supported in Tunisia
Provisioning time: N/A
Use cases: N/A
Restricted SMS Content, Industries, and Use Cases
Restricted Industries and Content:
- Gambling and betting services
- Adult content or services
- Unauthorized financial services
- Political campaign messages without proper authorization
- Cryptocurrency promotions
- Tobacco and alcohol advertising
Content Filtering
Carrier Filtering Rules:
- Messages containing restricted keywords are automatically blocked
- URLs may trigger additional scrutiny
- High-frequency messaging patterns may be filtered
Best Practices to Avoid Filtering:
- Avoid URL shorteners in messages
- Use clear, professional language
- Maintain consistent sending patterns
- Include clear sender identification
- Avoid excessive punctuation and all-caps text
Best Practices for Sending SMS in Tunisia
Messaging Strategy
- Keep messages under 160 characters when possible
- Include clear call-to-actions
- Personalize messages using recipient's name
- Maintain consistent branding across messages
Sending Frequency and Timing
- Limit marketing messages to 2-4 per month per recipient
- Avoid sending during religious holidays
- Space out messages to prevent recipient fatigue
- Monitor engagement rates to optimize timing
Localization
- Support both Arabic and French languages
- Use local date and time formats
- Consider cultural sensitivities in message content
- Offer language preference selection
Opt-Out Management
- Process opt-outs within 24 hours
- Send opt-out confirmation messages
- Maintain opt-out records for at least 6 months
- Regular audit of opt-out list compliance
Testing and Monitoring
- Test messages across all major carriers
- Monitor delivery rates by carrier
- Track engagement metrics
- Regular A/B testing of message content
- Monitor and analyze failure rates
SMS API integrations for Tunisia
Twilio
Twilio provides a robust SMS API with comprehensive support for Tunisia. Integration requires your Account SID and Auth Token from the Twilio Console.
import { Twilio } from 'twilio';
// Initialize Twilio client
const client = new Twilio(
process.env.TWILIO_ACCOUNT_SID,
process.env.TWILIO_AUTH_TOKEN
);
// Function to send SMS to Tunisia
async function sendSMSToTunisia(
to: string,
message: string,
senderId: string
): Promise<void> {
try {
// Ensure phone number is in E.164 format for Tunisia (+216)
const formattedNumber = to.startsWith('+216') ? to : `+216${to}`;
const response = await client.messages.create({
body: message,
from: senderId, // Alphanumeric sender ID
to: formattedNumber,
});
console.log(`Message sent successfully! SID: ${response.sid}`);
} catch (error) {
console.error('Error sending message:', error);
throw error;
}
}
Sinch
Sinch offers a straightforward REST API for sending SMS to Tunisia, with support for both text and binary messages.
import axios from 'axios';
class SinchSMSService {
private readonly apiToken: string;
private readonly serviceId: string;
private readonly baseUrl: string;
constructor(apiToken: string, serviceId: string) {
this.apiToken = apiToken;
this.serviceId = serviceId;
this.baseUrl = 'https://sms.api.sinch.com/xms/v1';
}
async sendSMS(to: string, message: string): Promise<void> {
try {
const response = await axios.post(
`${this.baseUrl}/${this.serviceId}/batches`,
{
from: 'YourSenderID',
to: [to],
body: message,
},
{
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${this.apiToken}`,
},
}
);
console.log('Message sent:', response.data.id);
} catch (error) {
console.error('Sinch SMS error:', error);
throw error;
}
}
}
MessageBird
MessageBird provides a feature-rich API with strong delivery rates in Tunisia.
import { MessageBird } from 'messagebird';
class MessageBirdService {
private client: MessageBird;
constructor(apiKey: string) {
this.client = new MessageBird(apiKey);
}
async sendSMS(
recipient: string,
message: string,
senderId: string
): Promise<void> {
const params = {
originator: senderId,
recipients: [recipient],
body: message,
reportUrl: 'https://your-webhook-url.com/delivery-reports',
};
return new Promise((resolve, reject) => {
this.client.messages.create(params, (err, response) => {
if (err) {
console.error('MessageBird error:', err);
reject(err);
} else {
console.log('Message sent:', response);
resolve();
}
});
});
}
}
Plivo
Plivo offers reliable SMS delivery to Tunisia with detailed delivery reporting.
import plivo from 'plivo';
class PlivoSMSService {
private client: plivo.Client;
constructor(authId: string, authToken: string) {
this.client = new plivo.Client(authId, authToken);
}
async sendSMS(
to: string,
message: string,
senderId: string
): Promise<void> {
try {
const response = await this.client.messages.create({
src: senderId,
dst: to,
text: message,
url_strip_query_params: false,
});
console.log('Plivo message sent:', response);
} catch (error) {
console.error('Plivo error:', error);
throw error;
}
}
}
API Rate Limits and Throughput
- Default rate limit: 100 messages per second
- Batch processing recommended for volumes over 1000/hour
- Implement exponential backoff for retry logic
- Queue messages during peak times
Error Handling and Reporting
- Implement comprehensive logging for all API responses
- Monitor delivery receipts via webhooks
- Track common error codes:
- 4xx: Client errors (invalid numbers, authentication)
- 5xx: Server errors (retry with backoff)
- Store message metadata for troubleshooting
Recap and Additional Resources
Key Takeaways
-
Compliance Priorities
- Obtain explicit consent
- Respect time zones and cultural considerations
- Maintain proper opt-out mechanisms
-
Technical Considerations
- Use E.164 number formatting
- Implement proper error handling
- Monitor delivery rates
-
Best Practices
- Localize content (Arabic/French)
- Test across all carriers
- Regular monitoring and optimization
Next Steps
- Review INT (Instance Nationale des Télécommunications) regulations
- Consult legal counsel for compliance verification
- Set up test accounts with preferred SMS providers
- Implement monitoring and reporting systems
Additional Resources
Industry Resources:
- Telecommunications Law No. 2001-1 of January 15, 2001
- Digital Economy Guidelines (2020)
- National Digital Transformation Strategy 2025