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",
"customer_id": "65bd6fc9130674ad",
"customer_email": "email@example.com",
"template_handle": "products_sync",
"submission_id": "0c6f2b1e-...",
"download_url": "https://api.wetransform.com/download/qxyQYK..."
}
Setup & Testing
A webhook is one of the delivery destinations (exporters) of a template.
1. Add a Webhook exporter
In Templates, open your template's menu → Exporters → Add a new exporter → Webhook.
- Callback URL: The endpoint on your server that will receive the
POSTrequest. It must answer with a2XXstatus code. - Signature secret: A string used to sign the payload (see Security below).
2. Test Your Endpoint
In the exporter form, click Test connection to check that your server answers 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 Events
Each Webhook exporter keeps the history of its deliveries: what we sent and what your server responded with, including headers and body.
- See failed attempts and error codes (404, 500, etc.)
- Track delivery time and response latency.