Delete a render
Delete a specific render by its ID.
Deleting is permanent. We delete the rendered file from our storage, the request data sent to create the render (layers, URLs and other parameters) and the render record. It can’t be undone, and the render URL stops working. Credits used by the render are not refunded. If you use Bring Your Own Storage, the copy in your own bucket is yours and isn’t touched.
Sample Request
Section titled “Sample Request”Here’s a sample request to delete a render:
DELETE /v1/render/{id}fetch(`https://api.templated.io/v1/render/${RENDER_ID}`, { method: 'DELETE', headers: { 'Authorization': `Bearer ${API_KEY}` }}).then(response => { if (response.status === 204) { console.log('Render deleted successfully'); }}).catch(error => console.error('Error:', error));import requests
api_key = 'API_KEY'render_id = 'RENDER_ID'url = f'https://api.templated.io/v1/render/{render_id}'headers = {'Authorization': f'Bearer {api_key}'}
response = requests.delete(url, headers=headers)
if response.status_code == 204: print('Render deleted successfully')else: print('Request failed. Response code:', response.status_code) print(response.text)import java.net.HttpURLConnection;import java.net.URL;
public class DeleteRender { public static void main(String[] args) { try { String apiKey = "API_KEY"; String renderId = "RENDER_ID"; URL url = new URL("https://api.templated.io/v1/render/" + renderId);
HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("DELETE"); connection.setRequestProperty("Authorization", "Bearer " + apiKey);
int responseCode = connection.getResponseCode(); if (responseCode == HttpURLConnection.HTTP_NO_CONTENT) { System.out.println("Render deleted successfully"); } else { System.out.println("Request failed. Response Code: " + responseCode); } } catch (Exception e) { e.printStackTrace(); } }}<?php$apiKey = 'API_KEY';$renderId = 'RENDER_ID';$url = "https://api.templated.io/v1/render/{$renderId}";
$options = [ 'http' => [ 'header' => "Authorization: Bearer {$apiKey}\r\n", 'method' => 'DELETE' ]];
$context = stream_context_create($options);$result = @file_get_contents($url, false, $context);
if ($http_response_header[0] == 'HTTP/1.1 204 No Content') { echo "Render deleted successfully";} else { echo "Error deleting render";}?>Response
Section titled “Response”A successful deletion will return a 204 No Content response with no body.
Error Responses
Section titled “Error Responses”| Status Code | Description |
|---|---|
| 401 | Not authorized - Invalid or missing API key |
| 403 | Forbidden - You don’t have permission to delete this render |
| 404 | Not Found - Render or user not found |
| 409 | Conflict - The render is still being generated. Delete it after it completes |
| 500 | Internal Server Error - An unexpected error occurred |