Webhooks
Webhooks let you receive real-time notifications about import events. Instead of polling /jobs repeatedly, your system can respond instantly when a job finishes or fails.
Configuring Webhooks
- Set a Webhook URL in your Importly dashboard.
- Verify Delivery: We send a POST request to the provided URL when a job completes (or hits an error).
Payload Structure
Example (Import Completion):
json
Example (Import Completion with S3 Storage):
When S3 storage is enabled, the webhook payload includes additional S3 information:
json
Payload Fields
- jobId: Match this with your internal tracking.
- status: Could be completed, failed, etc.
- mediaUrl: Download location (S3 URL if S3 storage is enabled).
- s3Storage: S3 storage information (only present when S3 storage is enabled).- url: Full S3 URL to the uploaded file.
- bucket: S3 bucket name.
- key: S3 object key (path within the bucket).
 
- creditsUsed: The final cost in credits.
Security Recommendations
- Secret Tokens: Configure a secret in your dashboard so each webhook includes a signature header you can verify.
- HTTPS: Serve your webhook handler over TLS.
Handling Retries
If your webhook endpoint returns a non-2xx status or times out, Importly retries up to a certain limit (e.g., 3 attempts, 1-minute intervals). Implement idempotency in your handlers to handle duplicate notifications gracefully.