What's the webhook structure?

Uploadcare can send a webhook upon file uploaded. Unfortunately I am unable to find how the payload is structured. Is the assumption that the payload is exactly the same as what GET /files/{uuid} returns?

Hi @Picto, below is an example of the payload

{
  "hook": {
    "id": 1283756,
    "project_id": 42797,
    "project_pub_key": "...",
    "target": "https://webhook.site/22e5029a-8aa0-4284-9d7a-74ef4f6df402",
    "event": "file.uploaded",
    "is_active": true,
    "version": "0.7",
    "created_at": "2022-09-27T15:26:04.789882Z",
    "updated_at": "2022-09-27T15:26:04.789882Z"
  },
  "data": {
    "content_info": {
      "mime": {
        "mime": "image/heic",
        "type": "image",
        "subtype": "heic"
      },
      "image": {
        "color_mode": "RGB",
        "format": "HEIF",
        "height": 3024,
        "width": 4032,
        "orientation": 1,
        "dpi": [
          72,
          72
        ],
        "geo_location": null,
        "datetime_original": "2022-09-29T08:41:18",
        "sequence": false
      }
    },
    "uuid": "f5c4ee6e-f41a-4ff2-a86e-a3e92bcc334d",
    "is_image": true,
    "is_ready": true,
    "metadata": {},
    "appdata": {
      "uc_clamav_virus_scan": {
        "data": {
          "infected": false
        },
        "datetime_created": "2022-10-05T15:38:08.289879Z",
        "datetime_updated": "2022-10-05T15:38:08.289906Z",
        "version": "0.105.1"
      }
    },
    "mime_type": "image/heic",
    "original_filename": "IMG_3037.heic",
    "original_file_url": "https://ucarecdn.com/f5c4ee6e-f41a-4ff2-a86e-a3e92bcc334d/IMG_3037.heic",
    "datetime_removed": null,
    "size": 1603303,
    "datetime_stored": null,
    "url": "https://api.uploadcare.com/files/f5c4ee6e-f41a-4ff2-a86e-a3e92bcc334d/",
    "datetime_uploaded": "2022-10-05T15:38:08.075064Z",
    "variations": null
  },
  "file": "https://ucarecdn.com/f5c4ee6e-f41a-4ff2-a86e-a3e92bcc334d/IMG_3037.heic"
}

Bote that webhooks v0.6 don’t support metadata and appdata, so we recommend using the latest version v0.7.

We’ll make sure to add more information about webhooks to our docs as soon as possible.