API Documentation

Use these webhook endpoints to automate review requests from any HTTP client.

POST/api/webhooks/review-request

Send Review Request

Sends a Google review request email to a customer. Use this endpoint to ask customers for a review after any interaction.

Authentication

Pass your Sherli API key using one of three methods (checked in this order): the X-API-Key header, the Authorization header, or the api_key query parameter.

X-API-Key: YOUR_API_KEY
# or
Authorization: YOUR_API_KEY
# or
?api_key=YOUR_API_KEY

Request Body

FieldTypeRequiredDescription
emailstringrequiredCustomer's email address.
full_namestringrequiredCustomer's full name.

Example Request

# Using X-API-Key header
curl -X POST https://admin.sherli.com/api/webhooks/review-request \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"email": "customer@example.com", "full_name": "Jane Doe"}'

# Using Authorization header
curl -X POST https://admin.sherli.com/api/webhooks/review-request \
  -H "Content-Type: application/json" \
  -H "Authorization: YOUR_API_KEY" \
  -d '{"email": "customer@example.com", "full_name": "Jane Doe"}'

# Using query parameter
curl -X POST "https://admin.sherli.com/api/webhooks/review-request?api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email": "customer@example.com", "full_name": "Jane Doe"}'

Responses

200OK
Review request email sent successfully.
{
  "success": true,
  "message": "Review request email sent successfully",
  "email": "customer@example.com",
  "business": "Your Business Name",
  "review_link": "https://search.google.com/local/writereview?placeid=..."
}
400Bad Request
Missing or invalid request body.
{ "success": false, "error": "email is required" }
401Unauthorized
API key is missing or invalid.
{ "success": false, "error": "Invalid or missing API key" }
422Unprocessable Entity
Business missing Google Place ID.
{ "success": false, "error": "Business is not fully configured to receive review requests" }
500Server Error
Failed to send the email.
{ "success": false, "error": "Failed to send review request email" }