/api/v1/files
Upload a file
Multipart upload into your API Upload inbox. New files are public so the returned link works. Size and storage quotas still apply. POST /api/files/upload remains a thin alias.
Auth: x-api-key · Pro only
Request body
multipart/form-data
| Field | Type | Description |
|---|---|---|
| file* | binary | The file to store in your API Upload library. |
| expires | string | never, a preset (30m, 1h, 1d, 7d, 1w, 30d), or a file.io-style duration such as 2h or 7d. |
| maxDownloads | integer | Download cap. 0 means unlimited. 1 also enables burn-after-download. |
| autoDelete | boolean | Accepted for compatibility; responses always report true. Expired files are removed by cleanup. |
| password | string | Optional password on the public share link. |
Examples
curl -X POST "https://sharable.ryples.com/api/v1/files" \ -H "x-api-key: sh-YOUR_API_KEY" \ -F "file=@/path/to/report.pdf" \ -F "expires=7d" \ -F "maxDownloads=0" \ -F "autoDelete=true"
Responses
200File stored.FileDetails
{
"success": true,
"id": "64f0c2a91b3e4a0012ab34cd",
"key": "64f0c2a91b3e4a0012ab34cd",
"name": "report.pdf",
"link": "https://example.com/files/p/64f0c2a91b3e4a0012ab34cd",
"download": "https://example.com/api/v1/files/64f0c2a91b3e4a0012ab34cd/download",
"expires": "2026-08-21T00:00:00.000Z",
"expiry": "7d",
"downloads": 0,
"maxDownloads": 0,
"autoDelete": true,
"size": 1234,
"mimeType": "application/pdf",
"created": "2026-08-14T00:00:00.000Z",
"modified": "2026-08-14T00:00:00.000Z"
}400Missing file field or invalid multipart values.Error
{
"success": false,
"error": "No file provided. Use form field \"file\"."
}401Missing or invalid API key.Error
{
"success": false,
"error": "Invalid API key"
}403Caller is not on Pro.Error
{
"success": false,
"error": "API upload is available on Pro. Redeem a code on the pricing page."
}