Overview
This document describes how RevSure supports receiving data from webhooks and writing data to webhooks for data enrichment and integration. RevSure provides webhook-based integration capabilities that enable seamless data exchange with external partners and services.
What Data Is Sent to Webhooks?
Outbound Webhook (RevSure → External Partner)
When RevSure sends enrichment requests to an external partner's webhook endpoint, the following data structure is used:
Required Fields
- tenant_id (string, required): RevSure tenant identifier
- input_email (string, required): Email address to enrich
Example Outbound Webhook Payload
{
"tenant_id": "tenant-uuid-12345",
"input_email": "user@example.com"
}
External Partner Webhook Endpoint
Method: POST
Headers:
Content-Type: application/json
Timeout: 30 seconds
Retry Configuration:
- Max retries: 3
- Retry delay: 2 seconds (exponential backoff)
- Rate limit delay: 1 second between requests
Note: The specific webhook URL is configured per partner integration.
What Data Can Be Posted in a Webhook?
Inbound Webhook (External Partner → RevSure)
When an external partner sends enrichment results to RevSure's webhook endpoint, the following data structure is expected:
Required Fields
- input_email (string, required): The email address that was originally sent for enrichment
Optional Fields
- linkedin_url (string, optional): LinkedIn profile URL of the contact
- name (string, optional): Full name of the contact
- company_domain (string, optional): Company domain associated with the contact
- work_email (string, optional): Work email address of the contact
- phone_number (string, optional): Phone number in E.164 format (e.g., +1234567890)
Example Inbound Webhook Payload
{
"input_email": "user@example.com",
"work_email": "user@company.com",
"phone_number": "+1234567890",
"linkedin_url": "https://linkedin.com/in/user",
"name": "John Doe",
"company_domain": "company.com"
}
RevSure Webhook Endpoint
Endpoint URL: <https://{region}-{project-id}.cloudfunctions.net/{webhook-name}>
Method: POST
Content-Type: application/json
Response:
{
"status": "success",
"message": "Enrichment data received and processed",
"input_email": "user@example.com",
"message_id": "pubsub-message-id"
}
Note: The specific webhook endpoint URL is provisioned per partner integration.
Architecture & Data Flow
High-Level Flow
1. Input Data (GCS)
↓
2. Airflow DAG Processing
↓
3. Send data to external partner webhook (outbound)
↓
4. External partner processes and enriches
↓
5. External partner sends results to RevSure webhook (inbound)
↓
6. Cloud Function receives webhook
↓
7. PubSub message published
↓
8. Airflow DAG processes results
↓
9. Stored in BigQuery and GCS