---
title: "File created"
method: POST
path: "file.created"
---

# File created

`POST file.created` (webhook)

Triggered when a file is created.

## Payload

- FileCreateEvent — Triggered when a file is created.
  - `id` string, required — Unique identifier for the event.
  - `type` 'file.created', required — Type of the webhook event.
  - `created_at` string, date-time, required — Timestamp of when the event occurred in ISO8601 format.
  - `data` FileDetails, required — Object containing details of a file or file version.
    - `fileId` string — Unique identifier of the asset.
    - `type` 'file' | 'file-version' — Type of the asset.
    - `name` string — Name of the asset.
    - `filePath` string — Path of the file. This is the path you would use in the URL to access the file. For example, if the file is at the root of the media library, the path will be `/file.jpg`. If the file is inside a folder named `images`, the path will be `/images/file.jpg`.
    - `tags` union — An array of tags assigned to the file. Tags are used to search files in the media library.
      - string[]
      - string[]
    - `AITags` union — Array of AI-generated tags associated with the image. If no AITags are set, it will be null.
      - AITag[]
        - `name` string — Name of the tag.
        - `confidence` number — Confidence score of the tag.
        - `source` string — Source of the tag. Possible values are `google-auto-tagging` and `aws-auto-tagging`.
      - AITag[]
        - `name` string — Name of the tag.
        - `confidence` number — Confidence score of the tag.
        - `source` string — Source of the tag. Possible values are `google-auto-tagging` and `aws-auto-tagging`.
    - `versionInfo` VersionInfo — An object containing the file or file version's `id` (versionId) and `name`.
      - `id` string — Unique identifier of the file version.
      - `name` string — Name of the file version.
    - `isPrivateFile` boolean — Specifies if the file is private or not.
    - `isPublished` boolean — Specifies if the file is published or not.
    - `customCoordinates` union — An string with custom coordinates of the file.
      - string
      - unknown
    - `url` string, uri — URL of the file.
    - `thumbnail` string, uri — URL of the thumbnail image. This URL is used to access the thumbnail image of the file in the media library.
    - `fileType` string — Type of the file. Possible values are `image`, `non-image`.
    - `mime` string — MIME type of the file.
    - `width` number — Width of the file.
    - `height` number — Height of the file.
    - `size` number — Size of the file in bytes.
    - `bitRate` integer — The bit rate of the video in kbps (only for video).
    - `duration` integer — The duration of the video in seconds (only for video).
    - `audioCodec` string — The audio codec used in the video (only for video/audio).
    - `videoCodec` string — The video codec used in the video (only for video).
    - `hasAlpha` boolean — Specifies if the image has an alpha channel.
    - `customMetadata` CustomMetadata — A key-value data associated with the asset.
    - `selectedFieldsSchema` SelectedFieldsSchema — This field is included in the response only if the Path policy feature is available in the plan. It contains schema definitions for the custom metadata fields selected for the specified file path. Field selection can only be done when the Path policy feature is enabled. Keys are the names of the custom metadata fields; the value object has details about the custom metadata schema.
    - `embeddedMetadata` EmbeddedMetadata — Consolidated embedded metadata associated with the file. It includes exif, iptc, and xmp data.
    - `description` string — Optional text to describe the contents of the file. Can be set by the user or the ai-auto-description extension.
    - `createdAt` string, date-time — Date and time when the file was uploaded. The date and time is in ISO8601 format.
    - `updatedAt` string, date-time — Date and time when the file was last updated. The date and time is in ISO8601 format.

## Acknowledgement `200`

Acknowledge

---

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