Using the COLLECTIONS UPDATE API, you can UPDATE Collections name for now. We might add more meta data to the Collections which you can use the Update API for.

Root
https://api.jsonbin.io/
Route
/c/<COLLECTIONS_ID>
Request Type
PUT
Request Headers
Header Value Required
Content-Type application/json Yes
secret-key <YOUR_SECRET_KEY> Yes
Content-Type

Content-Type needs to be set to application/json. The request will result in an error in-case of a missing Content-Type header.

secret-key

secret-key is required when you need to Update a Collection. You can find your secret-key on the API Keys page after signing-in.

Basic Code Samples
curl \
 --header "Content-Type: application/json" \
 --header "secret-key: <SECRET_KEY>" \
 --request PUT \
 --data '{"name": "Sample Collection Updated"}' \
 https://api.jsonbin.io/c/<COLLECTION_ID>
let req = new XMLHttpRequest();

req.onreadystatechange = () => {
  if (req.readyState == XMLHttpRequest.DONE) {
    console.log(req.responseText);
  }
};

req.open("PUT", "https://api.jsonbin.io/c/<COLLECTION_ID>", true);
req.setRequestHeader("Content-type", "application/json");
req.setRequestHeader("secret-key", "<SECRET_KEY>");
req.send('{"name": "Sample Collection Updated"}');
import requests
url = 'https://api.jsonbin.io/c/<COLLECTION_ID>'
headers = {
  'Content-Type': 'application/json', 
  'secret-key': '<SECRET_KEY>'
}
data = {"name": "Sample Collection Updated"}

req = requests.put(url, json=data, headers=headers)
print(req.text)
require 'net/http'
require 'json'

uri = URI("https://api.jsonbin.io/c/<COLLECTION_ID>")
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
  req = Net::HTTP::Put.new(uri)
  req['Content-Type'] = 'application/json'
  req['secret-key'] = '<SECRET_KEY>'

  req.body = {"name": "Sample Collection Updated"}.to_json
  http.request(req)
end

puts res.body
Request Response
Success
200
{
  "success": true,
  "collectionID": "<COLLECTION_ID>",
  "data": {
    "name": "Sample Collection Updated"
  }
}
Error
401 / 404 / 422
{
  "message": "<ERROR_MESSAGE>",
  "success": false
}
Status Code Error Message
422 Unprocessible Entity
Expected content type - application/json

Fix: You need to pass Content-Type: application/json in the headers.

401 Unauthorized
Need to provide a secret-key to UPDATE Collections

Fix: While Updating a Collection, you need to pass secret-key header to update the Collection.

422 Unauthorized
Invalid Collection ID

Fix: You need to pass a valid Collection ID in-order to Update a Collection.

422 Unprocessible Entity
You need to provide a name.

Fix: You need to pass name key in the JSON Body of the Request with a Valid Name.

422 Unprocessible Entity
Name key cannot be blank.

Fix: Ensure that you provide some name to the collection.

422 Unprocessible Entity
Collection Name length should be more than 2 characters and less than 33 characters

Fix: Error message says it all :)

404 Not Found
Collection not found

Fix: Ensure that you are passing a valid Collection ID

401 Unauthorized
Invalid secret key provided.

Fix: If you are trying to Update a Collection, ensure that the secret-key you are passing in the header is correct.