Albums - Update API

Update the specified Album.

Method PUT

Parameters

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

Body

{
    "title": "string",
    "user_id": "integer"
}

How to Use

fetch('https://simplecrudapi.com/api/albums/1', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    'title': 'Updated Greatest Hits',
    'description': 'An updated compilation of the most popular tracks.',
    'release_date': '2024-11-11'
  })
})
	.then(response => response.json())
	.then(data => console.log(data)})
	.catch(error => console.error(error)});

Response

{
    "data": {
        "id": 1,
        "title": "The Greatest Hits",
        "description": "A collection of the best songs from the 90s.",
        "release_date": "1999-11-09"
    }
}

Try Now

fetch('https://simplecrudapi.com/api/albums/1', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    'title': 'Updated Greatest Hits',
    'description': 'An updated compilation of the most popular tracks.',
    'release_date': '2024-11-11'
  })
})
	.then(response => response.json())
	.then(data => console.log(data)})
	.catch(error => console.error(error)});

Test with Open API

View Open API

Our Proudly Sponsors 🎉

© 2025 Simple CRUD API. All rights reserved.