Using the DELETE API, you can Delete the Public or a Private bins.

Request Type
Request Headers
Header Value Required
secret-key <YOUR_SECRET_KEY> Yes

secret-key is a compulsory header for Deleting a bin.


Deleting a bin will Delete it's associated versions too, permanently.


As of now, you cannot Delete a specific Bin Version.

Basic Code Samples
curl --header "secret-key: <SECRET_KEY>" \
       --request DELETE \<BIN_ID>
let req = new XMLHttpRequest();

req.onreadystatechange = () => {
  if (req.readyState == XMLHttpRequest.DONE) {
};"DELETE", "<BIN_ID>", true);
req.setRequestHeader("secret-key", "<SECRET_KEY>");
import requests
url = '<BIN_ID>'
headers = {'secret-key': '<SECRET_KEY>'}

req = requests.delete(url, json=nil, headers=headers)
require 'net/http'

uri = URI("<BIN_ID>")
res = Net::HTTP.start(, uri.port, use_ssl: true) do |http|
  req =
  req['secret-key'] = '<SECRET_KEY>'

puts res.body
Request Response
  "success": true,
  "id": "<BIN_ID>",
  "message": "Bin <BIN_ID> is deleted successfully. 
             <BIN_VERSION_COUNT> versions removed."
401 / 422
  "message": "<ERROR_MESSAGE>",
  "success": false
Status Code Error Message
401 Unauthorized
Need to provide a secret-key to DELETE bins

Fix: While deleting a Public or a Private record, you need to pass secret-key header to delete the record. Note that only the records which were created using secret-key can be deleted.

422 Unprocessible Entity
Invalid Bin ID

Fix: You need to pass a valid Bin ID in-order to Delete a bin.

401 Unauthorized
You cannot delete a public bin.

Fix: You'll get this error if you are trying to delete a public bin. Public bin can be deleted only if you have passed a secret-key header while creating the record with private: false header. So ensure that even if you want to Create a Public record, you need to pass secret-key header with private header set to false

404 Not Found
Bin not found

Fix: Check your Bin ID and pass a Valid Bin ID.

401 Unauthorized
Invalid secret key provided

Fix: Ensure you provide a valid secret-key while Deleting a Public or a Private record.