API Documentation

The SnapReply REST API lets you generate AI-powered reply drafts programmatically. Integrate into your CRM, review management platform, or automate your workflows.

Overview

Base URL

https://api.snapreply.app/api/v1

Format

application/json

Version

v1

Authentication

All API requests require authentication using a Bearer token. Find your API key in the dashboard settings.

http
Authorization: Bearer sr_your_api_key_here

Keep your API key secret. Never expose it in client-side code or public repositories.

Generate Reply

POST/api/v1/reply

Generate 3 AI-powered reply variations for a customer review. The response includes sentiment analysis and escalation detection.

Request Body

FieldTypeRequiredDescription
reviewstringYesThe customer review text (max 5000 chars)
tonestringNoformal | casual | friendly | empathetic (defaults to account setting)
brand_contextstringNoAdditional context for this specific reply

Example Request

bash
curl -X POST https://api.snapreply.app/api/v1/reply \
  -H "Authorization: Bearer sr_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "review": "The food was great but service was slow. Will come back!",
    "tone": "friendly",
    "brand_context": "We are a family-owned Italian restaurant."
  }'

Response

json
{
  "replies": [
    "Thank you so much for your kind words about our food! We sincerely apologize for the wait — we're working hard to improve our service speed. We can't wait to welcome you back!",
    "We're thrilled you enjoyed the meal! You're absolutely right that we need to improve our service times, and we're actively addressing this. Hope to see you again soon!",
    "Thanks for the honest feedback! Great to hear the food hit the mark. We're committed to speeding up our service — your patience means a lot to us. See you next time!"
  ],
  "sentiment": "positive",
  "escalation_needed": false
}

Response Fields

FieldTypeDescription
repliesstring[]Array of 3 reply variations
sentimentstringpositive | neutral | negative
escalation_neededbooleantrue if review requires management attention

Get History

GET/api/v1/history

Retrieve your 50 most recent reply generations. Authentication via session cookie (dashboard) or Bearer token.

bash
curl https://api.snapreply.app/api/v1/history \
  -H "Authorization: Bearer sr_your_api_key_here"
json
{
  "generations": [
    {
      "id": "uuid",
      "review_text": "Great service!",
      "tone": "friendly",
      "replies": ["Reply 1", "Reply 2", "Reply 3"],
      "sentiment": "positive",
      "escalation_needed": false,
      "created_at": "2025-01-01T00:00:00.000Z"
    }
  ]
}

Update Settings

POST/api/v1/settings

Update brand settings programmatically. Requires session authentication (not API key).

json
// Request body
{
  "brand_name": "Sakura Ramen",
  "default_tone": "friendly",
  "business_type": "Restaurant",
  "ng_words": ["cheap", "bad"]
}

// Response
{
  "success": true
}

Error Handling

The API uses standard HTTP status codes. All errors return a JSON body with an error field.

StatusMeaning
200Success
400Bad Request — missing or invalid parameters
401Unauthorized — invalid or missing API key
429Too Many Requests — monthly limit reached
500Internal Server Error — please retry
json
// Error response example
{
  "error": "Monthly usage limit reached. Upgrade to Pro for unlimited replies.",
  "upgrade_url": "https://snapreply.app/#pricing"
}

MCP Server

Coming Soon: SnapReply MCP Server

Use SnapReply directly in Cursor, Windsurf, and other MCP-compatible AI tools. The MCP server exposes reply generation as a tool that AI assistants can call natively.

bash
# Install via npm (coming soon)
npm install -g @snapreply/mcp-server

# Configure in your MCP client
# Example: config.json
{
  "mcpServers": {
    "snapreply": {
      "command": "snapreply-mcp",
      "env": {
        "SNAPREPLY_API_KEY": "sr_your_key_here"
      }
    }
  }
}

Star the repo and get notified when the MCP server launches.