Webhooks
Webhooks are automated messages sent from WeTransform to your application when something happens. Instead of polling our API for updates, we "push" the data to you in real-time.
What is a Webhook?
Think of it as a Reverse API. You provide us with a URL, and we send an HTTP POST request to that URL whenever a specific event occurs (like a file being ready for download).
Use Cases
Automated Schedules
Schedule transformations to run daily. Your system receives the fresh, transformed file automatically via webhook as soon as it's ready.
API-Driven Workflows
Trigger a transformation via our REST API and use a webhook to get notified the exact second the processing is finished.
Event: file:ready-for-download
This is the primary event triggered when a file transformation process is completed and the result is available.
Payload Example
{
"event": "file:ready-for-download",
"download_url": "https://wetransform.com/download/qxyQYK...",
"customer_id": "65bd6fc9130674ad",
"customer_email": "email@example.com",
"template": "products_sync"
}
Setup & Testing
Registering a webhook is simple through the WeTransform dashboard.
1. Create a Webhook
Go to Integrations → Webhooks and click Create a Webhook.
- Callback URL: The endpoint on your server that will receive the
POSTrequest. - Secret Key: A string used to sign the payload (for security).
- Events: Select
file:ready-for-download.
2. Test Your Endpoint
On the same page, you can send a Test Trigger. This sends a sample payload to your URL to verify that your server is responding correctly with a 2XX status code.
Security
To ensure the requests come from WeTransform, we include an X-Signature header in every request.
Implementation (PHP)
$secret = 'your_secret_key';
$body = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_SIGNATURE'];
$expected = hash_hmac('sha256', $body, $secret);
if (hash_equals($expected, $signature)) {
// Valid request
return new Response('', 200);
}
Debugging
Integration can sometimes be tricky. We provide full visibility into every delivery attempt.
Webhook Logs
Our logs show exactly what we sent and what your server responded with. You can see the full HTTP exchange, including headers and body.
- See failed attempts and error codes (404, 500, etc.)
- Track delivery time and response latency.
- Replay any event with a single click.