Skip to main content
GET
/
files
/
{id}
curl -X GET "https://api.tktchurch.com/v1/files/123e4567-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "originalName": "example.jpg",
  "url": "https://storage.example.com/uploads/abc123.jpg",
  "key": "uploads/abc123.jpg",
  "contentType": "image/jpeg",
  "size": 1048576,
  "provider": "s3",
  "providerMetadata": {
    "bucket": "my-bucket",
    "region": "us-east-1"
  },
  "uploadedBy": "123e4567-e89b-12d3-a456-426614174001",
  "createdAt": "2024-01-20T15:00:00Z",
  "updatedAt": "2024-01-20T15:00:00Z"
}
This endpoint requires authentication.

Path Parameters

id
string
required
The UUID of the file to retrieve

Response

id
string
File’s unique identifier (UUID)
originalName
string
Original filename
url
string
URL to access the file
key
string
Storage key/path of the file
contentType
string
MIME type of the file
size
integer
File size in bytes
provider
string
Storage provider used (s3 or local)
providerMetadata
object
Provider-specific metadata
uploadedBy
string
UUID of the user who uploaded the file
createdAt
string
Upload timestamp in ISO 8601 format
updatedAt
string
Last update timestamp in ISO 8601 format

Error Responses

error
object
Error details when the request fails
Common error cases:
  • 401 Unauthorized: Missing or invalid access token
  • 404 Not Found: File not found
curl -X GET "https://api.tktchurch.com/v1/files/123e4567-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "originalName": "example.jpg",
  "url": "https://storage.example.com/uploads/abc123.jpg",
  "key": "uploads/abc123.jpg",
  "contentType": "image/jpeg",
  "size": 1048576,
  "provider": "s3",
  "providerMetadata": {
    "bucket": "my-bucket",
    "region": "us-east-1"
  },
  "uploadedBy": "123e4567-e89b-12d3-a456-426614174001",
  "createdAt": "2024-01-20T15:00:00Z",
  "updatedAt": "2024-01-20T15:00:00Z"
}