---
title: "File Created"
method: POST
path: "file.created"
tags: ["File Events"]
---

# File Created

`POST file.created` (webhook)

This event is triggered when a file is created in the system.

## Payload

- FileCreatedEvent — Event emitted when a file is created
  - `id` string, required — The id of the event
  - `timestamp` string, required — The timestamp of the moment when the event was created in ISO 8601 format
  - `type` 'file.created', required — The type of the event
  - `data` union, required — The data of the event
    - object
      - `id` string, required — The ID of the file
      - `name` string, required — The name of the file
      - `type` 'image/png' | 'image/jpeg' | 'image/webp', required — The MIME type of the file
      - `properties` object, required
        - `size` number, required — The size of the image in bytes
        - `width` number, required — The width of the image in pixels
        - `height` number, required — The height of the image in pixels
      - `task_id` string, nullable, required — The id of the task that generated this file, if any
    - object
      - `id` string, required — The ID of the file
      - `name` string, required — The name of the file
      - `type` 'application/pdf', required — The MIME type of the file
      - `properties` object, required
        - `size` number, required — The size of the document in bytes
        - `page_count` number, required — The number of pages in the document
      - `task_id` string, nullable, required — The id of the task that generated this file, if any

## Acknowledgement `2XX`

Webhook received successfully

---

[API](https://skmtc.dev/scan-documents/apis/scan-documents-api.md) · [All operations](https://skmtc.dev/scan-documents/apis/scan-documents-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/scan-documents/scan-documents-api/revisions/42f9aa9c3b27/schema)
