const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', color: '<string>'})
};
fetch('https://api.example.com/api/v1/labels/{label_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));