Extend download URL expiration for continued access to converted files
POST /api/v1/extend-sasPOSTThis endpoint allows you to extend the expiration time of download URLs for converted files. By default, download URLs expire after 24 hours for security. This endpoint enables continued access to your converted documents by extending the expiration time.
You cannot extend the expiry of any file once it has already expired, as expired files are automatically deleted from our servers for security and storage optimization.
Keep your download URLs active for continued access to converted files.
Extend download expiry for multiple files at once with a single request.
Maintain secure, time-limited access to your converted files.
{
"job_id": "conv_1234567890abcdef",
"extension_hours": 168
}curl -X POST https://api.markdownconverters.com/api/v1/extend-sas \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"job_id": "conv_1234567890abcdef",
"extension_hours": 168
}'{
"job_ids": [
"conv_1234567890abcdef",
"conv_2345678901bcdefg",
"conv_3456789012cdefgh"
],
"extension_hours": 72
}curl -X POST https://api.markdownconverters.com/api/v1/extend-sas \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"job_ids": [
"conv_1234567890abcdef",
"conv_2345678901bcdefg"
],
"extension_hours": 72
}'| Parameter | Type | Required | Description |
|---|---|---|---|
| job_id | string | Conditional* | Single job ID to extend (required for single extension) |
| job_ids | array | Conditional* | Array of job IDs for batch extension |
| extension_hours | number | Yes | Hours to extend access (1-720) |
* Either job_id or job_ids is required, but not both.
{
"job_id": "conv_1234567890abcdef",
"filename": "document.pdf",
"original_sas_url": "https://mdconverterstorage.blob.core.windows.net/converted-files/conv_1234567890abcdef.md?sp=r&st=2024-01-01T12:00:00Z&se=2024-01-08T12:00:00Z&spr=https&sv=2022-11-02&sr=b&sig=...",
"new_sas_url": "https://mdconverterstorage.blob.core.windows.net/converted-files/conv_1234567890abcdef.md?sp=r&st=2024-01-01T12:00:00Z&se=2024-01-15T12:00:00Z&spr=https&sv=2022-11-02&sr=b&sig=...",
"expiration_info": {
"original_expiry": "2024-01-08T12:00:00Z",
"new_expiry": "2024-01-15T12:00:00Z",
"extension_hours": 168,
"total_valid_hours": 336
},
"file_info": {
"file_size": 2048576,
"created_at": "2024-01-01T12:00:00Z",
"last_accessed": "2024-01-05T15:30:00Z"
},
"limits": {
"max_extension_hours": 720,
"remaining_extensions": 2,
"max_total_lifetime_hours": 8760
}
}{
"batch_id": "ext_batch_1234567890",
"total_jobs": 3,
"successful_extensions": 2,
"failed_extensions": 1,
"results": [
{
"job_id": "conv_1234567890abcdef",
"status": "success",
"filename": "document1.pdf",
"new_sas_url": "https://mdconverterstorage.blob.core.windows.net/converted-files/conv_1234567890abcdef.md?sp=r&st=2024-01-01T12:00:00Z&se=2024-01-04T12:00:00Z&spr=https&sv=2022-11-02&sr=b&sig=...",
"new_expiry": "2024-01-04T12:00:00Z"
},
{
"job_id": "conv_2345678901bcdefg",
"status": "success",
"filename": "document2.docx",
"new_sas_url": "https://mdconverterstorage.blob.core.windows.net/converted-files/conv_2345678901bcdefg.md?sp=r&st=2024-01-01T12:00:00Z&se=2024-01-04T12:00:00Z&spr=https&sv=2022-11-02&sr=b&sig=...",
"new_expiry": "2024-01-04T12:00:00Z"
},
{
"job_id": "conv_3456789012cdefgh",
"status": "failed",
"filename": "document3.pptx",
"error": {
"code": "FILE_EXPIRED",
"message": "The file has already been deleted and cannot be extended",
"suggestion": "File was deleted after expiration. Please re-process the original document."
}
}
]
}{
"error": "Extension limit exceeded",
"code": "EXTENSION_LIMIT_EXCEEDED",
"message": "Cannot extend SAS token. Maximum extension limit of 720 hours exceeded.",
"details": {
"job_id": "conv_1234567890abcdef",
"current_total_hours": 600,
"requested_extension_hours": 168,
"max_total_hours": 720,
"remaining_extension_hours": 120
},
"suggestion": "Request a smaller extension or re-process the file to reset the timer."
}| Field | Type | Description |
|---|---|---|
| job_id | string | The conversion job identifier |
| filename | string | Original filename of the converted file |
| original_sas_url | string | Previous SAS URL (now expired or expiring soon) |
| new_sas_url | string | New SAS URL with extended expiration |
| Field | Type | Description |
|---|---|---|
| original_expiry | string | Previous expiration time (ISO 8601) |
| new_expiry | string | New expiration time (ISO 8601) |
| extension_hours | number | Hours added in this extension |
| total_valid_hours | number | Total hours from creation to new expiry |
| Field | Type | Description |
|---|---|---|
| max_extension_hours | number | Maximum hours per single extension |
| remaining_extensions | number | Number of extensions remaining |
| max_total_lifetime_hours | number | Maximum total hours for file lifetime |
File Already Deleted
File was deleted after SAS token expiration
Extension Limit Reached
Maximum extension hours exceeded for this file
Invalid Job ID
The specified job ID does not exist
Invalid Extension Duration
Extension hours must be between 1 and 720