Documentation

Files API

The Files API allows you to upload, list, retrieve, and delete files in your Get Pronto account. All file operations require authentication using your API key.

Step 1: Request Presigned URL

Request a presigned URL for direct-to-storage upload. This is the first step of the upload flow.

Endpoint

bash
POST /upload/presign

Request Parameters

ParameterTypeDescription
filenameStringOriginal filename
mimetypeStringMIME type of the file
sizeNumberFile size in bytes
customFilenameStringOptional. Custom filename for the uploaded file
folderNameStringOptional. Folder name to upload into

Example Request

bash
curl -X POST https://api.getpronto.io/v1/upload/presign \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filename": "image.jpg", "mimetype": "image/jpeg", "size": 1024000}'

Response

json
{
  "uploadUrl": "https://s3.us-west-000.backblazeb2.com/...",
  "pendingUploadId": "abc123-def456",
  "expiresIn": 3600
}

Step 2: Upload to Storage

Upload the file directly to storage using the presigned URL from step 1.

Endpoint

bash
PUT {uploadUrl from step 1}

Example Request

bash
curl -X PUT "{uploadUrl}" \
  -H "Content-Type: image/jpeg" \
  --data-binary @/path/to/image.jpg

Step 3: Confirm Upload

Confirm the upload completed successfully. This verifies the file in storage and creates the file record.

Endpoint

bash
POST /upload/confirm

Request Parameters

ParameterTypeDescription
pendingUploadIdStringThe pending upload ID from step 1

Example Request

bash
curl -X POST https://api.getpronto.io/v1/upload/confirm \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pendingUploadId": "abc123-def456"}'

Response

json
{
  "message": "File uploaded successfully",
  "file": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "image.jpg",
    "secureUrl": "https://api.getpronto.io/v1/file/user-123/image.jpg",
    "secureThumbnailUrl": "https://api.getpronto.io/v1/files/123e4567-e89b-12d3-a456-426614174000/thumbnail",
    "rawUrl": "https://s3.us-west-000.backblazeb2.com/...",
    "type": "image",
    "rawType": "image/jpeg",
    "size": "1.0 MB",
    "rawSize": 1024000,
    "updated": "Just now",
    "rawUpdated": "2026-03-24T12:00:00.000Z",
    "folderId": null
  }
}

List Files

Retrieve a paginated list of files in your account.

Endpoint

bash
GET /files

Query Parameters

ParameterTypeDescription
pageIntegerPage number (default: 1)
pageSizeIntegerItems per page (default: 20, max: 100)

Example Request

bash
curl https://api.getpronto.io/v1/files?page=1&pageSize=20 \
  -H "Authorization: ApiKey YOUR_API_KEY"

Response

json
{
  "files": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "image.jpg",
      "secureUrl": "https://api.getpronto.io/v1/file/user-123/image.jpg",
      "secureThumbnailUrl": "https://api.getpronto.io/v1/files/123e4567-e89b-12d3-a456-426614174000/thumbnail",
      "rawUrl": "https://s3.us-west-000.backblazeb2.com/...",
      "type": "image",
      "rawType": "image/jpeg",
      "size": "1.0 MB",
      "rawSize": 1024000,
      "updated": "2 hours ago",
      "rawUpdated": "2026-03-24T10:00:00.000Z",
      "folderId": null
    }
  ],
  "pagination": {
    "page": 1,
    "pageSize": 20,
    "totalCount": 135,
    "totalPages": 7
  }
}

Get File

Retrieve metadata for a specific file by its ID.

Endpoint

bash
GET /files/:id

Path Parameters

ParameterTypeDescription
idStringThe unique identifier of the file

Example Request

bash
curl https://api.getpronto.io/v1/files/123e4567-e89b-12d3-a456-426614174000 \
  -H "Authorization: ApiKey YOUR_API_KEY"

Response

json
{
  "file": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "image.jpg",
    "secureUrl": "https://api.getpronto.io/v1/file/user-123/image.jpg",
    "secureThumbnailUrl": "https://api.getpronto.io/v1/files/123e4567-e89b-12d3-a456-426614174000/thumbnail",
    "rawUrl": "https://s3.us-west-000.backblazeb2.com/...",
    "type": "image",
    "rawType": "image/jpeg",
    "size": "1.0 MB",
    "rawSize": 1024000,
    "updated": "2 hours ago",
    "rawUpdated": "2026-03-24T10:00:00.000Z",
    "folderId": null
  }
}

Delete File

Permanently delete a file from your account.

Endpoint

bash
DELETE /files/:id

Path Parameters

ParameterTypeDescription
idStringThe unique identifier of the file to delete

Example Request

bash
curl -X DELETE https://api.getpronto.io/v1/files/123e4567-e89b-12d3-a456-426614174000 \
  -H "Authorization: ApiKey YOUR_API_KEY"

Response

json
{
  "message": "File deleted successfully"
}

File Object

The file object contains the following properties:

ParameterTypeDescription
idStringUnique identifier for the file
nameStringOriginal filename
secureUrlStringAuthenticated URL for file access via the API
secureThumbnailUrlStringAuthenticated URL for thumbnail access
rawUrlStringDirect storage URL for the file
typeStringFormatted file type (image, video, json, file)
rawTypeStringRaw MIME type of the file
sizeStringHuman-readable file size (e.g., '1.5 MB')
rawSizeNumberFile size in bytes
updatedStringHuman-readable time since last update (e.g., '2 hours ago')
rawUpdatedStringISO 8601 timestamp of when the file was last updated
folderIdString | nullID of the folder the file belongs to, or null

Example File Object

json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "image.jpg",
  "secureUrl": "https://api.getpronto.io/v1/file/user-123/image.jpg",
  "secureThumbnailUrl": "https://api.getpronto.io/v1/files/123e4567-e89b-12d3-a456-426614174000/thumbnail",
  "rawUrl": "https://s3.us-west-000.backblazeb2.com/...",
  "type": "image",
  "rawType": "image/jpeg",
  "size": "1.0 MB",
  "rawSize": 1024000,
  "updated": "2 hours ago",
  "rawUpdated": "2026-03-24T10:00:00.000Z",
  "folderId": null
}

Next Steps

Continue exploring our documentation with these related topics: