Photos - Delete API

Delete the specified Photo.

Method DELETE

Parameters

Name Details Type Required
id The ID of the Photo. integer Yes

How to Use

fetch('https://simplecrudapi.com/api/photos/1', {
  method: 'DELETE',
  headers: {
    'Content-Type': 'application/json'
  }
})
	.then(response => response.json())
	.then(json => console.log(json))
	.catch(error => console.error(error));

Response

{
    "data": {
        "id": 1,
        "title": "Sunset Over the Ocean",
        "description": "A breathtaking view of the sunset over the ocean, captured during a peaceful evening walk. The vibrant colors and tranquil waves create the perfect harmony.",
        "url": "https:\/\/via.placeholder.com\/640x480.png\/000088?text=Sunset",
        "uploaded_at": "2024-11-09 20:09:42"
    }
}

Try Now

fetch('https://simplecrudapi.com/api/photos/1', {
  method: 'DELETE',
  headers: {
    'Content-Type': 'application/json'
  }
})
	.then(response => response.json())
	.then(json => console.log(json))
	.catch(error => console.error(error));

Test with Open API

View Open API

Previous
Albums API

Our Proudly Sponsors 🎉

© 2025 Simple CRUD API. All rights reserved.