Webhook notifications
Last updated: Dec-02-2026
Cloudinary provides a webhook notification feature for informing your backend about certain actions that have been completed, either via API method call or via user action within the Console UI. When the action is completed, an HTTP POST request is sent to a public notification URL you provide. The payload contains all the results pertinent to that particular action.
You can use webhook notifications to:
- Handle asynchronous calls. By default, Cloudinary's upload API works synchronously. For example, uploaded assets are processed and eager transformations are generated synchronously during an upload API call, which means that the original asset and derived assets are available immediately for delivery and further management. However, in some cases you may need to be notified that an upload has completed, or you may want to process actions asynchronously in the background, especially actions that require a relatively long time to process and require your users to actively wait for the processing to finish.
- Keep aligned when other users in the system make changes. It's important to listen for changes made in your system and update accordingly to make sure there aren't any inconsistencies. You can set up code that listens for notifications, and then uses the data to make automatic updates. For example, you can set up a webhook to receive notifications when assets are renamed, and then trigger a search and replace to update the asset name anywhere it exists.
-
Integrate Cloudinary with other platforms. If you're using Cloudinary assets from within a different platform, listen for changes being made to assets in Cloudinary in order to keep synced. For example, you can set up a structured metadata field to indicate whether assets should be published or unpublished. When you receive a notification within the other platform indicating that this metadata field was changed, trigger the appropriate action in your code.
For more information about how to integrate Cloudinary with another platform, see How to build your own integration.
-
Trigger another operation. If an action must follow a specific event, you can listen for that event and use it to trigger the action. For example, use the notification that an asset has been uploaded to trigger adding the asset to your catalog, or for user-generated content to handle the result of a moderation check, determining if it's safe to display the image or video.
Examples- The Cloudinary Solutions team took advantage of this option to create an open-source library that can learn and then auto-tag faces with names using an AWS Lambda function calling Amazon Rekognition that's triggered by the notification following the upload of a photo to a dedicated 'training' folder in Cloudinary.
- The profile picture sample project demonstrates a UGC use-case showing images moderated on upload and the use of Cloudinary webhooks to check the moderation results.
- The video review sample project demonstrates a UGC use-case showing videos moderated on upload, the generation of eager transformations, and the use of Cloudinary webhooks to wait for the moderation, eager, auto chaptering and auto transcript notifications. The frontend waits for successful notifications before displaying the video.
Global notification URLs
You can set one or more global notification URLs in the Webhook Notifications page of the Console Settings or programmatically using the triggers method of the Admin API.
Once you've set up either a single or multiple notification URL(s), Cloudinary automatically sends responses to the appropriate URL address(es) any time a relevant action in the Console UI is performed or a call to a relevant Cloudinary API method is made.
If you're using a single notification URL, configure it to receive all notifications.
However, adding multiple notification URLs enables you to specify which destination receives notifications for each type of action. This level of control makes is easy to trigger flows or sync multiple parts of your ecosystem when integrating Cloudinary with other platforms. It also allows you to:
- Dedicate a separate notification URL to handle actions relevant to each of your workflows.
- Organize your destinations according to their purpose.
- Spread out the traffic among several endpoints to avoid performance issues.
Tips and considerations for adding multiple notification URLs
- Make sure you assign every notification type that you listen for in your code to at least one notification URL.
- You can optionally set one notification URL to receive all responses as backup.
- Each notification URL can handle several event types, and conversely the responses for a single notification type can be sent to several notification URLs.
Managing global notification URLs
You can manage webhook notifications either from the Webhook Notifications page of the Console or using the triggers method of the Admin API. You can configure up to 10 notification URLs per product environment.
In the Console, each notification URL is linked to all configured Notification Types (triggering events). However, when programmatically managing webhook notifications, you're working with a trigger — a single triggering event paired with a single notification URL. As a result, programmatically creating a trigger reflects in the Console by either generating a new notification URL with a single Notification Type or appending a new Notification Type to an existing URL's list of notifications.
Managing webhook notifications from the Console
To manage multiple notification URLs via the Cloudinary Console, go to the Webhook Notifications Console Settings page.
By default, when you add a new notification URL, the Default - All notifications option is selected as the default type. If you're using a single notification URL, or want to use one of your notification URLs as backup for all events, keep that default behavior.
You can also (or alternatively) add different Notification URLs, and specify the Console UI action and/or API method Notification types you'd like to receive notification about at each URL. You can configure up to 30 notification URLs per product environment.
In addition, you can select the API key for verifying all your notification signatures. For more information, see Dedicated API key for webhook notifications.
notification_type key that's returned in the notification response. Managing webhook notifications programmatically
To manage notification URLs programmatically, use the triggers method of the Admin API. Each trigger denotes a unique event type linked to its notification URL. Your product environment supports triggers up to a maximum determined by multiplying the number of unique event types by the limit of 30 notification URLs.
When an event of the specified type occurs, a response is sent to its corresponding notification URL.
For example, set up the https://mysite.example.com/my_notification_endpoint URL to receive a notification whenever an upload is completed:
- If you want a trigger to receive all notifications, set its
event_typetoall. - The
event_typevalues correspond with thenotification_typekey that's returned in the body of the notification response. For a full list, see Event types. - A dedicated API key for verifying all webhook notifications can be set programmatically via the PUT method of the Provisioning API access key endpoint, available for Enterprise customers upon request.
API method call notifications
When you call certain API methods, a response is sent to the notification URL you configured to listen for that action upon its completion.
For a full list of possible triggering actions see this table.
For some examples of notification responses from these types of actions, see the Notification response examples section.
Console UI notifications
When a user performs any of the following actions in the Console UI, a response will be sent to the notification URL you configured to listen for that action upon its completion.
- Uploading a new asset.
- Renaming the asset's public ID.
- Deleting an asset. Deleting a folder that contains assets will also trigger a delete notification for all individual assets in that folder. Note that deleting empty folders does not send a notification.
- Updating an asset's display name. (Not relevant for product environments using the legacy fixed folder mode.)
- Moving an asset between folders changes the
asset_foldervalue, and triggers a move notification.- In the legacy fixed folder mode, moving an asset to another folder in the Media Library changes the
public_idvalue, and thus triggers a rename notification.
- In the legacy fixed folder mode, moving an asset to another folder in the Media Library changes the
- Adding, removing or updating the contextual metadata for an asset.
- Adding, removing or updating the structured metadata for an asset.
- Adding or removing a tag for an asset.
- Adding or removing related assets relationships.
- Updating the access control setting for an asset.
- Creating a new asset folder.
- Deleting an asset folder.
- Restoring a previous asset version.
- Making a decision that changes the status of the proof during proof review in one of the stages of the creative approval flow.
For a full list of possible triggering actions see this table.
For some examples of notification responses from these types of operations, see the Notification response examples section.
Notification Payload
When an action that triggers a notification is completed, an HTTP POST request will be sent to the notification URL you provided. The post data will contain all the result details for the action that triggered it. The body of this POST request is essentially the same information as you get in response to a standard synchronous request.
Here's an example POST request sent by Cloudinary after an upload completes:
Cloudinary signs all notification responses, allowing you to validate that they weren't sent by a third-party. The notification includes both an X-Cld-Signature header and a X-Cld-Timestamp header for validating the notification response.
Cloudinary doesn't always sign with the API key that made the originating request. The payload's signature_key field names the API key that actually signed the notification, which can differ from api_key; always verify with that key's secret. For more details, see Verifying notification signatures.
For additional examples of notification responses from various API calls, see notification response examples.
Notification URLs for specific API calls
In specific situations, you may want to notify your backend as soon as a method call is complete, for example when dealing with user initiated uploads from a browser or mobile device. You can tell Cloudinary to notify your application as soon as the method is complete by adding the notification_url parameter to the method call and setting it to any valid HTTP or HTTPS URL. You can also set notification_url to a poll:// destination to have your client retrieve the notification instead of receiving it at a webhook URL; see Poll notifications.
The following upload API methods support the notification_url parameter: upload, explicit, explode, generate_archive, and multi.
For example, to add a notification_url to a specific upload call:
Notification URLs and global triggers
Cloudinary always sends a notification POST to the URL you pass in notification_url when the operation completes. What happens to your global webhook triggers (those configured per event via the Admin API triggers method or the Webhook Notifications page in the Console Settings) depends on each trigger's additive parameter:
-
additive:false(the default behavior): Whennotification_urlis present on the Upload API call or upload preset, these triggers do not run for that request. Only the explicitnotification_urlreceives the notification. This preserves the behavior where an ad-hocnotification_urltakes precedence over global triggers for that operation. -
additive:true: These triggers also run whennotification_urlis set, so both destinations receive notifications for the same event.
When notification_url is omitted from the upload call or upload preset, all global triggers for the relevant event type fire notifications.
You can set the additive parameter when you create or update a trigger. You can't set additive in the Console; triggers you create there use the default additive: false unless you change it via the Admin API.
filter expressions to narrow which events trigger a notification by asset characteristics. You can also set a payload_template (Mustache) for custom JSON bodies and an auth_scheme to choose which signature headers are sent. See below and the Admin API triggers reference for syntax.Custom webhook payload templates (payload_template)
In addition to the additive flag and optional JSONLogic filter on a trigger, you can define how the webhook HTTP body is shaped using a Mustache template stored on the trigger.
When payload_template is present, Cloudinary renders that template at send time and posts the rendered JSON as the notification body instead of the default notification payload. When payload_template is omitted or empty, deliveries use the usual notification body unchanged.
Behavior and limits:
-
Mustache placeholders reference namespaced contexts (see the table below), for example
{{event.type}}or{{asset.public_id}}. - Templates are logic-less (no executable code embedded in the template).
- Missing or unavailable placeholders render as an empty string, per standard Mustache behavior.
- On create or update, Cloudinary validates the template (JSON structure and Mustache syntax). Maximum template size is 16 KB.
- If rendering fails when a real notification is sent, Cloudinary falls back to the default notification payload for that delivery.
- A
payload_templaterenders the body from scratch, so the delivered payload won't includesignature_keyunless your template adds it. If you verify signatures, includesignature_keyin your template.
| Namespace | Fields you can reference | Available for |
|---|---|---|
event |
type, timestamp, request_id
|
All notification types |
asset |
id, public_id, resource_type, delivery_type, folder, format, version, width, height, bytes, url, secure_url, tags, context, metadata
|
Asset-related notifications |
folder |
path, name
|
create_folder, delete_folder
|
eager |
transformations, batch_id, status
|
eager |
error |
message, code
|
error |
raw |
Matches the underlying notification payload | All notification types |
Example payload_template object (Mustache placeholders inside JSON string values):
API overview: Create and update trigger requests accept payload_template as a JSON object or as a JSON string that parses to an object. Trigger responses echo payload_template as parsed JSON when it's set. For curl examples and parameter details, see triggers.
Per-trigger webhook signing (auth_scheme)
Each trigger includes an auth_scheme field that controls which signing headers Cloudinary attaches to webhook deliveries for that trigger.
auth_scheme
|
Description | Headers on each webhook POST |
|---|---|---|
default |
Default for all triggers, and also used when a notification_url is passed directly on the request. Always sends the legacy HMAC-SHA1 (or SHA-256, depending on account setting) signature. |
X-Cld-Timestamp, X-Cld-Signature
|
legacy_hmac |
Legacy HMAC-SHA1/SHA-256 only, verified with your API secret. |
X-Cld-Timestamp, X-Cld-Signature
|
Existing triggers keep auth_scheme at default, so existing integrations that expect legacy signing continue to work.
Create and update requests accept auth_scheme as a string (default or legacy_hmac). Invalid values return HTTP 400. Trigger payloads always include auth_scheme in responses so clients can see the active mode.
For how to verify standard HMAC webhook signatures today, see Verifying notification signatures.
auth_scheme as described above.The following trigger includes filter, payload_template, and auth_scheme: legacy_hmac:
Eager transformation notifications
You can instruct Cloudinary to send a separate notification whenever a requested Eager transformation completes by adding the eager_notification_url parameter to the method call and setting it to any valid HTTP or HTTPS webhook URL, or to a poll:// destination to retrieve it instead via Poll notifications. Eager transformations should be set up to work asynchronously in the background after an upload completes by also including the eager_async parameter (for more details, see Eager asynchronous transformations). This eager notification is in addition to any notification sent via the optional notification_url parameter.
The following upload API methods support the eager_notification_url parameter: upload and explicit.
For example, the following method will upload the sample.jpg image and then eagerly generate two transformed images:
- Pad to a width and height of 300 pixels.
- Crop to a width of 160 pixels and a height of 100 pixels.
Furthermore, the transformations will be performed asynchronously after the image finishes uploading, with a callback URL to notify your application once the upload is complete, and a different callback URL to notify your application once the eager transformations are complete:
Notification combinations with eager
The following table shows the results of adding different notification parameters when also requesting eager transformations with and without, the eager_async parameter.
| Parameters | Result |
|---|---|
eager andnotification_url
|
The upload method response and the notification_url are sent after BOTH the upload completes and the eager transformations have finished. |
eager andeager_notification_url
|
The upload method response and the eager_notification_url are sent after BOTH the upload completes and the eager transformations have finished. |
eager andeager_notification_url andeager_async
|
- The upload method response is sent after the upload completes and include a batch_id for tracking the eager job. - eager_notification_url is sent after the eager transformations have finished with a batch_id for tracking. |
eager andnotification_url andeager_notification_url
|
The upload method response and the notification_url are sent after BOTH the upload completes and the eager transformations have finished. The eager notification is ignored. |
eager andnotification_url andeager_notification_url andeager_async
|
- The upload method response and the notification_url are sent after the upload completes and include a batch_id for tracking the eager job.- eager_notification_url is sent after the eager transformations have finished with a batch_id for tracking. |
Eager notification response
When the eager transformations are completed, an HTTP POST request will be sent to the eager notification URL you provided with details about the requested eager transformations including the HTTP and HTTPS URLs for accessing the derived images. For example:
Cloudinary signs all notification responses the same way as described above; see Verifying notification signatures for details, including how to tell which API key signed it.
If the eager transformation isn't generated for some reason then the notification response will include a status: failed and the reason, for example:
Poll notifications
Poll delivery doesn't replace triggers or the notification_url/eager_notification_url parameter, and it doesn't change which events notify you. It only changes how those notifications reach you.
Instead of Cloudinary immediately posting the notification to a public https:// URL, it stores it so your client can retrieve it when ready. Use a poll://<channel> or poll://* destination anywhere you would normally use an https:// URL, on a trigger or on a single request. Your client can then retrieve and acknowledge the notifications by polling or over a WebSocket, without hosting an endpoint.
Why use poll delivery instead of a webhook
- Your client doesn’t have a public endpoint. Webhooks require a URL that Cloudinary can reach over the internet. Poll delivery works well for apps behind a firewall, local development, scripts, CI jobs, and AI agents, without needing to host a public callback URL.
- You need to handle a longer outage. A webhook retries 3 times over about 20 minutes. If your endpoint is still unavailable, the notification is lost. With poll delivery, the notification is buffered for up to 24 hours, giving your client more time to retrieve and acknowledge it.
-
You’re waiting for the result of a specific job. Set your own
batch_idwhen you start the job, then poll for notifications with that ID. You don’t need to host an endpoint or keep a service running while you wait.
async=true and notification_url=poll://*, then polls the batch_id returned by the upload response. When the notification arrives, the agent reads the video's secure_url from it, sets it as the product's video, and acknowledges the message, all without hosting a server or a public URL.You choose the destination type per trigger or per request, so you can use webhooks for some triggers or requests and poll delivery for others.
Turning on poll delivery
Set a poll:// destination instead of an https:// URL, either way:
-
A trigger. Create a trigger with
uri_type: polland auriofpoll://<channel>orpoll://*. A poll trigger rejects anhttp(s)URI, and a webhook trigger rejects apoll://URI. -
A single request. Pass
poll://<channel>orpoll://*as the notification_url or eager_notification_url parameter, in place of anhttps://URL. Both forms accept the same channel names.
poll:// option. Set poll delivery with a trigger or the notification_url/eager_notification_url parameter.The value you set for the poll destination tells your client how to retrieve the notifications later, using Poll for notifications or Subscribe to notifications:
-
poll://<channel>: retrieve notifications withchannel=<channel>. A channel name must match[a-zA-Z0-9_\-./]{1,128}. -
poll://*: retrieve notifications withbatch_id=<batch_id>. This form is supported only for upload methods and Admin API resource methods. Abatch_idmust match[A-Za-z0-9_\-./:]{1,128}. Because*isn’t valid in a channel name, this form can’t be confused with a named channel.
The destination and the retrieval parameter must match. You can’t retrieve notifications from a poll://<channel> destination with batch_id, or notifications from poll://* with channel. Supplying neither or both returns a 400 (NT_00001); a channel or batch_id that doesn't match its required pattern returns a 400 (NT_00007) instead.
A poll://<channel> destination needs no additional setup: choose a channel name, and the client can start polling before the first notification arrives. A poll://* destination requires the batch_id first, so retrieve it as described below before polling.
Where the batch_id comes from
batch_id groups related notifications so your client can retrieve them together from a poll://* destination. You can set it as a request parameter, for example:
-
Synchronous calls: Set your own
batch_id. -
Asynchronous calls: If you don't set a
batch_id, poll thebatch_idreturned in the immediate response to the asynchronous call, for example:
Credentials for poll and WebSocket notifications
Polling and acknowledging notifications support product environment API key credentials, as well as OAuth credentials, just like other Admin API requests. These endpoints require a global product environment API key with the cld::policy::global::webhook_notifications::view or cld::policy::global::webhook_notifications::manage permission. Polling, acknowledging, and subscribing to notifications are read operations on a trigger. Master Admin, Admin, and Tech Admin system roles include the permission required to access these endpoints.
WebSocket subscriptions use a different authentication method. Provide either an OAuth access_token or the signed-request triple (api_key, timestamp, signature) in the query string. This signature authenticates the subscription connection. HTTP Basic authentication isn’t supported for WebSocket connections because the browser WebSocket API doesn’t allow clients to set custom HTTP headers during the handshake.
The poll, process, acknowledge loop
A client polls for notifications, processes each one, and acknowledges it, then polls again. While a notification is unacknowledged, it remains hidden from other poll requests for the length of the visibility_timeout. If the client doesn't acknowledge it before visibility_timeout expires, another poll can claim it and deliver it again, and the acknowledgment for the old receipt_handle then returns stale.
Delivery is at-least-once, and order isn't guaranteed. Expect duplicates in two different ways:
-
Redelivery after a timeout. A message redelivered after its
visibility_timeoutexpires keeps the sametimestamp,signature, andsigned_payloadas the first delivery, but gets a newreceipt_handle. Acknowledge the repeat using that new handle. Acknowledging with the old one won't stop the redelivery. - The same event arriving twice as separate messages. These can have different bytes, not just a repeat of the same message object.
Design your processing to be idempotent regardless of which kind of duplicate you get, as you would with any at-least-once delivery system.
A 200 response from Acknowledge notifications doesn't mean every handle in the request succeeded. Check the status of each entry in the response and retry only the ones marked unavailable.
Nothing marks the last notification in a batch. A client just stops polling once it has retrieved the notifications it's expecting (for example, by batch_id or by count), not because the service signals an end.
A message stays in the buffer, whether or not it's currently claimed, for up to 24 hours after Cloudinary buffered it until it's acknowledged.
wait_seconds=60 until your own deadline, rather than polling once and giving up.Notification acknowledgment statuses
Acknowledging a notification returns a status per receipt_handle:
| Status | Meaning | Worth retrying? |
|---|---|---|
acked |
Acknowledged. | No, it's done. |
expired |
The buffered notification already passed its 24-hour expiry. | No. |
stale |
The receipt_handle is no longer valid (for example, the notification was already redelivered). |
No. |
malformed |
The receipt_handle isn't a value the service issued. |
No. |
forbidden |
The credential doesn't have access to this notification. | No. |
unavailable |
The service couldn't process the acknowledgment at this time. | Yes, retry. |
The WebSocket frame contract
Once a WebSocket subscription is open, the client and server exchange notifications and acknowledgments over the same connection:
- Server → client, when a notification arrives: The same message object returned by Poll for notifications.
-
Client → server, to acknowledge a notification:
{"ack": ["<receipt_handle>", ...]} -
Server → client, with the acknowledgment result:
{"ack_results": [{"receipt_handle": "...", "status": "..."}]}. This is the WebSocket frame key; the REST Acknowledge notifications endpoint returns the same statuses under aresultskey instead. See Notification acknowledgement statuses. -
Server → client, on error:
{"error": "..."} -
Server → client, when an acknowledgment is throttled:
{"error": "rate", "retry_after_seconds": N}
The server closes the connection after 15 minutes without activity and closes all connections after 30 minutes, regardless of activity. Reconnect in either case.
Choosing long-polling or WebSocket
Long-polling, repeated calls to Poll for notifications, works well for scripts, scheduled jobs, and clients that can check periodically without maintaining a persistent connection.
A WebSocket subscription is better for clients that need notifications as soon as they arrive, such as a UI waiting for a result, and can maintain the connection and reconnect when it closes.
Errors
Failed poll and acknowledge requests, and failed attempts to open a WebSocket subscription, return an error response in this format:
Errors that occur after a WebSocket connection is open are sent as WebSocket error frames instead.
| Code | Status | Meaning |
|---|---|---|
NT_00001 |
400 | Supply exactly one of channel or batch_id; this code is returned only when neither or both are supplied. |
NT_00002 |
400 |
visibility_timeout must be a positive number of seconds. |
NT_00003 |
400 | Too many receipt handles in one request. |
NT_00004 |
400 | The request body could not be parsed. |
NT_00007 |
400 | A request field is missing or invalid, for example a channel or batch_id that doesn't match its required pattern (details.field names the invalid field), or details.reason is "Stale request" for a signed request whose timestamp is too old. Sign again with a fresh timestamp and retry. |
NT_00101 |
401 | Authentication failed. |
NT_00102 |
403 | The credential does not grant access to this product environment. |
NT_00103 |
403 | The credential may not make this request. |
NT_00201 |
429 | Rate limit exceeded. Wait the Retry-After seconds, then retry. |
NT_00301 |
503 | The service cannot handle the request at this time. Wait and retry. |
A plain 420 response (no JSON body) means too many polls or subscriptions are already open for the cloud; retry with backoff. 503 and other 5xx except 501 are also worth retrying with backoff. Don't retry other 4xx responses or 501. Fix the request instead.
A 429 response includes a Retry-After header and a limits array. Each entry describes a limit that applies to the request:
type is credential, customer, or fleet, depending on which limit the request hit. The numeric limit, remaining, and reset_time values depend on your plan and aren't fixed, so read them from the response rather than assuming a number.
Verifying poll and WebSocket message signatures
Poll and WebSocket messages carry the same signed bytes and signatures as webhook notifications: a signed_payload, a timestamp, and a signature. They use these fields instead of the X-Cld-Signature and X-Cld-Timestamp headers included with webhook notifications. Check that the signature you expect to verify is actually present before verifying it.
Use the Python SDK's verify_notification helper (SDK version 1.46.0 or later), which takes the complete message object and decodes signed_payload correctly. Always verify the original signed_payload the helper decodes, never the parsed or re-serialized payload field, since re-serializing it can change the bytes and break verification.
If verification fails, check these in order:
-
Wrong API secret. The key Cloudinary signs with can differ from the key you called the API with. The payload's own
signature_keyfield identifies which key was used; always verify with the secret of that key.verify_notificationdoesn't take a secret argument: it always uses theapi_secretcurrently set in the SDK's config. Ifsignature_keynames a different key than the one your SDK is configured with, configure that key's secret before verifying: -
SHA-256 instead of SHA-1. The helper defaults to SHA-1. If your account uses SHA-256, pass
algorithm="sha256": -
An older buffered message.
verify_notification'svalid_forparameter defaults to 7200 seconds (2 hours), but a poll or WebSocket message can stay buffered for up to 24 hours before your client retrieves it. Pass a largervalid_for(up to 25 hours, in seconds) when verifying an older polled or WebSocket message, or verification fails even though the signature itself is valid:
See also Verifying notification signatures.
Notification response examples
This section provides several examples of notification responses to a variety of different API calls or Media Library operations. Keep in mind that this list is not comprehensive, and that the exact content of the response will depend on the options sent with the relevant API call or the exact operation performed in the Media Library.
notification_context with information on the time the original request was triggered and the source of that request - either an email address for a UI initiated request, or the api_key of an API method call.Tags
Context
Metadata
No previous metadata
With previous metadata
Rename
(Change the public ID)
Change display name
Not supported for product environments using the legacy fixed folder mode.
Create asset folder
Move between asset folders
Not supported for product environments using the legacy fixed folder mode.
Move an asset folder
Not supported for product environments using the legacy fixed folder mode.
Delete an asset
Delete an asset folder
Not supported for product environments using the legacy fixed folder mode.
Multi generation
Proof status changed
When the status of a creative approval proof reaches a decision (for example, when a proof is approved or requires changes), a notification is sent with details about the proof and its new status.
Explode
When you include a notification_url, Cloudinary sends a single notification_type: "explode" notification when all derived assets have been generated, rather than one notification per derived asset.
Upload (simple)
Upload (complex)
Access control
Related assets
Add related assets
asset_id is the primary asset to which you added or removed relationships. The webhook notification payload doesn't include the full list of related assets. To retrieve the full list of related assets, use either:
- The response from the original Add related assets by public ID or Add related assets by asset ID API call that triggered the notification
- The Get details of a single resource by public ID or Get details of a single resource by asset ID endpoints with the
relatedparameter set totrue
Delete related assets
Image inserted from Media Library widget
asset_folder and display_name keys are also not included in the response, and the folder key is.Retry policy
In the event of a failed notification URL, the HTTP response code is assessed. If the response is not 200 OK, three additional notification attempts are initiated:
- A retry after 3 minutes.
- A second attempt after 6 minutes.
- A final retry after 9 minutes.
Troubleshooting
Understanding how to troubleshoot notification failures and identify why notifications may not reach their destination URL is essential for seamless operation. Here, we explore common failure causes and ways to avoid potential pitfalls when working with Cloudinary webhook notifications.
Common causes of failure
Payload corruption: Payload validation in webhook notifications checks if the data meets expected formatting and matches system requirements. Failure may signal data corruption issues that affect processing.
Invalid signature: Verification of the signature may fail, resulting in webhook failures.
Disabled API key: Using a disabled API key for signing the API can impact webhook functionality. To activate your API keys, go to the API Keys page of your Console Settings.
Invalid Webhook URL: A webhook was configured with an incorrect or inaccessible notification URL. For example, you may have configured an endpoint that no longer exists, or changes in the URL path may not be updated in the configuration.
Connection Timeout: Timeout errors may occur if your server experiences delays exceeding our 20-second limit. Retries happen for transient issues, but consistent server slowness may lead to notification failures.
Ways to avoid potential pitfalls
While setting up and maintaining your webhooks, keep the following potential pitfalls in mind:
Check the signature calculation: Make sure your signature calculation is accurate. This is crucial for webhook success.
Ensure JSON payload is stringified correctly: JSON payload stringifying can encounter problems like data loss, invalid JSON, and character encoding mismatches. These issues can be avoided by using standard libraries, validating JSON data, and handling special characters correctly.
Standardize hash methods: When different cloud platforms use different methods for securing webhook data, it can cause signature mismatches, leading to webhook failure. Avoid this by standardizing the hash algorithm or implementing flexible signature verification.
Avoid notification overload: Ensure your server can handle the volume of notifications, especially when there are numerous uploads.
Follow HTTP header specifications: Ensure HTTP headers are treated as case-insensitive according to the HTTP V2 specification.
Monitor endpoint logs: Regularly check endpoint logs for
500errors to identify issues with processing Cloudinary notifications.
