API Documentation
Integrate Mteja Sauti into your systems with our REST API. Automate surveys, retrieve analytics, and build custom workflows.
Quick Start
# Create a survey and trigger via SMS
curl -X POST https://api.mtejasauti.co.tz/v1/surveys \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Post-Transaction CSAT",
"type": "csat",
"questions": [{
"text": "How satisfied are you with the service?",
"type": "rating",
"scale": 5
}],
"channel": "sms",
"recipients": ["+255712345678"]
}'API Capabilities
RESTful API
Clean, predictable REST endpoints with JSON responses. Comprehensive SDK support for Python, Node.js, and PHP.
Multi-Channel Delivery
Programmatically trigger surveys via SMS, USSD, WhatsApp, email, or web. One API, eight channels.
Analytics Endpoints
Retrieve NPS, CSAT, and CES scores, trends, and AI-powered text analysis results via API.
Webhooks
Real-time notifications for survey responses, score changes, and system events. Configurable retry logic.
Authentication
API key authentication with scoped permissions. OAuth 2.0 support for Enterprise customers.
Key Endpoints
/v1/surveysCreate a new survey with questions and distribution settings
/v1/surveys/{id}Retrieve survey details, status, and configuration
/v1/surveys/{id}/distributeTrigger survey distribution via SMS, USSD, WhatsApp, or email
/v1/surveys/{id}/responsesFetch survey responses with pagination and filtering
/v1/analytics/npsGet NPS scores with breakdown by time period and segment
/v1/analytics/csatGet CSAT scores with trend data and touchpoint analysis
/v1/webhooksRegister a webhook endpoint for real-time event notifications
/v1/templatesList available industry-specific survey templates
Full API Reference
Complete documentation with request/response examples, error codes, and SDK quickstarts.
Request API Access