Triggers

Creates a new notification trigger (webhook) by specifying an event type and a destination

POST
/v1_1/{cloud_name}/triggers

Creates a new trigger. 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.

Authorization

AuthorizationBasic <token>

Basic authentication using Cloudinary API Key and API Secret.

In: header

Path Parameters

cloud_name*string

The cloud name of your product environment.

Request Body

application/json

The webhook notification trigger to create.

uri*string

The URL that will receive the notification response.

Formaturi
event_type*event_type

The type of event that will trigger the notification response.

Value in

  • "all"
  • "access_control_changed"
  • "bulk_refresh_auto_fetch"
  • "create_folder"
  • "delete"
  • "delete_by_token"
  • "delete_folder"
  • "eager"
  • "error"
  • "explode"
  • "generate_archive"
  • "info"
  • "invalidate_custom_cdn"
  • "moderation"
  • "moderation_summary"
  • "move"
  • "move_or_rename_asset_folder"
  • "multi"
  • "publish"
  • "rename"
  • "report"
  • "resource_context_changed"
  • "resource_display_name_changed"
  • "resource_metadata_changed"
  • "resource_tags_changed"
  • "restore_asset_version"
  • "sprite"
  • "upload"

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1_1/my_cloud/triggers" \  -H "Content-Type: application/json" \  -d '{    "uri": "http://example.com",    "event_type": "all"  }'
{  "id": "string",  "product_environment_id": "string",  "uri_type": "webhook",  "uri": "http://example.com",  "event_type": "all",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}