---
title: "Get encrypted file details"
method: GET
path: "/files/encrypted/{id}"
tags: ["Files Encrypted", "dev-api"]
---

# Get encrypted file details

`GET /files/encrypted/{id}`

## Request

- Base URL: `https://gateway.prem.io`
- URL: `https://gateway.prem.io/files/encrypted/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `Authorization`
  - none

Retrieve detailed information about a specific encrypted file by ID, optionally with a signed download URL. Supports shared chat file access without authentication.

## Path parameters

- `id` string, required

## Query parameters

- `url` 'true' | 'false'

## Response `200`

Encrypted file retrieved successfully

- object: Response containing encrypted file details
  - `status` 200 | 201 | 202, required: Status code of the response
  - `data` object, nullable, required: Encrypted file object containing file identifier and encrypted metadata
    - `id` string: Unique identifier for the encrypted file
    - `user_id` string, nullable: User identifier that owns the file
    - `organization_id` string, nullable: Organization identifier that owns the file
    - `api_key_id` string, nullable: API Key identifier that owns the file
    - `hash` string, nullable: File hash for duplicate detection
    - `version` string: Encryption version
    - `kid` string: Key identifier used for encryption
    - `wrapped_dek` string: Wrapped data encryption key
    - `original_name` string: Original filename, encrypted by the client
    - `mime_type` string: MIME type, encrypted by the client
    - `file_name` string: Generated filename for storage
    - `file_path` string, nullable: Full path to the encrypted file in storage
    - `file_size` integer: File size in bytes
    - `chat_id` string, nullable: ID of the chat this file belongs to
    - `message_id` string, nullable: ID of the message this file belongs to
    - `type` string: Type of the file - always 'encrypted' for fully encrypted files
    - `created_at` string, mysql-date-time: Timestamp when the file was created
    - `rag_status` 'running' | 'stopped' | 'failure' | 'success' | 'pending' | 'null', nullable: Status of the RAG processing
    - `updated_at` string, mysql-date-time, nullable: Timestamp when the file was last updated
    - `url` string, uri, nullable: Signed URL for accessing the encrypted file resource (only included when url=true query parameter is set)
    - `is_duplicate` boolean: Indicates if the file is a duplicate (only included in upload response)
    - `chat_wrapped_dek` string, nullable: File DEK encrypted with chat DEK (hex), for shared chat file access
  - `error` string, nullable: Error message of the response, human readable
  - `message` string, nullable, required: Message of the response, human readable
  - `env` 'development' | 'production', required: API environment
  - `log` union: Useful informaiton, not always present, to debug the response
    - string
    - object
  - `validator` union: Validator response object, each key is the field name and value is the error message
    - object
    - unknown[]
      - unknown
  - `support_id` string, uuid, nullable: Support ID linked to the response, used to identify it when talking with our team.

## Other responses

- `400`: Bad request
- `401`: Access token is missing or invalid
- `403`: You do not have the required permissions to access this resource
- `404`: Resource not found

## Changes

- **2026-11-13** `d46bc3931b34`: 12 warning, 3 info
  - added the new `405.00` enum value to the `allOf[subschema #1]/status` response property for the response status `401`
  - added the new `405.00` enum value to the `allOf[subschema #1]/status` response property for the response status `403`
  - added the new `405.00` enum value to the `allOf[subschema #1]/status` response property for the response status `404`
  - added the new `405.00` enum value to the `status` response property for the response status `400`
  - …11 more
- **2026-10-16** `d5b1beb33be5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/premai-io/apis/prem-studio-api/changes/files/encrypted/:id/get.md)

---

[API](https://skmtc.dev/premai-io/apis/prem-studio-api.md) - [All operations](https://skmtc.dev/premai-io/apis/prem-studio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/premai-io/apis/prem-studio-api/revisions/d46bc3931b34?raw)
