Webhooks
Configure webhook URL for task notifications and status updates.
Endpoint
POST https://data.reviewdata.ai/webhooks/create-webhook/
Description
Sets or updates the webhook URL for authenticated users. The webhook will receive notifications about task processing events and status updates. This allows you to receive real-time notifications instead of polling the API for status updates.
Try It Out
Test this endpoint directly in your browser:
Configure Webhook
POST
Test this endpoint directly in your browser. Enter your API key and modify the request body as needed.
Request Body
Schema
{
"api_key": "string",
"webhook": "string"
}
Required Fields
Field | Type | Required | Description |
---|---|---|---|
api_key | string | Yes | API key for authentication |
webhook | string | Yes | Webhook URL to receive notifications |
Field Details
- api_key: Your API key for authentication (max length: 128 characters)
- webhook: Valid URL where notifications will be sent (must be a valid URI format)
Example Requests
Basic Webhook Configuration
{
"api_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"webhook": "https://example.com/webhook"
}
Webhook with Custom Path
{
"api_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"webhook": "https://api.myapp.com/webhooks/review-updates"
}
Webhook with Query Parameters
{
"api_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"webhook": "https://example.com/webhook?source=review-api&version=v1"
}
Response
Success Response (201)
{
"webhook": "https://example.com/webhook",
"status": "success"
}
Error Response (400)
{
"error": "Invalid payload",
"details": {
"webhook": ["Enter a valid URL."]
}
}
Error Response (401)
{
"error": "Invalid API key",
"details": {
"api_key": ["The provided API key is invalid or expired"]
}
}
Error Response (500)
{
"error": "Database error: Connection failed"
}
Webhook Notifications
When configured, your webhook URL will receive POST requests with the following payload structure:
Task Notification
{
"task_id": "90j2m08rNwG5m3dL",
"publisher_key": "maps.google.com",
"foreign_key": "TEST1234567892",
"profile_key": "https://www.google.com/maps/place/Business-Name/...",
"task_status": 200,
"reviews_urls": [
"https://sau-plus-one-reviews.s3.us-west-2.amazonaws.com/90j2m08rNwG5m3dL.jl"
]
}
Webhook Headers
Each webhook notification includes the following headers:
Header | Value | Description |
---|---|---|
Content-Type | application/json | Payload format |
User-Agent | ShoutAboutUs-Webhook/1.0 | API identifier |
X-Webhook-Signature | sha256=... | HMAC signature for verification |
X-Webhook-Timestamp | 1640995200 | Unix timestamp |
Testing Webhooks
You can test your webhook endpoint using tools like:
- ngrok: For local development testing
- webhook.site: For temporary webhook testing
- Postman: For manual testing
Next Steps
- Learn about Data Models for detailed schema information
- Check Examples for webhook implementation examples
- Explore Error Codes for troubleshooting