Pre and Post Transformation webhook events
Listen to webhooks events for pre & post transformations using ImageKit API.
Webhook Support for Pre & Post Transformations
Use webhook to get updates about pre & post transformations. You can use these events to confirm the success of a pre or post transformation on assets.
Before receiving pre & post transformation related events, you need to configure webhooks in your ImageKit account.
Pre Transformation Events
upload.pre-transform.success
upload.pre-transform.error
upload.pre-transform.success
This event is triggered when a pre-transform happens successfully.
Example payload looks like below:
Here is the description of all fields.
Field | Description |
---|---|
type | Type of event. |
id | Unique identifier of the event. |
createdAt | Timestamp of the event in ISO8601 format. |
request.x_request_id | A unique request id to identify request. |
request.transformation | The requested transformation as a string. |
data | Same as the Upload API response. Refer Upload File API for the payload structure. |
upload.pre-transform.error
Triggered if an error occurs during the pre-transformation. If the reason seems like an error on the ImageKit side, then raise a support ticket at support@imagekit.io.
Example payload looks like below:
Here is the description of all fields.
Field | Description |
---|---|
type | Type of event. |
id | Unique identifier of the event. |
createdAt | Timestamp of the event in ISO8601 format. |
request.x_request_id | A unique request id to identify request. |
request.transformation | The requested transformation as a string. |
data.name | Name of the file. |
data.path | Path of the file. |
data.transformation.error.reason | Reason for the post transformation failing. |
Post Transformation Events
upload.post-transform.success
upload.post-transform.error
upload.post-transform.success
This event is triggered when a post-transform happens successfully. Note that each post-transformation will have it's separate webhook sent.
Example payload looks like below:
Here is the description of all fields.
Field | Description |
---|---|
type | Type of event. |
id | Unique identifier of the event. |
createdAt | Timestamp of the event in ISO8601 format. |
request.x_request_id | A unique request id to identify request. |
request.transformation.type | Type of the requested post-transformation. Can be |
request.transformation.value | Value for the requested type of transformation. |
request.transformation.protocol | Only applicable if |
data.fileId | Unique ID of the originally saved file. |
data.url | URL of the requested post transformation. |
data.name | Name of the file. |
upload.post-transform.error
Triggered if an error occurs during the pre-transformation. If the reason seems like an error on the ImageKit side, then raise a support ticket at support@imagekit.io.
Example payload looks like below:
Here is the description of all fields.
Field | Description |
---|---|
type | Type of event. |
id | Unique identifier of the event. |
createdAt | Timestamp of the event in ISO8601 format. |
request.x_request_id | A unique request id to identify request. |
request.transformation.type | Type of the requested post-transformation. Can be |
request.transformation.value | Value for the requested type of transformation. |
request.transformation.protocol | Only applicable if |
data.fileId | Unique ID of the originally saved file. |
data.url | URL of the requested post transformation. |
data.name | Name of the file. |
data.path | Path of the file. |
data.transformation.error.reason | Reason for the post transformation failing. |
Last updated