ReputaFlow API Documentation

Create testimonial conversations programmatically

Authentication

Generate an API key from your dashboard: Settings → API Keys

Authorization: Bearer rp_live_abc123...

Integration Methods

ReputaFlow offers three flexible ways to trigger testimonial collection:

⚡ Zapier Integration

No code required, 5-minute setup. Works with 5,000+ apps.

View Zapier Guide →

🔧 Direct API

Full control for developers. Custom integrations.

View API Docs →

📧 Email BCC

Simplest method. BCC your magic email on delivery emails.

Get Magic Email →

Webhook Trigger Endpoint

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_ID

Authentication

Include your API key in the request headers:

Authorization: Bearer YOUR_API_KEY
# OR
X-API-Key: YOUR_API_KEY

Request Body

Required Fields:

  • customer_email (string) - Valid email address

Optional Fields:

  • customer_name (string) - Customer's full name
  • amount (number/string) - Payment amount (for payment events)
  • currency (string) - Currency code (e.g., "USD")
  • project_description (string) - Project/service description
  • service (string) - Service type
  • delay_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"
}

Response

{
  "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"
}

Example: cURL

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.

Create Conversation (Legacy API)

Note: This is the legacy API endpoint. For new integrations, we recommend using the webhook trigger endpoint above.

POST /api/v1/conversations

Request Body

{
  "customer": {
    "email": "sarah@example.com",
    "name": "Sarah Chen"
  },
  "context": "Website redesign project for ABC Corp"
}

Response

{
  "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"
}

SMS Trigger API

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/trigger

Note: SMS conversations require SMS credits. Each outgoing SMS consumes 1 credit. Minimum 3 credits required to start a conversation.

Authentication

Use your API key in the X-API-Key header:

X-API-Key: rp_live_abc123...

Request Body

{
  "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)
}

Response

{
  "success": true,
  "conversation_id": "conv_abc123",
  "message": "SMS conversation started" | "SMS conversation scheduled",
  "scheduled_at": "2025-01-15T10:30:00Z"
}

Example: cURL

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
  }'

Example: Node.js

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);

Example: Python

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']}")

Requirements

  • Phone number must be in E.164 format (e.g., +254712345678)
  • Minimum 3 SMS credits required in your account
  • Valid API key (get from Settings → API Keys)
  • Delay must be between 0-60 minutes

How It Works

  1. You call the API after a service completes
  2. System creates an SMS conversation and schedules the first question
  3. First SMS is sent after the delay (or immediately if delay ≤ 1 minute)
  4. Customer replies via SMS
  5. System processes responses and sends up to 4 short questions
  6. Conversation appears in your dashboard when complete

Supported Countries

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.

Rate Limits

PlanHourly LimitMonthly Quota
Free10 requests5 conversations
PRO500 requestsUnlimited

Examples

cURL

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"
  }'

Node.js

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);

Python

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']}")

Error Handling

All errors return JSON with this format:

{
  "error": {
    "code": "invalid_request",
    "message": "Customer email is invalid",
    "details": {
      "field": "customer.email"
    }
  }
}

Error Codes

CodeHTTP StatusDescription
invalid_request400Request validation failed
authentication_failed401Invalid API key
quota_exceeded403Monthly limit reached
rate_limit_exceeded429Too many requests
internal_error500Server error

Support

Questions about the API? Email us at admin@reputaflow.com