Create testimonial conversations programmatically
Generate an API key from your dashboard: Settings → API Keys
ReputaFlow offers three flexible ways to trigger testimonial collection:
Universal endpoint for triggering testimonial collection from payments, business events, or any custom trigger. Works with Zapier, direct API calls, or any webhook system.
POST https://www.reputaflow.com/api/webhooks/trigger?agentId=YOUR_AGENT_IDInclude your API key in the request headers:
Authorization: Bearer YOUR_API_KEY # OR X-API-Key: YOUR_API_KEY
Required Fields:
customer_email (string) - Valid email addressOptional Fields:
customer_name (string) - Customer's full nameamount (number/string) - Payment amount (for payment events)currency (string) - Currency code (e.g., "USD")project_description (string) - Project/service descriptionservice (string) - Service typedelay_hours (number/string) - Hours to wait (0-168, default: 0)zap_source (string) - Set to "zapier" for tracking{
"customer_email": "customer@example.com",
"customer_name": "John Doe",
"amount": 100.50,
"currency": "USD",
"project_description": "Website Redesign",
"service": "Web Development",
"delay_hours": 24,
"zap_source": "zapier"
}{
"success": true,
"conversation_id": "conv_abc123",
"status": "scheduled",
"message": "Testimonial request scheduled for 2024-01-15T10:30:00Z",
"scheduled_at": "2024-01-15T10:30:00Z"
}curl -X POST "https://www.reputaflow.com/api/webhooks/trigger?agentId=YOUR_AGENT_ID" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer_email": "customer@example.com",
"customer_name": "John Doe",
"amount": 100.50,
"currency": "USD",
"project_description": "Website Redesign",
"delay_hours": 24
}'💡 Tip: For Zapier integration, use "Webhooks by Zapier" → "POST" action. See our Zapier guide for step-by-step instructions.
Note: This is the legacy API endpoint. For new integrations, we recommend using the webhook trigger endpoint above.
POST /api/v1/conversations{
"customer": {
"email": "sarah@example.com",
"name": "Sarah Chen"
},
"context": "Website redesign project for ABC Corp"
}{
"id": "conv_abc123",
"status": "scheduled",
"customer": {
"email": "sarah@example.com",
"name": "Sarah Chen"
},
"chat_url": "https://chat.reputaflow.com/c/abc123",
"scheduled_at": "2025-11-03T10:00:00Z",
"created_at": "2025-11-02T09:00:00Z"
}Trigger SMS testimonial conversations for customers in emerging markets. Perfect for feature phone users who don't have reliable email access.
POST https://www.reputaflow.com/api/sms/triggerNote: SMS conversations require SMS credits. Each outgoing SMS consumes 1 credit. Minimum 3 credits required to start a conversation.
Use your API key in the X-API-Key header:
X-API-Key: rp_live_abc123...
{
"phone": "+254712345678", // Required: E.164 format (must start with +)
"customer_name": "John Kamau", // Required
"service_description": "haircut", // Optional: context about the service
"delay_minutes": 5 // Optional: 0-60 minutes (default: 5)
}{
"success": true,
"conversation_id": "conv_abc123",
"message": "SMS conversation started" | "SMS conversation scheduled",
"scheduled_at": "2025-01-15T10:30:00Z"
}curl -X POST https://www.reputaflow.com/api/sms/trigger \
-H "X-API-Key: rp_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"phone": "+254712345678",
"customer_name": "John Kamau",
"service_description": "haircut",
"delay_minutes": 5
}'const response = await fetch('https://www.reputaflow.com/api/sms/trigger', {
method: 'POST',
headers: {
'X-API-Key': process.env.REPUTAFLOW_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
phone: '+254712345678',
customer_name: 'John Kamau',
service_description: 'haircut',
delay_minutes: 5
})
});
const data = await response.json();
console.log('Conversation ID:', data.conversation_id);import requests
import os
response = requests.post(
'https://www.reputaflow.com/api/sms/trigger',
headers={
'X-API-Key': os.getenv('REPUTAFLOW_API_KEY'),
'Content-Type': 'application/json'
},
json={
'phone': '+254712345678',
'customer_name': 'John Kamau',
'service_description': 'haircut',
'delay_minutes': 5
}
)
data = response.json()
print(f"Conversation ID: {data['conversation_id']}")+254712345678)SMS delivery is optimized for emerging markets via Africa's Talking (40+ African countries) and Twilio (global fallback).
View supported countries and manage SMS credits in your SMS Dashboard.
| Plan | Hourly Limit | Monthly Quota |
|---|---|---|
| Free | 10 requests | 5 conversations |
| PRO | 500 requests | Unlimited |
curl -X POST https://api.reputaflow.com/v1/conversations \
-H "Authorization: Bearer rp_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"customer": {
"email": "sarah@example.com",
"name": "Sarah Chen"
},
"context": "Website redesign project"
}'const response = await fetch('https://api.reputaflow.com/v1/conversations', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.REPUTAFLOW_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
customer: {
email: 'sarah@example.com',
name: 'Sarah Chen'
},
context: 'Website redesign project'
})
});
const data = await response.json();
console.log('Conversation ID:', data.id);import requests
import os
response = requests.post(
'https://api.reputaflow.com/v1/conversations',
headers={
'Authorization': f'Bearer {os.getenv("REPUTAFLOW_API_KEY")}',
'Content-Type': 'application/json'
},
json={
'customer': {
'email': 'sarah@example.com',
'name': 'Sarah Chen'
},
'context': 'Website redesign project'
}
)
data = response.json()
print(f"Conversation ID: {data['id']}")All errors return JSON with this format:
{
"error": {
"code": "invalid_request",
"message": "Customer email is invalid",
"details": {
"field": "customer.email"
}
}
}| Code | HTTP Status | Description |
|---|---|---|
| invalid_request | 400 | Request validation failed |
| authentication_failed | 401 | Invalid API key |
| quota_exceeded | 403 | Monthly limit reached |
| rate_limit_exceeded | 429 | Too many requests |
| internal_error | 500 | Server error |
Questions about the API? Email us at admin@reputaflow.com