---
title: "Get metadata for a file"
method: GET
path: "/api/v4/files/{file_id}/info"
tags: ["files"]
---

# Get metadata for a file

`GET /api/v4/files/{file_id}/info`

Gets a file's info.
##### Permissions
Must have `read_channel` permission or be uploader of the file.

## Path parameters

- `file_id` string, required

## Response `200`

The stored metadata for the given file

- 38cb7293FileInfo
  - `id` string — The unique identifier for this file
  - `user_id` string — The ID of the user that uploaded this file
  - `post_id` string — If this file is attached to a post, the ID of that post
  - `create_at` integer — The time in milliseconds a file was created
  - `update_at` integer — The time in milliseconds a file was last updated
  - `delete_at` integer — The time in milliseconds a file was deleted
  - `name` string — The name of the file
  - `extension` string — The extension at the end of the file name
  - `size` integer — The size of the file in bytes
  - `mime_type` string — The MIME type of the file
  - `width` integer — If this file is an image, the width of the file
  - `height` integer — If this file is an image, the height of the file
  - `has_preview_image` boolean — If this file is an image, whether or not it has a preview-sized version

## Other responses

- `400` — Invalid or missing parameters in URL or request body
- `401` — No access token provided
- `403` — Do not have appropriate permissions
- `404` — Resource not found
- `501` — Feature is disabled

---

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